Elixir Task.async_stream: Bounded Concurrency, Fault Isolation, and Back-Pressure
Use Elixir Task.Supervisor and Task.async_stream to process large datasets with capped concurrency, fault isolation, and supervised task ownership.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Use Elixir Task.Supervisor and Task.async_stream to process large datasets with capped concurrency, fault isolation, and supervised task ownership.
Learn how to implement state management in Elixir using GenServer, including the critical technical distinctions between synchronous calls and asynchronous casts.
Learn how to synchronize state across distributed Phoenix nodes using PubSub to build scalable, real-time bidirectional communication.
Decision guide for building a real-time Phoenix dashboard: compare LiveView server rendered versus REST API plus SPA, with trade-offs, constraints, and a concrete LiveView sketch for validation.
GenServer isolates state in a single process, but that state vanishes on crash. Learn the API-callback split, a working counter example, and how to monitor mailbox bottlenecks before they stall your system.
Stop syncing state between JS frameworks and APIs. Learn how Phoenix LiveView uses server-side processes and binary diffs to handle real-time UI state efficiently.
Ecto.Changeset.cast/3 whitelists permitted fields and coerces types, blocking mass-assignment attacks by construction — but it silently drops unknown keys and does no business validation. Here's how to use it well.
Ecto has no pagination module. Using limit/offset is simple but slows on deep pages. Keyset cursor pagination filters from the last seen row for stable, constant-time scrolling.
Ecto.Multi bundles multiple repo operations into one atomic transaction with named steps and structured errors. A worked example, plus the limits and mistakes that bite in practice.