One contract per layer, or keep ISocket and IDriver
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- backend-api-design
Research direction
Start by comparing ISocket, IDriver, DDPDriver, and the RocketChatClient.socket call sites, noting where casts and delegated implementations occur. Read lib/clients/Livechat.ts and the commented Protocols.MQTT import to understand the remaining protocol path. Done means the layering and contract strategy are decided, affected interfaces and callers are consistently updated, and the MQTT fate is resolved.
Written by the indexing model from the issue text.
Description
Question
Are ISocket and IDriver the right seam?
Evidence they are not:
DDPDriverimplements both, so at runtime there is exactly one object behind two contracts.- The split is arbitrary:
subscribesits onISocketbutsubscribeRoomonIDriver;loginis onIDriverthoughSocketimplements it;IDriver.configisany;subscribeNotifyUseris declared twice with different return types. - The clients implement
ISocketonly to delegate — that is a facade, not a transport contract.RocketChatClient.socketis typed as the union and nearly every call site casts to pick a half. Protocols.MQTThas no driver and the import is commented out inlib/clients/Livechat.ts. That dead branch was the only justification for protocol pluggability.
The layering the code actually has is three: the DDP engine (frames, send, open/close, heartbeat), the driver (Rocket.Chat streams, method calls, login), and the client facade (REST plus realtime).
Decide whether to collapse to one contract per layer, whether the client facade is derived from the driver contract or hand-maintained, and whether Protocols.MQTT dies with the split.
- 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
-
Bug: Broken RTL / BiDi text rendering when mixing Persian (Farsi) with English or numbersPossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 Half a day Newbie friendliness 68/100
amosblomqvist/learnharness#758 ·
Maintainers usually reply within 2 days
-
Change WorkspacesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
bitfocus/companion-module-renewedvision-propresenter-api#134 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
rcpch/digital-growth-charts-react-component-library#304 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dsh-market/dsh-market#1210 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
trustjonathan/STUDY-HUB#13 ·