Drop "The Supervision Tree"
Torey Heinz
committed Feb 22, 2026
commit 19f838436aa9fb7f266bece66044b58e8495ffa3
Showing 1
changed file with
0 additions
and 29 deletions
slides/03-real-world.html
+0
-29
| @@ | @@ -88,35 +88,6 @@ |
| </aside> | |
| </section> | |
| - | <section> |
| - | <h2>The Supervision Tree</h2> |
| - | <p class="muted small">The actual <code>application.ex</code> — entry point that starts every process</p> |
| - | |
| - | <pre class="small-code"><code class="language-elixir" data-trim> |
| - | def start(_type, _args) do |
| - | children = [ |
| - | Marketing.Repo, # Database |
| - | MarketingWeb.Endpoint, # Web server |
| - | {Phoenix.PubSub, ...}, # PubSub |
| - | {Finch, ...}, # HTTP client |
| - | Marketing.EmailRateLimiter, # ← Rate limiter process |
| - | {Oban, ...} # ← Job queue |
| - | ] |
| - | |
| - | Supervisor.start_link(children, strategy: :one_for_one) |
| - | end |
| - | </code></pre> |
| - | |
| - | <p class="fragment" style="font-size: 0.7em; color: #555;"> |
| - | In <strong>Rails</strong>: Puma + Sidekiq + Redis + custom daemon.<br/> |
| - | In <strong>Elixir</strong>: one unified supervision tree. |
| - | </p> |
| - | |
| - | <aside class="notes"> |
| - | This is the actual application.ex. Every process in this list is supervised. If the rate limiter crashes, the supervisor restarts it. If the web server crashes, same thing. In Rails, you'd need separate processes — Puma, Sidekiq, Redis, maybe a custom daemon. In Elixir, it's one unified tree. |
| - | </aside> |
| - | </section> |
| - | |
| <section> | |
| <h2>The Rate Limiter</h2> | |
| <p class="muted small">A GenServer using a token bucket algorithm</p> | |