Jump to ratings and reviews
Rate this book

Designing Elixir Systems with OTP

Rate this book
You know how to code in Elixir; now learn to think in it. Learn to design libraries with intelligent layers that shape the right data structures, flow from one function into the next, and present the right APIs. Embrace the same OTP that's kept our telephone systems reliable and fast for over 30 years. Move beyond understanding the OTP functions to knowing what's happening under the hood, and why that matters. Using that knowledge, instinctively know how to design systems that deliver fast and resilient services to your users, all with an Elixir focus. Elixir is gaining mindshare as the programming language you can use to keep you software running forever, even in the face of unexpected errors and an ever growing need to use more processors. This power comes from an effective programming language, an excellent foundation for concurrency and its inheritance of a battle-tested framework called the OTP. If you're using frameworks like Phoenix or Nerves, you're already experiencing the features that make Elixir an excellent language for today's demands. This book shows you how to go beyond simple programming to designing , and that means building the right layers. Embrace those data structures that work best in functional programs and use them to build functions that perform and compose well, layer by layer, across processes. Test your code at the right place using the right techniques. Layer your code into pieces that are easy to understand and heal themselves when errors strike. Of all Elixir's boons, the most important one is that it guides us to design our programs in a way to most benefit from the architecture that they run on. The experts do it and now you can learn to design programs that do the same. What You Elixir Version 1.7 or greater.

250 pages, Paperback

Published August 10, 2019

Loading interface...
Loading interface...

About the author

James Edward Gray II

4 books1 follower

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
16 (22%)
4 stars
25 (35%)
3 stars
28 (39%)
2 stars
2 (2%)
1 star
0 (0%)
Displaying 1 - 8 of 8 reviews
Profile Image for Sebastian Gebski.
1,043 reviews1,024 followers
December 29, 2019
I wanted to love this book, but I've failed.

I expected the main focus to be on exploring & presenting (to the reader) the expressive power of syntactic & idiomatic constructs of Elixir/Erlang & OTP - I kinda DID get that, but in a very shallow & uninspiring (nearly tutorialesque) way. All the techniques & patterns presented in the book (except the worker-bee sentence that guides the whole structure) are really the basics of writing Elixir code - the key design concept is just hiding gen_server implementations behind a layer of service functions ... I was expecting that authors will AT LEAST propose some ways to mark internal APIs (as behaviors, delegates, anything), decouple contract parts from schemas - but I didn't get any ideas like that :(

The good parts? I like how authors gently introduce the area of functional composability - it's tricky to learn (especially when you come from OOP community), but when you got it - it truly makes a difference.

Just so you know - the book doesn't refer to any well-known architecture decomposition model (e.g. hexagons, C4). Neither it does touch the topic of static design validation (like in A. Tornhill's books).

In general - it's probably the worst Elixir/Erlang book in PragProg library :( If you want a good book of functional design, try Wlaschin's "Domain Modeling Made Functional" - yes, it's not about Elixir, but trust me - you'll get more value out of it anyway.
Profile Image for Bodo Tasche.
96 reviews12 followers
March 11, 2020
So I have some mixed feelings about this book. Some things are explained too deeply, some really interesting and complex parts miss tons of details. The concept itself is great and I really want to try it out in the next app I will build. Giving it 4 out of 5 because it was still interesting to read and made me think a lot.
Profile Image for Héctor Iván Patricio Moreno.
367 reviews20 followers
January 13, 2022
Excelente guía con un ejemplo a través de todo el libro que demuestra cómo aplicar un diseño en capas de un sistema OTP. Siento un poquitito forzado el mnemónico que usaron y lo mucho que se repite (pero puede ser que no me gusten los mnemónicos): "Do Fun Things with Big, Loud Worker-bees", cada letra mayúscula representando una capa:

- Datos
- Un centro Funcional
- Tests
- Boundary (Límites)
- Lifecycles (Control de ciclos de vida y supervisión)
- Workers

Me gustó la profundidad en la que lo tratan y cómo dan el código de cada cosa y el proceso que pasó por su mente para llegar a ese diseño. Se nota cómo los autores son bastante experimentados. No lo recomiendo como un libro de lectura abierta o general, ya que es muy específico a OTP y el estilo de aplicaciones concurrentes.
Profile Image for Pablo Margreff.
36 reviews2 followers
May 20, 2022
There are some good advice on building elixir application mainly if you never run anything in elixir in production. Things I liked:
- Gentle introduction on how to read and organize function code IRL.
- Good emphasis on tests, also good examples about how to do that!

Some points of improvement that would make it a more enjoyable and more useful reading:
- The project is tedious and simplistic. The requirements are very different from a real-world application. So don't freak out if the book example doesn't become useful in your job.
- While there are good concepts and some examples of OTP and supervisors, the book does not go that deep on that. Sometimes it may help more if you refer directly to the docs about process and supervisors.
Profile Image for Geoff Lanotte.
164 reviews6 followers
February 4, 2020
I will call it 2.5 stars and round up. I couldn't finish the book. I ended up skimming to see if it would resonate with me at all. I had a hard time, the book makes very large leaps. I had hoped this would really focus on how to design and build the systems - which it kind of does, but I don't think they showed their work in a way that was accessible (at least to me). There were a few helpful things that I gleaned from the book but ultimately, those could have been encapsulated in a blog post.

this could be a helpful book for someone, but I was not that person.
Profile Image for Potiguar Faga.
4 reviews
October 12, 2020
The book has lots of good information but the pace and examples made it somehow boring to follow.
Profile Image for Hoon Wee.
21 reviews1 follower
July 9, 2023
Must read for any Elixir programmers who struggles to build project & use OTP without frameworks like Phoenix. Eventually, you'll gonna be ready with any kind of OTP libraries.
Displaying 1 - 8 of 8 reviews

Can't find what you're looking for?

Get help and learn more about the design.