Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Building Scalable Systems: What you can learn from Erlang - DotScale 2016

757 views

Published on

Here are the slides from my talk at DotScale 2016 conference.

Erlang is a programming language dedicated to building robust and scalable services.
It has matured for many years and finally reached a point where it is one of the secret weapon used by many prominent companies.

To help you understand Erlang, I am going to walk you through old programming concepts that are at the root of Erlang using … A time machine !

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Building Scalable Systems: What you can learn from Erlang - DotScale 2016

  1. 1. Building Scalable Systems What you can Learn from Erlang
  2. 2. First Stop: 1973
  3. 3. Actor Model • Carl Hewitt
  4. 4. Actor Model Principle • An actor can: • Send Messages to other Actors • Create other Actors • Process Next Message
  5. 5. Share Nothing
  6. 6. “An Island of Sanity in a Sea of Concurrency" Actor State Actor State Actor State Actor State Actor State
  7. 7. Naturally scalable
  8. 8. Next stop: 1986
  9. 9. Birth of Erlang Joe Armstrong, Robert Virding, Mike Williams, Bjarne Däcker
  10. 10. Share Nothing with Lightweight Processes
  11. 11. Let it Crash
  12. 12. Handle Failures with Process Links and Supervisors
  13. 13. Next stop: 1998
  14. 14. Erlang VM released as Open Source
  15. 15. Erlang strength lies in the VM
  16. 16. Vertical scaling: Multicore and Scheduler
  17. 17. Horizontal scaling: Clustering Transparent, well almost
  18. 18. Erlang strengths match Server applications properties • Server apps are most of the time IO bound • Server apps are often memory bound.
  19. 19. Network Stack Accepted connections Requests processing Server threads Pool Thread Thread Thread Thread Thread Thread Thread Thread Thread … Client Requests X X X Connections Pool i.e. Apache
  20. 20. Network Stack Accepted connections Requests processing Lightweight processes Client Requests … One Connection per Thread Erlang webservers i.e. Yaws, Cowboy, etc.
  21. 21. Design comparison • Number of requests handled in peak time: 1Ks to 10ks • Throughput: reduce quickly when max concurrency reached • More complex code • Number of concurrent requests handle in peak time: 100Ks to 1Ms • Throughput: Higher for large number of concurrent requests. • Simple code, no pool to manage Design with worker thread pools Design with Erlang processes
  22. 22. Back to 2016
  23. 23. Erlang is still the Reference for Scalable Systems
  24. 24. Makes it easier to build Advanced Concurrency Patterns
  25. 25. New languages using the Erlang VM: Elixir, LFE, etc
  26. 26. Inspiration for new languages / Frameworks: Go, Scala, Akka, Clojure, …
  27. 27. Next Stop ?

×