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
Ellie Fairholm and Josep Giralt D’Lacoste edited by Nicole Tache The days of separate dev and ops teams are over—knowledge silos and the...
New
PragmaticBookshelf
Bruce A. Tate @redrapids and Sophie DeBenedetto @SophieDeBenedetto edited by Jacquelyn Carter @jkcarter The days of the traditional requ...
New
CinderellaMan
Create a cryptocurrency trading bot in Elixir (YouTube videos, ebook pay what you want) <span class="hashtag-icon-placeholder"></span>eli...
New
PragmaticBookshelf
Andrea Leopardi @whatyouhide edited by Jacquelyn Carter @jkcarter TCP, UDP, DNS, HTTP, and more: these are the network protocols that ma...
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
peerreynders
An Outsider’s Guide to Statically Typed Functional Programming by Brian Marick This book is about using statically typed functional p...
New
AstonJ
by Dave Thomas This book is the introduction to Elixir for experienced programmers, completely updated for Elixir 1.6 and beyond. Explor...
New
AstonJ
by Ben Marx, José Valim, Bruce Tate Bring Elixir into your company, with real-life strategies from the people who built Elixir and use i...
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
New

Other popular topics Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
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
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

We're in Beta

About us Mission Statement