Skip to Content

Posts tagged with Programming

Introducing OTP Applications: Building Reusable, Deployable Components

When you move from a handful of modules to a full‑blown system, you soon discover the need for a framework that can:

  • Group related modules together.
  • Describe what other components your code needs.
  • Start everything with a single call.
  • Provide a clean way to ship a self‑contained release.

That framework is the OTP application. In the Erlang/Elixir world an OTP application is a small, self‑describing package that the runtime can start, stop, and supervise. This article explains the anatomy of an OTP application, shows how mix helps you generate it, and demonstrates how to bring in

Introducing OTP Applications: Building Reusable, Deployable Components Read More

Supervising Processes in Elixir: From Simple Workers to Dynamic Trees

When you build a concurrent system with Elixir, the real magic happens not only in the code that processes data, but also in the way you organize those processes. Supervisors, child specifications, the Registry, and dynamic supervision together give you a fault‑tolerant architecture where errors are contained, resources are cleaned up, and the whole system can be started or stopped reliably.

In this article we will walk through the essential concepts, illustrate each of them with fresh examples from a fictitious “smart‑home” domain, and explore the trade‑offs you may encounter when choosing restart strategies or temporary workers.

Supervising Processes in Elixir: From Simple Workers to Dynamic Trees Read More