Features
- Real-time messaging: Broadcast messages to all connected clients instantly
- Persistent chat history: Messages automatically saved in actor state across restarts
- Multiple chat rooms: Each room is a separate actor instance with isolated state
- Event-driven architecture: Use actor events to push updates to clients in real-time
Implementation
The chat room demonstrates core Rivet Actor patterns for real-time communication:
- Actor Definition (
src/backend/registry.ts): Defines thechatRoomactor with message history state and actions for sending messages and retrieving history



