Map: realtime vocabulary and the suspended connection
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- api, distributed-systems
Research direction
Start with the realtime drivers in lib/drivers/, the vocabulary in CONTEXT.md, and the pinning tests under lib/drivers/tests/. Resolve the unspecified public-surface and reconnect-budget decisions, then document and test the agreed Open, Connected, Logged in, Suspended, Heartbeat, timeout, Probe, and Lost signal behavior without renaming emitted events.
Written by the indexing model from the issue text.
Description
Destination
The realtime layer's names match what the code does, and a suspended connection cannot pass as a healthy one.
Notes
Domain: the DDP realtime layer (lib/drivers/) and the vocabulary in CONTEXT.md. Consumed by Rocket.Chat.ReactNative; the SDK ships TypeScript source with no build step, so every exported name is public API to that app.
Standing constraints for this effort:
- Mobile backgrounding is the driving case. iOS freezes the TCP socket silently — no close, no error — so
connectedkeeps returning true andsend()hangs awaiting'open'. Android keeps listeners alive and delivers a burst on foreground. Same staleness number, opposite meanings. - VoIP has a hard 10s deadline to reconnect and get a DDP event to the server. Every wait on the reconnect path spends from that one budget.
- Chat-history sync is out of scope — the consuming app already fetches messages since its last fetch over REST.
lib/drivers/__tests__/is a pinning suite: it locks current behaviour, quirks included. Identifier renames are mechanical there; behaviour changes are not.- Skills:
/domain-modelingfor every glossary ticket,/grillingfor the decisions.
Prior art consulted: the DDP spec, Meteor's client, @rocket.chat/ddp-client, and ten realtime chat SDKs (Matrix, Stream, Sendbird, Twilio, Slack, Pusher, Ably, Centrifugo, Phoenix, Strophe).
Decisions so far
- Connection states are named Open / Connected / Logged in.
- "Liveness chain" is dropped for Heartbeat, keeping upstream's three-way split: ping/pong are wire frames, heartbeat is the local timer, timeout is the dead-connection trigger. Probe stays — it has no upstream equivalent.
- Two kinds of message loss, and only one belongs here. Lost signal — an event sent between
suband the server'sready, gone permanently, no backfill possible, only avoidable by waiting for the ack — is this SDK's concern. Chat-history gaps are the consumer's and already handled. - Suspended is adopted for a socket the OS froze that still reads as open. This unnamed state is the VoIP bug.
- Rocket.Chat's
Implsuffix, no-I-prefix convention,uid, and its server-side "publication" term are not borrowed. Consistency with this repo wins, and "publication" has no referent here. - Emitted event names are not renamed in this effort — they are wire-observable and pinned.
Not yet specified
- Whether the SDK should surface a "you were suspended" signal to the consuming app at all, or keep it internal to the reconnect path.
- Whether
probebelongs on the public surface once Suspended is a named state. - Whether the reconnect path needs a stated budget split per leg, which depends on what the measurements show.
Out of scope
- Chat-history gap recovery — the consuming app already syncs messages since its last fetch over REST. Building it here would duplicate it in the wrong layer.
- Dominant language
- TypeScript
- Stars
- 146
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RocketChat/Rocket.Chat.js.SDK
-
refactor: delete the unused replaceLog and silence exports from lib/log.tsPossibly taken @ayushi-wq claimed this 81 days ago. Openbug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
RocketChat/Rocket.Chat.js.SDK#380 · 1 comment ·
-
refactor: delete the unassigned messages and joinedIds fields on DriverPossibly taken @arbazkhan971 claimed this 68 days ago. Openbug ready-for-agent
Difficulty 1/5 Under an hour Newbie friendliness 90/100
RocketChat/Rocket.Chat.js.SDK#379 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
RocketChat/Rocket.Chat.js.SDK#308 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
RocketChat/Rocket.Chat.js.SDK#306 ·
-
bug
Difficulty 2/5 Half a day Newbie friendliness 78/100
RocketChat/Rocket.Chat.js.SDK#254 ·
All issues in RocketChat/Rocket.Chat.js.SDK
Similar issues
-
Out of order / duplicate key error shows the key bytes as decimal or UTF-8, not hexPossibly taken @bardrop claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 86/100
-
`/leaderboard`, the page and the share image say "be the first" for a program that hasn't startedOpenbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
codercops/discord-bot#152 ·
Maintainers usually reply within 1 day
-
bug i18n
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
endora-commerce/endora-commerce#1315 ·
Maintainers usually reply within 1 day
-
area:data-quality importer size:S
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
enorm-labs/event-junkie#5136 ·
Maintainers usually reply within 1 day
-
fix(scripts): set-device-owner.ps1 fails to parse on Windows PowerShell 5.1 (UTF-8 without BOM)Open
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day