About This Title

Pages: 246
Published: December 2019
ISBN: 9781680506617
In Print

Skill Level Meter

Designing Elixir Systems with OTP

Write Highly Scalable, Self-Healing Software with Layers

by James Edward Gray, II and Bruce A. Tate

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.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $24.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal


Paperback Formats:

Please support indie bookstores!
Find indie bookstores in the U.S. Find indie bookstores around the world.


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.

Resources

Releases:

  • P1.0 2019/12/11
  • B7.0 2019/11/14
  • B6.0 2019/09/25
  • B5.0 2019/08/01

Contents & Extracts

  • 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…
    • 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 Worker-Bees
    • 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
    • Customize Your Lifecycle
      • Understand the Lifecycle Building Blocks
      • Configure Applications to Start Supervisors
      • Start Per-User Processes with a Dynamic Supervisor
      • Touch Up the API Layer
      • Manage Your Lifecycles with Supervisors
    • Summon Your Workers
      • Know Your Motivations
      • Know Your Tools
      • Add a Proctor to Run Timed Quizzes
      • Summon Your Workers
    • Assemble Your Components
      • Add Persistence as a Boundary Service
      • Integrate MasteryPersistence into Mastery
      • Integrate Your OTP Dependencies into Phoenix
      • Organize Code for OTP Abstractions
      • Build Scenic Projects with Layers
      • Assemble Your Components
    • Test the Boundary
      • Tests Call the API as a User Would
      • Isolate the Proctor’s Boundary Concerns
      • Test Your Boundary

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.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $24.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal


Paperback Formats:

Please support indie bookstores!
Find indie bookstores in the U.S. Find indie bookstores around the world.

Related Titles:

Skill Level Meter

About This Title

Pages: 246
Published: December 2019
ISBN: 9781680506617
Edition: 1
In Print