Live Demo
Open this page in two tabs to see real-time sync.
What it solves
Clear outcomes, no marketing language.
- Demonstrates bidirectional real-time communication : not just polling.
- Socket.IO upgrades to WebSocket when available, degrades to HTTP long-polling when it can't.
- In-memory message store means zero database overhead : the server restarts clean.
How it works
Real-time message flow, server to screen.
Decisions
The tradeoffs that shape this system.
Socket.IO negotiates the best transport automatically: WebSocket in modern browsers, HTTP long-polling behind restrictive proxies. The backend also exposes REST endpoints so any HTTP client can participate without a WS library.
Messages live in a Python list, capped at 200. No database, no cleanup jobs. A restart wipes history : acceptable for a demo, and it means zero ops burden.
No auth : just a nickname. Keeps the friction to zero for portfolio visitors. Heartbeat-based presence tracking auto-removes stale users after 30 seconds.
Next steps
Planned improvements, kept realistic.
- Chat rooms / channels with separate namespaces.
- Typing indicators and read receipts.
- Persistent message history with SQLite (opt-in).
- Rate limiting per-user to prevent spam.