Glossary entry

Awareness protocol

In a nutshell

The small, ephemeral channel that broadcasts presence information — cursor positions, user names, colour assignments — alongside the durable document edits in a CRDT-backed editor.

Document edits and presence updates have different lifetimes. An edit is durable: once one user types a character, every other user needs to see it forever. A cursor position is ephemeral: it matters only while the user is in the room, and when the user disconnects the cursor should vanish.

The awareness protocol is the channel that carries the ephemeral half. In Yjs, it's a separate message stream where each connected client periodically broadcasts a small state object — typically their name, their assigned colour, and the current cursor and selection range. Other clients render that state as the coloured cursors and live highlights you see in collaborative editors.

Because awareness is ephemeral, it doesn't need the conflict-resolution machinery of the CRDT. The last update wins, stale state is timed out after a few seconds of silence, and a client that disconnects simply stops broadcasting. The result is the feel of presence — names that appear and vanish naturally as people join and leave — without polluting the document history with cursor noise.

Where this term comes up

Related terms

Browse the full glossary

19 terms covering CRDTs, WebRTC, JWTs, and the rest of the catalogue.

All glossary entries →