AstonJ

AstonJ

Adopting Elixir (Pragprog)

by Ben Marx, José Valim, Bruce Tate

Bring Elixir into your company, with real-life strategies from the people who built Elixir and use it successfully at scale. See how Ben Marx and Bleacher Report maintain one of the highest-traffic Elixir applications by selling the concept to management and delivering on that promise. Find out how Bruce Tate and icanmakeitbetter hire and train Elixir engineers, and the techniques they’ve employed to design and ensure code consistency since Elixir’s early days. Explore customer challenges in deploying and monitoring distributed applications with José Valim and Plataformatec. This book has all the information you need to take your application from concept to production.

Adoption is more than programming. Elixir is an exciting new language, but to successfully get your application from start to finish, you’re going to need to know more than just the language. The case studies and strategies in this book will get you there.

Make a business case and build a team before you finish your first prototype. Once you’re in development, form strategies for organizing your code and learning the constraints of the runtime and ecosystem. Convince stakeholders, both business and technical, about the value they can expect. Prepare to make the critical early decisions that will shape your application for years to come. Finally, manage your deployment with all of the knobs and gauges that good DevOps teams demand. Decide between the many options available for deployment, and how to best prepare yourself for the challenges of running a production application.

This book picks up where most Elixir books let off. It won’t teach you to program Elixir, or any of its tools. Instead, it guides you through the broader landscape and shows you a holistic approach to adopting the language.

Don’t forget you can get 35% off the ebook using the code ‘devtalk.com:023:

Most Liked

sasajuric

sasajuric

Author of Elixir In Action

My original plan for EiA was to discuss some medium-level concurrency patterns, and include a more involved real-world-like example inspired by a production system I worked on at the time. However, quite early in the game it became clear to me that my plan was way too ambitious :smiley:, and so I ditched patterns and the involved example.

I absolutely agree that a book which discusses various intermediate/advanced techniques would be very interesting, and that it would bring something to the table. I’d personally love a book which assumes that a reader is familiar with mechanics of Elixir/OTP/Phoenix (so it wastes no space on that), and instead it focuses more on applying various functional/concurrent techniques, explaining hows/whys along the way.

I also feel that there’s room for more than one such book. Perhaps it would be interesting to have a few shorter ones, e.g. one discussing functional techniques, another discussing concurrency/fault-tolerance, yet another focusing on troubleshooting production (basically Elixir in Anger), etc.

josevalim

josevalim

Creator of Elixir

I have thought a couple times about, for lack of a better word, a “design patterns” book. There are data/functional patterns (enum vs stream, keywords vs maps, with), application patterns (facade, behaviours, protocols), concurrency patterns (cast vs call, async replies, genstage vs gen_event, ets, registry, task, async_stream), and fault tolerance patterns (supervisor, monitoring, signal trapping, etc).

The Adopting Elixir book explores some of those and goes deep into the “dirty schedulers and nifs vs ports vs… that whole mess” one.

christhekeele

christhekeele

I think I’ve powered through the curve on my own, but I’ve always maintained that there is still a void for a really solid, Elixir-first exploration of concurrency abstrations and tooling of both OTP and Elixir-native ecosystems, since they are so unique compared to many incoming programmer’s fluencies––akin to the excellent Little Elixir and OTP Guidebook, but explicitly highlighting the common, core, intimidating decisions you must make as a fluent Elixir developer trying to understand and introduce the right abstractions into their app for the first time by robustly contrasting:

  • spawning vs linking vs monitoring
  • start vs start_link
  • signal trapping and handling
  • supervision strategies
  • cast vs call and the various clever strategies inbetween
  • keywords vs maps vs records vs structs
  • behaviours vs protocols
  • applications vs libraries
  • Enum vs Stream vs Flow
  • gen_event vs GenStage vs Flow
  • parse transforms vs macros
  • ets vs dets vs mnesia vs ecto
  • dirty schedulers and nifs vs ports vs… that whole mess

I know like this seems like a laundry list of distinctions, but I think it’d be really useful to have a resource that was explicitly indexed like this: I know of these n concepts, but I need to understand their similarities and differences better because it’s go time; preferably updated with the consistency and ease of most pragpub resources.

