erlang introduction geek2geek berlin
DESCRIPTION
Introduction about erlang given at the berlin geek2geek meetupTRANSCRIPT
Erlang introductionPaolo Negri @hungryblank
ME
• confounder at contentful.com
• experience in erlang from building game servers
• interested in programming languages
“Traveling, whether in the mental or the physical word
is a Joy”Bertrand Russell
“The anlysis of mind”
Agenda
• Why erlang is a place worth visiting
How would you visualize your code running?
Maybe
http://www.flickr.com/photos/target_man_2000/8628913523
Erlang
Erlang
Erlang
Erlang
http://www.flickr.com/photos/mitosettembremusica/2874216489/
2 Concepts
1) Process
2) Message
How it works?
A process sends and receives
messages to/from other
processes
Process
Erlang processes are light-weightwith small memory footprint,fast to create and terminate, scheduling overhead is low.
Erlang documentation
Process is key to
• Concurrency
• Isolation
• Fault tolerance
• Control of state
Message
Messages between processes are simply valid Erlang terms
They can belists, tuples, integers...
The language
The sequential subset of Erlang is a
functional language, with:
• strict evaluation
• single assignment
• dynamic typing
Single Assignment?a.k.a immutability
“Once created by single assignment, named values are not variables but immutable objects.”
Wikipedia
Mutabilityaccess only current state
Immutabilityaccess all states
What for?
• Building reliable systems
• Building high concurrency systems
• Building SOA infrastructure
Where to start?
learn yousomeerlang.com
learnyousomeerlang.com
Questions?