small medium large xlarge

Designing Elixir Systems with OTP: Write Highly Scalable, Self-Healing Software with Layers

by

Cover image for Designing Elixir Systems with OTP

Designing Elixir Systems with OTP

Write Highly Scalable, Self-Healing Software with Layers

by

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.

Choose Your Format(s)

  • $21.95 In Stock
    • Beta: What do I get?

  • Ebooks are DRM free.

  • Ebook delivery options.

  • The Paper Book will ship on 2019-08-10 (roughly).

About this Title

Skill-meter-5-8
Pages: 250 (est)
Published: 2019-08-10
Release: B4.0 (2019-06-25)
ISBN: 978-1-68050-661-7

Elixir is gaining mindshare as the programming language you can use to keep your 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 Need

Elixir Version 1.7 or greater.

Contents & Extracts

This book is currently in beta, so the contents and extracts will change as the book is developed.

  • Introduction
    • Build Your Project in Layers excerpt
      • We Must Reimagine Design Choices
      • Choose Your Layers
      • Begin with the Right Data Types
      • Build Your Functional Core
      • Establish Your Boundaries
      • Test Your Code
      • Plan Your Lifecycle
      • Invoke your Workers
      • Do Fun Things with Big, Loud Wildebeests
  • Do Fun Things
    • Know Your Elixir Datatypes
    • Primitive Types
    • Lists
    • Maps and Structs
    • Strings
    • Tuples
    • Functions As Data
    • When To Leave Elixir
    • Know Your Elixir Datatypes
  • Start With The Right Data Layer
    • Access Patterns Shape Data Structures
    • Immutability Drives Everything
    • Try It Out
    • Start With the Right Data
  • Build a Functional Core
    • Organize Core Functions by Purpose
    • Compose a Quiz From Functions
    • Build At a Single Level of Abstraction
    • Keep the Left Margin Skinny
    • Try Out the Core
    • Build Your Functional Core
  • Test Your Core
    • Simplify Tests with Common Setup Functions
    • Improve the ExUnit Infrastructure
    • Provide Test Data With Fixtures
    • Prime Tests With Named Setups
    • Make Tests Repeatable
    • Compose Within Tests
    • Take Tests Beyond the Elixir Base
    • Test Your Functional Core
  • with Big, Loud Wildebeests
    • Isolate Process Machinery in a Boundary
      • Maintain Composition Through Uncertainty
      • Build Your Optional Server
      • Wrap the Server in an API
      • Prefer Call Over Cast to Provide Back Pressure excerpt
      • Extend Your APIs Safely
      • Wrap Your Core in a Boundary API
    • Lifecycle
      • Understand Lifecycles
      • Configure Applications to Start Supervisors
      • Start Per-User Processes with a Dynamic Supervisor
      • Touch Up the API layer
      • Manage Your Lifecycles With Supervisors
    • Workers
    • Test the Boundary
    • Put Them Together As Components

Author

James Edward Gray, II has been a full time programmer for over 15 years. He has worked with Ruby, Elixir, Elm, and more to tackle challenges in Market Research, Education, Medicine, Finance, and other interesting domains. James is inspired by the sharing of knowledge in the programming communities by contributing documentation, code, and books.

Bruce Tate is a programmer and CEO of Groxio where he is helping to redefine how computer languages are taught and learned. He’s the author of Seven Languages in Seven Weeks and Programming Phoenix among other titles and has been involved with Elixir from the very beginning.