Course Summary

By now, we know about the most important tools available in Elixir to build high-performance, highly concurrent applications. Thanks to Erlang and the BEAM, Elixir has benefited from an excellent concurrency model and a battle-tested foundation. After years of development, Elixir has also come up with abstractions built upon this foundation. As Elixir engineers, we have the luxury to choose between several high-quality libraries that are easy to scale to handle any amount of traffic. Let’s review our options.

The Task module

We can use the Task module to perform work concurrently without hassle. We can use Task.async_stream/3 to process large collections of data and provide back-pressure simultaneously.

The Genserver module

Complex tasks often need to maintain their state and run over long periods of time. This is where GenServer comes in handy. We can use it to create processes with which we can interact and solve harder problems.

The GenStage module

Sometimes, the amount of concurrent work we have to perform varies, and we are at a risk of exhausting our system resources. For example, surges of traffic frequently bring even the largest web services offline because they cannot allocate resources to handle the increased traffic. GenStage enables us to create complex data-processing pipelines that are resilient. It does so by controlling consumer demand and handling back-pressure.

The Flow module

The Flow module helps us aggregate data by leveraging GenStage under the hood. This module allows us to work with large datasets. It is also the best tool to filter, map, and reduce data.

The Broadway module

Finally, the Broadway module fills an important gap when building data-ingestion pipelines that consume external events. We can use it with message brokers and build robust event-processing systems.

The road ahead

This was a quick overview of everything we’ve learned so far. This might be the end of the course, but our journey has just begun. Now that we have completed this course, we can build even faster, more resilient applications in Elixir and focus on solving any challenges that may arise along the way. Good luck!


Get hands-on with 1200+ tech skills courses.