Skip to content

Tweak jsRpcSession() to avoid need for ServerTopLevelMembrane.#6717

Merged
kentonv merged 1 commit intomainfrom
kenton/jsrpc-membrane-cleanup
May 4, 2026
Merged

Tweak jsRpcSession() to avoid need for ServerTopLevelMembrane.#6717
kentonv merged 1 commit intomainfrom
kenton/jsrpc-membrane-cleanup

Conversation

@kentonv
Copy link
Copy Markdown
Member

@kentonv kentonv commented May 4, 2026

Instead of having the jsRpcSession() "hang" until the session is done, we return a capability representing the session which can be dropped to effect cancellation.

This avoids the need for the rather-awkward ServerTopLevelMembrane on the receiving side.

Eliminating this membrane not just reduces complexity, but also fixes a problem where ExternalPusher methods had to be invoked strictly in advance of call(). I have features planned that will need to be able to call these methods later.

Unfortunately this will require a multi-step dance -- clients need to be updated first, then an autogate can update the server, then we can delete old code.

@kentonv kentonv requested review from harrishancock and npaun May 4, 2026 03:14
@kentonv kentonv requested review from a team as code owners May 4, 2026 03:14
Instead of having the `jsRpcSession()` "hang" until the session is done, we return a capability representing the session which can be dropped to effect cancellation.

This avoids the need for the rather-awkward `ServerTopLevelMembrane` on the receiving side.

Eliminating this membrane not just reduces complexity, but also fixes a problem where `ExternalPusher` methods had to be invoked strictly in advance of `call()`. I have features planned that will need to be able to call these methods later.

Unfortunately this will require a multi-step dance -- clients need to be updated first, then an autogate can update the server, then we can delete old code.
@kentonv kentonv force-pushed the kenton/jsrpc-membrane-cleanup branch from 9c53fcb to 9793e96 Compare May 4, 2026 12:31
@kentonv kentonv merged commit 43327fe into main May 4, 2026
33 of 34 checks passed
@kentonv kentonv deleted the kenton/jsrpc-membrane-cleanup branch May 4, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants