Download - Erlang introduction geek2geek Berlin
![Page 1: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/1.jpg)
Erlang introductionPaolo Negri @hungryblank
![Page 2: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/2.jpg)
ME
• confounder at contentful.com
• experience in erlang from building game servers
• interested in programming languages
![Page 3: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/3.jpg)
“Traveling, whether in the mental or the physical word
is a Joy”Bertrand Russell
“The anlysis of mind”
![Page 4: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/4.jpg)
Agenda
• Why erlang is a place worth visiting
![Page 5: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/5.jpg)
How would you visualize your code running?
![Page 6: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/6.jpg)
Maybe
http://www.flickr.com/photos/target_man_2000/8628913523
![Page 7: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/7.jpg)
Erlang
![Page 8: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/8.jpg)
Erlang
![Page 9: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/9.jpg)
Erlang
![Page 10: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/10.jpg)
Erlang
http://www.flickr.com/photos/mitosettembremusica/2874216489/
![Page 11: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/11.jpg)
2 Concepts
1) Process
2) Message
![Page 12: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/12.jpg)
How it works?
A process sends and receives
messages to/from other
processes
![Page 13: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/13.jpg)
Process
Erlang processes are light-weightwith small memory footprint,fast to create and terminate, scheduling overhead is low.
Erlang documentation
![Page 14: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/14.jpg)
Process is key to
• Concurrency
• Isolation
• Fault tolerance
• Control of state
![Page 15: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/15.jpg)
Message
Messages between processes are simply valid Erlang terms
They can belists, tuples, integers...
![Page 16: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/16.jpg)
The language
The sequential subset of Erlang is a
functional language, with:
• strict evaluation
• single assignment
• dynamic typing
![Page 17: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/17.jpg)
Single Assignment?a.k.a immutability
“Once created by single assignment, named values are not variables but immutable objects.”
Wikipedia
![Page 18: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/18.jpg)
Mutabilityaccess only current state
![Page 19: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/19.jpg)
Immutabilityaccess all states
![Page 20: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/20.jpg)
What for?
• Building reliable systems
• Building high concurrency systems
• Building SOA infrastructure
![Page 21: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/21.jpg)
Where to start?
learn yousomeerlang.com
learnyousomeerlang.com
![Page 22: Erlang introduction geek2geek Berlin](https://reader033.vdocuments.net/reader033/viewer/2022050904/5478eca2b4af9fc3158b468b/html5/thumbnails/22.jpg)
Questions?