Skip to content

Use case

Collaborative interfaces

Two people editing the same thing need three answers continuously: who else is here, what did they just do, where is their cursor. Presence, events and client events answer them in turn.

presence-doc-9f2
  • presence channels
  • client events
  • events
  • private-encrypted channels

How it works

  1. 01Join the documentA presence channel per document, authorised by your server at subscribe time.
  2. 02Show who is hereThe member list arrives with the subscription; events keep the avatars honest.
  3. 03Broadcast intentCursors and selections are client events — high-frequency and disposable.
  4. 04Commit changesDurable edits go through your server, then publish — so everyone converges on stored state.

Worth knowing

Client events are rate-limited and not persisted — they suit cursors, not edits. Anything that must survive a refresh goes through your server.

In code

doc.js
js
const doc = pusher.subscribe('presence-doc-9f2')// Ephemeral: straight between editors, never persisted.canvas.onpointermove = throttle((e) => {  doc.trigger('client-cursor', { x: e.clientX, y: e.clientY })}, 50)// Durable: your server persisted it, then published it.doc.bind('block-updated', (block) => applyBlock(block))

Written with the official Pusher libraries, unmodified — there is no PushCaster package to install. Full documentation

Other things people build

All use cases
presence-room-42

Realtime chat

Rooms, membership and typing indicators on presence channels.

private-user-1e9

Notifications

One server event, delivered to every surface a user has open.

private-metrics

Live dashboards

Push metrics as they change instead of polling for them.

Create an application and build it.

Support