Understand the Lifecycle Building Blocks

We’ll risk sounding like a broken record to say your project may never need to create its own processes. Many projects are libraries, meaning they’ll never need to have their own service layer. They don’t need start links or supervisors at all. In the terms we’ve discussed so far, these libraries will never use the “big, loud worker-bee” layers.

When your project does need processes, it will often use the OTP architecture. OTP might be overkill for some use cases but most often, OTP lets your processes exist seamlessly with others that need the common lifecycle services we’ll discuss in the sections that follow. For example, a common OTP architecture means when you start Phoenix, it automatically starts ...

Get Designing Elixir Systems With OTP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.