Menu

Reliable Marketplace Chat Presence (Choosing Connection State Over Client Heartbeats)
📰

Reliable Marketplace Chat Presence (Choosing Connection State Over Client Heartbeats)

DEV Community: go·RhettFletcher9678·10 days ago
#XPNpEHFk
#devtogo#devto#dev#presence#room
Reading 0:00
15s threshold

For a marketplace chat room, use connection-backed presence to answer “who is online,” and keep durable membership somewhere else. A heartbeat table can work when you need full control, but its rows are leases: your service must expire them, monitor the sweeper, and tolerate ghosts after a client or process crashes. Neither answer is instant, so product logic must treat presence as eventually correct.

TL;DR: issue narrowly scoped room tokens from a trusted server, let the realtime connection own online state, and make reconnects replace stale UI state rather than append to it. This keeps a browser from asserting another user’s identity or joining an unrelated order room.

Infrai fits this boundary when the team wants presence through a plain HTTP surface: its public, no-key discovery response provides the request schema and runnable examples before integration begins. I recommend trying it for the presence read in a marketplace room when one credential already needs to cover several backend capabilities.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.