Managing Real-Time State with Phoenix Channels and Presence
Learn how to use Phoenix Channels and the Presence module to manage real‑time user state across distributed clusters without relying on a central database.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to use Phoenix Channels and the Presence module to manage real‑time user state across distributed clusters without relying on a central database.
Turbo Streams let a Rails app push small HTML fragments to the browser over WebSocket or Server‑Sent Events, updating only the parts of the page that need it. This guide shows the essential code, explains how the browser processes streams, and lists limits and common pitfalls.
Learn how to diagnose and fix Socket.io connection failures where clients get stuck in 'polling' mode due to CORS, proxy header issues, or missing sticky sessions.
Learn how to synchronize state across distributed Phoenix nodes using PubSub to build scalable, real-time bidirectional communication.
A decision guide for scaling Socket.IO beyond a single Node.js process: compare in-memory, sticky sessions, and the Redis adapter with a concrete two-node validation test.
Learn how Glitch’s live‑code collaboration uses WebSockets and Operational Transform to merge edits, the hot‑reload cycle that instantly updates your app, and the permission model that keeps projects safe. A step‑by‑step example shows you how to verify the flow and what trade‑offs to watch for.
Canva’s real‑time collaboration relies on a central server, WebSocket delta pushes, and operational transformations. This blog walks through how changes sync across clients, shows a live test you can run, and discusses latency, conflict resolution, and scalability trade‑offs.
Explore the architecture of Mattermost's WebSocket-based real-time synchronization, focusing on the pub/sub mechanism, session boundaries, and recovery from connection drops.
Reflex state must live on rx.State or rx.ComponentState subclasses — plain Python variables are not reactive. Learn when to use shared state versus component-scoped state, and how to verify the behavior.