presence-room-42
Realtime chat
Rooms, membership and typing indicators on presence channels.
Use case
A dashboard that polls is wrong between requests, and expensive in proportion to how wrong you let it be. Publishing on change inverts that.
A metric that moves hundreds of times a second should be batched or sampled before publishing. That decision belongs where the meaning is — your side.
// Start the aggregation when the first viewer arrives,// stop it when the last one leaves.for (const event of hook.getEvents()) { if (event.name === 'channel_occupied') startAggregation(event.channel) if (event.name === 'channel_vacated') stopAggregation(event.channel)}Written with the official Pusher libraries, unmodified — there is no PushCaster package to install. Full documentation
Rooms, membership and typing indicators on presence channels.
One server event, delivered to every surface a user has open.
Shared documents, canvases and cursors with tracked membership.