RocketChat / RocketChat/Rocket.Chat.js.SDK

Split ddp.ts — transport and liveness apart from subscription bookkeeping

Open
#296 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement ready-for-agent
Dominant language
TypeScript
Stars
146
Forks
99
Avg merge
7h 59m
Merged PRs (30d)
17

Description

lib/drivers/ddp.ts is past 1000 lines and every change to it is harder to review than the last.

The seam that holds: transport, liveness and the waits on one side; the subscription map, subscriptionRequests and the subscribe/unsubscribe/forget calls on the other, as a collaborator.

Not the seam to use: connection lifecycle versus DDP protocol. That one cuts straight through connection and lastPing, so both halves keep reaching into the same state.

The pinning suite in lib/drivers/tests/ is the safety net — it should not need changing.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lib/drivers/ddp.ts and trace transport, liveness, waits, the subscription map, subscriptionRequests, and the subscribe/unsubscribe/forget calls. Use the pinning suite in lib/drivers/tests/ as the safety net. Done means the subscription bookkeeping is separated as a collaborator without changing that suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design, networking
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.