Presentation is loading. Please wait.

Presentation is loading. Please wait.

Erlang: What, Why and How

Similar presentations


Presentation on theme: "Erlang: What, Why and How"— Presentation transcript:

1 Erlang: What, Why and How
COSI Lightning talk by: Jacob Torrey

2 What is Erlang? A programming language created by Ericsson for telephony switches. Many concurrent processes Must have high uptime It's been around for quite a while, but is just now getting popular Buzzwords: Functional, Distributed, Highly- concurrent Used by: Facebook, CouchDB, ejabberd... Similar to: Prolog, Haskell...

3 Why Erlang? It has a VERY lightweight process system (think 2 million per CPU) with: No locking or shared memory – No nightmares Pure message passing – Can pass any data in messages Processes can be on remote machines Erlang VM can take advantage of new hardware without program changes Multi-core and multi-processor Near linear speed up with less than 16 cores!

4 Ok, so How? Erlang requires a VM (http://www.erlang.org)
Windows, OSX, *NIX Run erl in the command prompt 1> 1. 1 2> A = 1. B = A + 1. 2

5 Show me the money!... or code
double(Num) → Num * 2. doubleList(ListNum) → F = fun(F) → double(A) end, lists:map(F, ListNum). OR rpc:pmap({?MODULE, double}, [], ListNum).

6 What is the advantage Since you can fork and forget about processes, you can conceptualize problems like in the real world. No race conditions or other nasties Erlang will take advantage of multi-cores without your help Distributed for hardware failover Functional paradigm, so it rocks! ;)

7 Erlang + COSI = <3 OSP – My project to abstract away server boilerplate code to allow for the simple development of server daemons requiring just the server logic. Distributed data store for redundance and load balancing Simple management console Standard XML servlet format

8 Fin Ideas taken from: Devon Smith's Code4Lib Erlang talk
008.lightningtalk.Erlang


Download ppt "Erlang: What, Why and How"

Similar presentations


Ads by Google