How Can I Deepen My Understanding of OTP and GenServer?

Hello everyone,

I’m currently reading Elixir in Action (3rd Edition), and I’d like some advice on how to deepen my understanding of OTP and GenServer.

What kinds of projects would you recommend building to really master these concepts? I already have experience with Elixir, Phoenix, and LiveView, and I’ve built several production-level applications. However, I want to go beyond the basics and gain a stronger understanding of OTP design patterns, supervision trees, process communication, fault tolerance, and distributed systems.

I’d appreciate any project ideas, learning resources, or advice from developers who have gone through this journey.

Thanks :heart: !

4 Likes

I worked through this book. It helped me a lot.

“Concurrent data processing in Elixir by Svilen Gospodinov”

And the erlangelist blog

4 Likes

I don’t know why everyone is so fixated on GenServer. It’s not the only abstraction and I’ve found that I reach more often for :gen_statem.

On topic, this book is gold.

3 Likes

and

are both really valuable. I find that Francesco Cesarini’s writing flows well and is easy to follow.

5 Likes

For web sources someone already mentioned Saša Jurić’s awesome blog https://www.theerlangelist.com/ which is an excellent resource for any topic it covers.

This blog actually helped me a lot when I was first trying to wrap my head around GenServers: Elixir, A Little Beyond The Basics I believe the author is Karl Seguin, but I’m not familiar with any other work from them. Start at part 6 “Processes” and read on from there. It helped a lot for me to have the concepts explained in terms of the other OTP primitives.

If you want a project to get some practice, try implementing a job-scheduler like cron using GenServers and message passing. Or just a background task scheduler with PubSub in a Phoenix app if you’re web-focused. :slight_smile: