What awareness covers
An awareness protocol synchronizes the small volatile facts about each participant: cursor, selection, name, color, and whether they are typing. Unlike document edits, awareness is not persisted and does not need ordering guarantees, only freshness.
How it spreads
Each client owns a small awareness state object and broadcasts it whenever it changes. Other clients keep a map from client id to that state. A higher clock counter on each update lets receivers ignore stale messages that arrive late.
Cleaning up
Because users disconnect abruptly, awareness entries carry a timeout. If no update arrives within the window the entry is dropped, removing the ghost cursor.
Keeping awareness on a lightweight channel means a storm of cursor moves never competes with durable document updates.
Key idea
An awareness protocol gossips volatile per user state with counters and timeouts so the room stays fresh without persistence.