Search⌘ K
AI Features

Introduction to Duper

Explore the design of an Elixir application by building Duper, a duplicate file finder. Understand key concepts like organizing server processes, managing concurrency with workers, handling errors pragmatically, and structuring supervisors to ensure reliable execution.

Novice Elixir users might struggle with how to organize applications. They might ask themselves when to use servers, how supervisors fit in, and how many applications should be written.

For Elixir, the following approach might help us think through the above issues.

We should ask ourselves these five questions:

  • What’s the environment, and what are its constraints?
  • What are the obvious focal points?
  • What are the runtime characteristics?
  • What do we protect from errors?
  • How do we get this thing running?

What we’ll show in this chapter is just an ad hoc approach. Please don’t take it as a methodology. But if we’re feeling overwhelmed when designing a new Elixir system, these steps might help.

Let’s write a simple application to illustrate what we ...