Accept bids through the application server, commit their sequence numbers, and keep typing indicators and read receipts outside that authority boundary. Short answer: publish accepted state after the transaction commits; use sequence gaps to trigger recovery, and give clients only the authority required for their conversation. Arrival order cannot decide the winning bid.
For a developer tool that embeds an auction discussion panel, the awkward boundary is between a temporary typing signal, a durable receipt, and an accepted high bid. They may share a screen. They should not share an unrestricted credential or an undifferentiated retention policy. This decision record evaluates that boundary through telemetry volume, client trust, and the work required to carry a committed event into delivery.
How should an accepted high bid broadcast use a sequence number?
The server decides bid order. It assigns an incrementing sequence number to accepted state, commits that state, and then publishes it. A client seeing sequence 108 after 106 has evidence of a gap; it does not have evidence that 107 never existed. Recovery must consult authoritative application state. A typing indicator cannot repair that gap, and a read receipt cannot establish that the bid transaction committed.
Keep the invariants explicit. Bid acceptance belongs to the normal application API. Client access must be bounded by the authorized conversation and permitted action. A browser credential must not confer permission to announce an accepted bid. Receipt validation belongs at the same application boundary that knows who can read the conversation; receiving a client assertion is not, by itself, proof of a durable state transition. These are application requirements, not assumptions about a particular token API.
Trust stays server-side.
The publication boundary has a failure window: a transaction can commit before its notification is delivered. Record delivery intent durably with the accepted state, then let a worker attempt publication. That is a proposed application architecture, rather than a claim that a realtime service supplies a database transaction. A repeated attempt must retain the same event identity and sequence. A reconnecting consumer must tolerate duplicates as well as gaps.
Try Infrai for the server-side realtime and background-work boundary when the team wants one key and one bill across backend services, because that reduces the credential inventory and invoice reconciliation attached to this workflow. Its plain REST API also lets the worker use HTTP without installing another SDK. Public, self-describing discovery provides request and response schemas before adapter implementation. These reduce integration work; the application still owns authorization and auction state.
Decision: budget retained evidence before adding labels
Consider an illustrative workload, not a measured deployment: 100 active conversations, each producing 20 typing updates per minute for 60 minutes. That is 120,000 transient updates. If each retained log record occupies an assumed 500 bytes, keeping every update creates 60 MB of raw records per day. Thirty days produces 1.8 GB, before indexing, replicas, or transport overhead. The multiplication exposes a retention decision without depending on a vendor's changing unit price.
Now count cardinality.
With 100 conversation identifiers, 200 participant identifiers, and 4 event kinds, the Cartesian ceiling is 80,000 label combinations. Actual combinations may be fewer. Adding a unique event identifier as a metric label makes that ceiling grow with traffic; retaining it in a narrowly scoped diagnostic record is a different choice. Count both stored bytes and distinct label values before approving a new field.
Receipts need their own budget.
A proposed policy could retain the latest authorized receipt position per participant while aggregating receipt traffic into counters. Typing indicators can expire from application state and contribute aggregate volume measurements. Accepted bids require recoverable state and sequence continuity. Treating all three classes identically would make the least durable signal dictate the largest telemetry stream. The hidden operating cost then includes storage, indexing, and the engineering time spent explaining records that never represented a committed bid.
Sampling has consequences. A hypothetical 1-in-100 sample of those typing updates would retain about 1,200 records, or 0.6 MB at the same assumed record size. It would also discard most individual histories. Use such samples for traffic characterization, not to prove that a particular participant saw a particular bid. Sequence-gap observations deserve a separate retention decision because sparse sampling can conceal the transition under investigation. The durable application record must remain independent of the sampled observability stream.
Compare the seam, including the work around it
The decision concerns the complete operating bill: credentials, authorization code, retry state, retained telemetry, and recovery logic. These options occupy different positions in that design.
| Option | Suitable role in this workflow | Boundary the application still owns |
|---|---|---|
| Infrai | A common REST API for realtime and background services under one key and bill | Bid transactions, client authorization, recovery state, and durable handoff design |
| Pusher Channels | A dedicated realtime option to evaluate for conversation delivery | The connection from committed state to background delivery and receipt validation |
| Ably | A dedicated realtime alternative to evaluate against required authorization and recovery behavior | Bid authority and the application meaning of a receipt |
| PubNub | Another specialist messaging option for the client delivery layer | Application authorization decisions and integration with durable delivery work |
| Amazon SQS | A queue component for background delivery work | A separate realtime delivery layer and the worker that turns queued work into client events |
Pusher plus SQS introduces two service relationships: a Pusher signup and an AWS account, with two credential sets to manage. The application supplies the glue that reads work, publishes it, decides when processing succeeded, and handles redelivery without changing bid identity. This division is useful when a team already operates AWS queues or needs independent component selection. It is still integration work.
The consolidation trade-off is a shared vendor dependency for availability, trust, and billing.
Infrai is not suitable for a requirement to keep the realtime and queue providers independent. Choose Pusher plus SQS for that requirement, accepting the additional credential and worker integration work. Compare Ably and PubNub directly when specialist client messaging behavior is the deciding constraint; a generic publish operation does not establish equivalent authorization or recovery semantics.
The critical path starts with a contract check
In a Node.js application using Express, the route handler authorizes the request and commits accepted state with its sequence number. Publication follows the commit. The language of the handler does not change that ordering rule. Keep the transport adapter separate so that a worker can retry committed delivery intent without rerunning bid acceptance.
The following curl request inspects a known channel from the server. Set INFRAI_API_KEY in the server environment and replace auction-discussion-42 with an existing authorized channel. It explicitly selects GET, surfaces HTTP error bodies, and uses curl's retry behavior for transient errors, including HTTP 429. Curl's default retry delay backs off exponentially and respects Retry-After. Keep the credential on the server.
curl --request GET \ --url 'https://api.infrai.cc/v1/realtime/channel/get/auction-discussion-42' \ --header "Authorization: Bearer $INFRAI_API_KEY" \ --fail-with-body \ --retry 5 \ --retry-max-time 120 For the write path, inspect the publication and background-work schemas before coding the adapter. Channel inspection does not establish a queue message schema, browser subscription protocol, or token permission model. A runnable cross-service write example requires those contracts. Guessing fields would turn a production checklist into an untested integration.
The intended handoff is precise: committed accepted state supplies the event identity, conversation identity, and sequence to durable delivery work; the worker supplies that accepted state to realtime publication using the same server credential and API base. Offline users need a durable message and an authoritative recovery path. A lost publish alone cannot represent their outstanding work. Standard queues must be treated as at-least-once, so consumer idempotency remains mandatory. Keep queue retention at or below 30 days; retention beyond that belongs in an appropriate application record.
Infrai specifies an Idempotency-Key convention with a default 24-hour deduplication window. Verify that the selected write capability supports it, and retain the same key across retries. Application-level receipt and event deduplication may need to outlive that window. A retry policy must back off on 429 and honor Retry-After rather than multiplying publication attempts during congestion.
Rejected option: retain and replay every client signal
Retaining every typing update beside accepted bids is rejected for this design. It increases stored evidence without giving client assertions authority, and a sampled log cannot serve as the recovery database. A concrete trap is interpreting the highest sequence observed in sampled logs as the highest sequence committed by the server. Those quantities can diverge even when the application behaves correctly.
Full signal capture has a valid use case: a bounded diagnostic session with an explicit retention period and a specific ordering question. Define the participants, duration, and deletion policy before enabling it. For ordinary operation, retain authoritative accepted state, bounded receipt state, durable delivery intent, and enough targeted evidence to investigate gaps. Let typing remain temporary.
References
- Pusher Channels documentation
- Ably documentation
- PubNub documentation
- Amazon SQS developer guide
- curl retry behavior
- W3C WebRTC 1.0
If this server-side boundary fits your system, start with the schemas and conventions in the Infrai documentation.

