Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove distributed session delegation in order to clean up proc.ml #1172

Merged
merged 5 commits into from
Jun 26, 2023

Conversation

SimonJF
Copy link
Member

@SimonJF SimonJF commented Mar 30, 2023

Channels are not innately suited to distributed computation because of the 'distributed delegation' problem which arises when sending channels over channels: if we send endpoint A over endpoint B, then we don't know where to route any messages to endpoint A.

Before, there was a ton of complex code which may or may not have worked, which attempted to implement a version of the distributed delegation algorithm described in the original Session Java paper. This significantly complicated the distributed sessions runtime in proc.ml and jslib.js.

In practice, we only really delegate from server to client, which does not require any special treatment. None of our present code sends session endpoints from client to other client, or client to server. Therefore, all of this spaghetti code is actually redundant. This patch removes all the distributed delegation code and therefore vastly streamlines the distributed session runtime. Attempting to do distributed delegation from client to server, or client to other client, will now result in a runtime error.

In future we may want to re-enable a form of this. I think the easiest way of doing this would be to explicitly allow the creation of "remote channels" whose buffers reside on the server with sends / receives requiring a remote call -- we would then only need to do name passing.

@SimonJF
Copy link
Member Author

SimonJF commented Mar 30, 2023

This should address #1103 (got round to it eventually!)

@SimonJF
Copy link
Member Author

SimonJF commented Jun 12, 2023

@slindley Unless you have any objections, can this go in? I don't think it's too controversial.

@SimonJF SimonJF merged commit 32f8ade into links-lang:master Jun 26, 2023
@SimonJF SimonJF deleted the simplify-proc branch June 26, 2023 14:49
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.

1 participant