While I’m daydreaming, an Elixir-first example-driven analog of Erlang in Anger with all of the lovely sys tips and amazing tracing other hidden gems presented during this year’s ElixirConf would be a hell of a publication.

redrapids

redrapids

Author of Adopting Elixir

Thanks guys for the kind words. Bruce Tate, co-author of this book and line editor of the Elixir books here. I don’t know if you’ve noticed, but folks don’t always like to pay for books in other language ecosystems, and quality suffers. What I am saying in a way too verbose way is that you, the community, make all of this work, and I genuinely thank you.

The process of picking a cover is pretty simple. Authors get votes, and the prag support team gets votes. Our team builds a half dozen covers or so, and then if we don’t like them we build more. I think this system lets us get the egos out of the room, and we can generally converge on something interesting. My favorite book covers of all time were the tower of Babel for the initial seven languages book and the passport for the second seven language book.

On how we choose our books, the process is very much the same. We get proposals, some hand delivered (to me, or the prags), and then we have two meetings per month to talk about them. We vote on whether we’d like to publish. The owner doesn’t throw his weight around, and the editors don’t either. Everyone gets a fair chance. That leads to interesting books, often on topics we hadn’t considered. So if you want to write an Elixir book, it’s hard but you can just drop me an electronic note (bruce at rapidred dot com) and I’ll tell you if someone is already writing a book, or to write a proposal. Then it’s pure darwin. We’ll look at the topic with the committee, and if we like it we’ll read your TOC and sample chapter and give you a thumbs up or down.

Let’s see some proposals!

On the Elixir ecosystem and books you like and would like to see, are there any books that you need that we don’t provide? Here’s what we’re thinking now:

  • a graph QL book
  • an Ecto book
  • an advanced book on API and service design with OTP, Phoenix, and Elixir
  • a book on Nerves
  • Lance’s book will eventually have Elm

And of course the stuff we’ve already announced. Is there anything else we’re missing?

josevalim

josevalim

Creator of Elixir

The book is broken in three parts, the first two (concept and development) are still relevant and up to date. The third part is slightly outdated, which is where Elixir and ecosystem have mostly solidified in the last years. It has three chapters:

  1. On the releases chapter, we talked about distillery but releases are now part of Elixir. Some specific instructions are now outdated but I would say though most of the lessons are still appropriate. You can close the gap by reading Elixir docs for releases

  2. On metrics and performance, we have unified around telemetry, so a good amount has changed. This is probably the most outdated chapter now but there are a lot of resources online too

  3. “Making your app production ready” is mostly up to date, maybe two or three links that would need to be updated

Where Next?

Popular in Books Top

PragmaticBookshelf
Sean Moriarity @seanmor5 edited by Tammy Coron @Paradox927 From finance to artificial intelligence, genetic algorithms are a powerful t...
New
AstonJ
https://www.packtpub.com/sites/default/files/B04907_MockupCover_Normal.jpg by Kenny Ballou Elixir, based on Erlang’s virtual machine a...
New
DevotionGeo
https://www.packtpub.com/web-development/phoenix-web-development
New
CinderellaMan
Create a cryptocurrency trading bot in Elixir (YouTube videos, ebook pay what you want) <span class="hashtag-icon-placeholder"></span>eli...
New
AlchemistCamp
EARLY ACCESS (currently in writing, estimated length: 40 pages) Hi. I’m Mark and over the past two and a half years, I’ve been teaching ...
New
Eiji
The Ecto recipes were originally written for the “What’s new in Ecto 2” ebook and then made open-source by Plataformatec. Since then, the...
New
peerreynders
Don’t forget you can get 35% off the ebook using the code: devtalk.com :023: Note: Check out this thread for help running code in lat...
New
PragmaticBookshelf
Peter Ullrich (@PJUllrich) edited by Michael Swaine @michaelswaine Data is at the core of every business, but it is useless if nobody ca...
New
peerreynders
Build Highly Scalable Systems with Channels https://imagery.pragprog.com/products/593/sbsockets.jpg?1566562141 Don’t forget you can ...
355 15772 140
New
AstonJ
by Lance Halvorsen Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
460 27162 124
New

Other popular topics Top

chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

We're in Beta

About us Mission Statement