
Discover how concurrency and parallelism differ in Erlang, and leverage OTP patterns like gen_server and supervisors to spawn millions of processes on multi-core CPUs with robust supervision trees.
Refer to the course literature, video lectures, and exercises. Read two recommended books for deeper Erlang topics: designing for scalability with Erlang OTP, and learning some Erlang for great good.
Use restaurant and banquet analogies to distinguish concurrency, where multiple tasks overlap on a single or multiple cores, from parallelism, where tasks run truly simultaneously.
Explore Erlang's bang operator for inter-process communication, sending messages via a PID, handling mailboxes with receive blocks, and using after timeouts.
Execute a parallel Monte Carlo simulation by spawning processes to place random points and a collector to count points inside the circle, illustrating speedup and bottlenecks.
Download both the exercise instructions and the zip file.
Explore the OTP design principles and common patterns that enable reliable Erlang servers, focusing on gen_server, supervisor, releases, and applications.
discover how the gen_server behavior implements a generic server with start, stop, call, and cast interface, plus init, handle_call, handle_cast, handle_info, and terminate callbacks.
Discover rebar3, the official unofficial Erlang build tool, and learn to compile, test, and release code, create releases, and explore the app structure.
Learn how otp supervision trees handle failures by restarting crashed workers through supervisors, enabling fault-tolerant systems and preparing you to craft a simple supervisor.
Examine how linking processes supports supervision trees, creates a chain of linked processes with spawn and link, and reveals crash propagation and process links in Erlang.
Download both the exercise instructions and the zip file.
You have probably heard about WhatsApp by now. And you might also have heard that it handles a fair amount of users each day. In fact, they managed to grow their user base to millons of users with an engineering team of only 32 persons using Erlang, before being acquired by Facebook. But WhatsApp is not the only success story. You would be surprised if you knew how many of the things you take for granted in your daily life are in fact powered by Erlang. It all started with the telecom business, but Erlang has since then gained popularity in many areas, including fintech, IoT, Healthcare and gaming. Just to name a few!
There are two main paradigms of the Erlang language. The functional paradigm, and the concurrent paradigm. In this course, we will put our focus on the concurrent part of Erlang. Not only will we talk about concurrency, parallelism and design patterns. We will also talk about the OTP, supervisors, and how we can make our programs truly fault tolerant.
If you are new to the language, I suggest you start with my other course, which will lay the foundation for this one, and provide you with all the tools you need.
So, if any of this sounds interesting to you, give it a try and tell me what you think.