Erlang
my name is Julian Doherty, and I use Erlang because it's the
 only sane way I've found to do concurrent programming...
Main Design Goal:
        Reliability
• Designed for real world use
• Concurrent
• Distributed
• Fault tolerant
• CouchDB,...
Concurrency

• Asynchronous message passing
• Can fake sync concurrency
• NO shared state (can cheat though)
• Each proces...
Light Weight Processes
• OS Process > OS Thread > Erlang Process
• Green (software) threads, non blocking IO
• Built in sc...
meaningless micro benchmark:
Yaws (Erlang web server) vs Apache
Distributed

• Built in
• Same syntax and semantics as local
  concurrency
• Slower though, so can’t just ignore
• All or ...
Fault Tolerance

• NO THREADS (been burnt too many times)
• “Nine nines” (99.9999999%) uptime
• Linked processes
• Supervi...
Language Syntax
• Immutable, single assingment
• Pattern matching
• Strictly functional (no OO in there)
• Compiled, Dynam...
The code!
           ihatevans.com
 (talk to me about the Erlang/Ruby Rack handler I’m
hacking on over a couple of beers i...
Upcoming SlideShare
Loading in …5
×

Erlang overview

1,663 views

Published on

Quick overview of the Erlang programming language presented at MXUG April meeting in Melbourne.

Published in: Technology, News & Politics
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,663
On SlideShare
0
From Embeds
0
Number of Embeds
250
Actions
Shares
0
Downloads
28
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Erlang overview

  1. 1. Erlang my name is Julian Doherty, and I use Erlang because it's the only sane way I've found to do concurrent programming madlep@rawblock.com madlep@ubercharged.net http://www.rawblock.com http://www.ubercharged.net
  2. 2. Main Design Goal: Reliability • Designed for real world use • Concurrent • Distributed • Fault tolerant • CouchDB, Mochiweb, Rabbitmq, Ejabberd
  3. 3. Concurrency • Asynchronous message passing • Can fake sync concurrency • NO shared state (can cheat though) • Each process has own “inbox” • spawn(...) == Object.new
  4. 4. Light Weight Processes • OS Process > OS Thread > Erlang Process • Green (software) threads, non blocking IO • Built in scheduler • Can start 100,000s - 1,000,000s of processes • Cheap to create / stop / switch • E.g. http://ihatevans.com - 3000 req/sec • 1,000,000 user comet app
  5. 5. meaningless micro benchmark: Yaws (Erlang web server) vs Apache
  6. 6. Distributed • Built in • Same syntax and semantics as local concurrency • Slower though, so can’t just ignore • All or nothing security (annoying)
  7. 7. Fault Tolerance • NO THREADS (been burnt too many times) • “Nine nines” (99.9999999%) uptime • Linked processes • Supervisors • Let processes die, then restart • OTP - framework/best practices for servers
  8. 8. Language Syntax • Immutable, single assingment • Pattern matching • Strictly functional (no OO in there) • Compiled, Dynamic typed • Tail recursion, actor pattern used for state • Sometimes clunky (Strings, Records)
  9. 9. The code! ihatevans.com (talk to me about the Erlang/Ruby Rack handler I’m hacking on over a couple of beers if you’re interested)

×