About This Title

Pages: 74
Published: June 2022
ISBN: 9781680509687
In Print

Skill Level Meter

Programmer Passport: OTP

by Bruce Tate

OTP is the heart of the rapidly growing Elixir, the functional language at the heart of Phoenix and LiveView. OTP enables exciting concurrent applications with among the best reliability properties in the world. With this book, you’ll learn to code systems that can detect failure and recover from it automatically using the same techniques behind the world’s telecommunication systems. By plugging into OTP, your own libraries will handle concurrent requests robustly, and seamlessly integrate with other supervised Elixir and Erlang applications. If you’re looking to take your next step as an Elixir developer, look no further than OTP.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $15.00 (USD)

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


OTP is a library for building fault tolerant systems with self-healing properties; its services power many of the world’s reliable telecom infrastructure. It also powers many of Elixir’s most powerful capabilities. In this fast-paced book—first published with Groxio’s Programmer Passport—you’ll learn about the most important abstractions that power OTP. This approachable guide will give you a high-level understanding before diving into individual details. This understanding will tell you how the core APIs work so you’ll know why Elixir programmers write code the way they do.

To start, this guide will walk you through building your own basic service that works in the same way as OTP’s foundational GenServer. This quick exercise will gently ease you into the way GenServers work. You’ll build your own GenServer, and then quickly move on to adding the supervision services to enable the reliability and self-healing properties that make Elixir famous. Once you’ve done so, you’ll add features like a dynamic supervisor, and use a process registry to make your program more flexible and dynamic.

Find out what Groxio customers already know. The assistance of an experienced guide will help you learn how to use OTP to build reliable, highly concurrent systems more quickly than you could without one.

What You Need

You’ll need Elixir version 1.12 or greater.

Resources

Releases:

  • P1.0 2022/06/14

Contents & Extracts

Preface

  • A Basic Handmade Server
    • Build a Server with a Process
    • Build the Boundary Layer
    • Build an OTP Server, With Mix
    • Your Turn
  • Communication Between Servers excerpt
    • Anatomy of a GenServer
    • handle_info Processes Nonstandard Messages
    • Schedule an Alarm with handle_cast
    • Implement a Status Message with handle_call
    • Your Turn
  • The Lifecycle and Supervision excerpt
    • The Primitive Mechanisms
    • OTP Supervisors Manage GenServer Lifecycles
    • Add Some Children
    • Lifecycle Policy
    • Your Turn
    • Next Time
  • The Power of a Name
    • Add Dynamic Characters to SuperDuper
    • Dynamic Children
    • Dynamic Supervisors
    • The Process Registry: The Power of a Name
    • Your Turn
    • Next Time

Author

Bruce A. 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. He’s written more than 10 books.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $15.00 (USD)

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

Related Titles:

Skill Level Meter

About This Title

Pages: 74
Published: June 2022
ISBN: 9781680509687
Edition: 1
In Print