Chat room server Rust, open source, 2026
The chat server is the backend for a live chat app, with rooms, messages, who's online and who's typing.
Everything arrives over one open connection, so a message sent in one window shows up in another without anyone asking for it, and the same goes for someone starting to type, joining a room or going away. A busy room's history comes back a page at a time rather than all at once, recently used rooms and users are held in memory, and there's a limit on how fast one person can send.
A detail I cared about: if your phone sends the same message twice because the connection dropped, it still only shows up once. The same goes for creating rooms and accounts.
The limits that a server like this normally has baked into it, how big the cache is, how long a message can be, how many people fit in a room, come from a config file instead, so changing one doesn't mean rebuilding.