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.…