Designing Elixir Systems With OTP: Write Highly Scalable, Self-healing Software with Layers
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 Need:

Elixir Version 1.7 or greater.

1130966250
Designing Elixir Systems With OTP: Write Highly Scalable, Self-healing Software with Layers
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 Need:

Elixir Version 1.7 or greater.

41.95 In Stock
Designing Elixir Systems With OTP: Write Highly Scalable, Self-healing Software with Layers

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

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

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

Paperback

$41.95 
  • SHIP THIS ITEM
    In stock. Ships in 1-2 days.
  • PICK UP IN STORE

    Your local store may have stock of this item.

Related collections and offers


Overview

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 Need:

Elixir Version 1.7 or greater.


Product Details

ISBN-13: 9781680506617
Publisher: Pragmatic Bookshelf
Publication date: 01/07/2020
Pages: 248
Product dimensions: 7.50(w) x 9.25(h) x (d)

About the 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.

Table of Contents

Acknowledgments ix

Introduction xi

1 Build Your Project in Layers 1

We Must Reimagine Design Choices 1

Choose Your Layers 2

Begin with the Right Datatypes 5

Build Your Functional Core 6

Establish Your Boundaries 8

Test Your Code 12

Plan Your Lifecycle 13

Invoke Your Workers 15

Do Fun Things with Big, Loud Worker-Bees 15

Part I Do Fun Things…

2 Know Your Elixir Datatypes 21

Primitive Types 22

Lists 23

Maps and Structs 25

Strings 28

Tuples 31

Functions as Data 32

When to Leave Elixir 34

Know Your Elixir Datatypes 34

3 Start with the Right Data Layer 37

Access Patterns Shape Data Structures 38

Immutability Drives Everything 41

Try It Out 44

Start with the Right Data 50

4 Build a Functional Core 53

Organize Core Functions by Purpose 54

Compose a Quiz from Functions 61

Build at a Single Level of Abstraction 64

Keep the Left Margin Skinny 68

Try Out the Core 70

Build Your Functional Core 73

5 Test Your Core 75

Simplify Tests with Common Setup Functions 77

Improve the ExUnit Infrastructure 78

Provide Test Data with Fixtures 80

Prime Tests with Named Setups 84

Make Tests Repeatable 88

Compose Within Tests 91

Take Tests Beyond the Elixir Base 95

Test Your Functional Core 97

Part II …with Big, Loud Worker-Bees

6 Isolate Process Machinery in a Boundary 101

Maintain Composition Through Uncertainty 102

Build Your Optional Server 106

Wrap the Server in an API 116

Prefer Call Over Cast to Provide Back Pressure 125

Extend Your APIs Safely 128

Wrap Your Core in a Boundary API 130

7 Customize Your Lifecycle 131

Understand the Lifecycle Building Blocks 132

Configure Applications to Start Supervisors 136

Start Per-User Processes with a Dynamic Supervisor 140

Touch Up the API Layer 147

Manage Your Lifecycles with Supervisors 151

8 Summon Your Workers 153

Know Your Motivations 154

Know Your Tools 155

Add a Proctor to Run Timed Quizzes 162

Summon Your Workers 171

9 Assemble Your Components 173

Add Persistence as a Boundary Service 173

Integrate MasteryPersistence into Mastery 181

Integrate Your OTP Dependencies into Phoenix 183

Organize Code for OTP Abstractions 186

Build Scenic Projects with Layers 191

Assemble Your Components 193

10 Test the Boundary 195

Tests Call the API as a User Would 196

Isolate the Proctor's Boundary Concerns 203

Test Your Boundary 210

Bibliography 211

Index 213

From the B&N Reads Blog

Customer Reviews