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.

Assessment

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

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.

Description

enhancement ready-for-agent

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.

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

  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.

More from RocketChat/Rocket.Chat.js.SDK

All issues in RocketChat/Rocket.Chat.js.SDK

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.