gemini-3-flash-preview| input: $0.5 | output: $3.0 | context: 1_000_000 | rpm: 5 | rpd: 20 (cost: $0.02) · Anfrage: 2026-04-28T17:59:10.413578
Generated by rs-summarizer Version unbekannt
Review Group: This material is best reviewed by a Technical Architecture Review Board or Senior Engineering Leadership. These individuals are responsible for long-term system maintainability, data integrity, and evaluating the trade-offs between traditional CRUD (Create, Read, Update, Delete) patterns and Event-Driven Architectures (EDA).
In this technical retrospective from ElixirConf US 2025, Aaron Votre explores the architectural synergy between Phoenix LiveView and Event Sourcing within a startup environment (Bright Harbor). The talk identifies three primary failure modes of traditional CRUD architectures at scale: performance degradation due to query complexity, accidental code complexity from side-effect coupling, and fragile asynchronous workflows.
Votre argues that Event Sourcing—treating every state change as an immutable, append-only event—solves these issues by decoupling the "Write" and "Read" models. By using "Projectors" to transform event streams into optimized read tables and leveraging Elixir’s PubSub, the system achieves global reactivity and "constant time" reads. The presentation highlights a critical production incident where the immutable nature of the event log acted as a safety net, allowing the team to fix bugs and "replay" history to restore data integrity without manual database surgery. The session concludes that the combination of LiveView and Event Sourcing significantly reduces "innovation tokens" spent on maintenance, enabling faster feature delivery and robust business intelligence.
0:01:11 - The Architectural Shift: Transitioning from seven years of GraphQL/Absinthe to a pure Phoenix LiveView and Event Sourcing stack.
0:03:02 - The "CRUD Trap" and Scaling Debt: Evolution of a system from simple queries to bloated, denormalized tables and thousand-line materialized views to maintain performance.
0:07:05 - Accidental Complexity in Side Effects: Business functions (e.g., make_purchase) become unreadable as they are forced to manage downstream side effects like Slack notifications, emails, and BI tasks.
0:08:59 - Background Job Fragility: Standard background jobs (e.g., Oban) often become coupled, where each job must know exactly what the "next" step in the workflow is.
0:11:00 - The Event Sourcing Promise: Moving to an append-only, immutable JSON event store. Decoupling the Write Model (Event Store) from the Read Model (Projections).
0:15:21 - Mechanics of Projectors: Introduction of "Projectors" as the bridge. They read events exactly once, in order, and update the Read Model.
0:21:52 - Integration with Phoenix PubSub: Using PubSub to broadcast projection updates to LiveView clients.
0:26:24 - The "Lost SMS" Incident (Crisis & Recovery): A production bug caused an SMS to be missing from the UI. Unlike CRUD, where data might be lost or require manual DB insertion, the data existed in the immutable event store.
0:32:00 - Performance & Spaghetti Reduction: Creating specific projections for specific pages (e.g., an Admin Timeline vs. a Client Timeline).
0:35:01 - Event-Driven Workflows: Replacing coupled jobs with "Handlers" that listen for specific events (e.g., FileUploaded triggers CategorizeFile).
0:38:51 - Business Outcomes: Four engineers managed to build a robust, recoverable system with low operational costs and high-fidelity analytics.