Jose Responds To Elixir LiveView Not Good Enough
Based on The PrimeTime's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
Phoenix LiveView’s real-time model is built around coordinating server-rendered updates with client behavior rather than treating external DOM libraries as automatic disqualifiers.
Briefing
The central fight is over what counts as a “ceiling” for server-driven UI—especially Phoenix LiveView—and whether using client-side DOM libraries (like sortable drag-and-drop) undermines LiveView’s real-time promise. Jose Valim, creator of Elixir and the LiveView ecosystem, argues that modern web apps inevitably juggle both server state and client state, and that real-time UX only works when the framework treats those states as first-class concerns rather than pretending one side can be ignored.
The dispute starts with a long tweet thread claiming LiveView is “not good enough,” with examples of apps being “broken in seconds” and complaints that LiveView’s approach can be janky or fragile. The counterpoint is that LiveView’s model is designed for rich interactivity while keeping server-rendered HTML and real-time updates coordinated. In practice, the conversation narrows to a specific claim: if a UI interaction relies on external client-side DOM manipulation (for instance, drag-and-drop via SortableJS), that shouldn’t automatically be treated as a failure of LiveView. Instead, it can be the exact kind of “client-side behavior” LiveView is meant to support through integration points.
Jose’s article reframes the whole argument around state synchronization. Web pages can become stale immediately after render because other actors may change the underlying data—new comments, updated availability, or a user clicking “buy” before the server confirms success. That same mismatch appears even when only one user is involved: optimistic UI can show a “success” state that later gets corrected, and collaborative editing can create merge conflicts when multiple users change overlapping fields. The core message is that client-side state (even if it’s just input text) exists whether or not a framework encourages it, and large “client caches” that must stay in sync are a common source of bugs.
From there, the article defines “real time” as the server sending updates on a short cadence (seconds, not minutes) and stresses that real-time doesn’t mean blindly overriding what the user is doing. A collaborative editor might synchronize text instantly, but a category dropdown changing out from under a user can feel jarring unless the UI communicates what changed and why. LiveView’s approach is to keep a long-lived connection (a websocket “long pole”) and to control how updates are propagated and rendered so they remain cheap and performant.
To handle the tricky gap between what the client does immediately and what the server confirms later, LiveView uses an internal clock/sequence mechanism. When events are pushed to the server, LiveView tags updates with an always-increasing identifier; the client queues or applies server responses only when they match the most recent identifier, preventing “rollback” from older debounced events after a user submits. Jose positions this as a practical solution to a classic problem: inflight requests and out-of-order responses can otherwise undo UI state.
The discussion ends by broadening the lens: LiveView isn’t trying to eliminate JavaScript entirely, but to reduce the amount of custom client glue needed for production-grade real-time apps. Offline mode is acknowledged as a limitation, and the conversation also touches on performance tradeoffs (server-rendered HTML vs JSON) as context-dependent. The takeaway is less about winning a framework purity contest and more about whether the stack enables complex, multi-user, near-real-time experiences with fewer moving parts and fewer synchronization bugs.
Cornell Notes
The dispute over Phoenix LiveView centers on whether “server-driven” UI has a ceiling when real interactions require client-side DOM libraries. Jose Valim’s response reframes the issue: web apps always contain both server state and client state, and real-time UX only works when a framework treats both as first-class. LiveView keeps a websocket connection to coordinate server-rendered updates and uses a clock/sequence identifier to prevent stale, out-of-order server responses from rolling back newer client actions (e.g., debounced input followed by submit). The result is a model for rich, interactive, near-real-time applications without forcing developers to hand-build complex synchronization logic for every UI pattern.
Why does the “ceiling” argument about LiveView and external DOM libraries miss the point?
What problem does Jose Valim identify as fundamental to web apps: server state or client state?
How does the “clock” mechanism prevent UI rollback in LiveView?
Why doesn’t “real time” mean “override the user with the latest server data”?
What does LiveView’s websocket connection buy developers in real-time apps?
What limitations are acknowledged, and what does the stack still require?
Review Questions
- In the email debounce + submit scenario, what specific failure mode does LiveView’s clock/sequence mechanism prevent?
- How does the transcript distinguish “real-time updates” from “overriding the user,” and what UI consequence is used to illustrate the difference?
- Why does the argument treat client-side state as unavoidable even in server-driven frameworks?
Key Points
- 1
Phoenix LiveView’s real-time model is built around coordinating server-rendered updates with client behavior rather than treating external DOM libraries as automatic disqualifiers.
- 2
Web apps inherently face staleness: server data can change immediately after render, and client-side in-progress state (like inputs) exists before the server confirms it.
- 3
Ignoring client state leads to synchronization bugs, especially when client caches must stay consistent with server truth.
- 4
Real-time UX requires thoughtful presentation of updates; fast synchronization doesn’t mean the UI should silently replace what the user is doing.
- 5
LiveView’s clock/sequence identifier prevents older, out-of-order server responses (from debounced or inflight events) from rolling back newer user actions.
- 6
LiveView uses a long-lived websocket connection to keep updates coordinated and performant, reducing overlap risks with what the user is currently viewing.
- 7
Offline mode remains a notable limitation, and some JavaScript integration is still often necessary for complex interactions.