Skip to content

Commit ac03aba

Browse files
committed
docs(web): explain why rosocket and rclnodejs/web URL shapes differ
A reasonable reflex on first reading is 'shouldn't both bridges use the same URL shape?' Add a blockquote in §8 'Sibling, not competitor' that names the URL difference as deliberate and explains the multiplexing model behind it: rosocket exposes one socket per resource (path is the resource); rclnodejs/web exposes one socket per session (resource lives in the frame, supports call/publish/ subscribe multiplex). Same wire, different contract.
1 parent a84742b commit ac03aba

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tutorials/web.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,15 @@ no shared state. Reach for `rosocket` when you genuinely just want
249249
when you want a typed SDK and a reviewable allow-list. Neither
250250
replaces the other.
251251

252+
> **The URL shapes are deliberately different**, not a missed
253+
> opportunity to unify. `rosocket`'s `ws://host:9000/topic/<name>`
254+
> means "one socket per resource, the path **is** the resource";
255+
> `rclnodejs/web`'s `ws://host:9000/capability` means "one socket per
256+
> session, the resource lives in the message frame so call/publish/
257+
> subscribe can multiplex." Same wire (WebSocket + JSON), different
258+
> multiplexing model. The URL is the user-visible signal of which
259+
> contract you're talking to.
260+
252261
### Not a `rosbridge` replacement
253262

254263
`rosbridge` is still the right tool when the browser genuinely needs

0 commit comments

Comments
 (0)