-
Notifications
You must be signed in to change notification settings - Fork 108
Distributed Computing (proposal)
Raivat Shah edited this page Mar 5, 2021
·
4 revisions
Idea: Introduce Promises in Source 2 to facilitate distributed computing.
- Student A executes:
function my_shared_function(x) {
display(x);
}
share(my_shared_function); // returns access-token
- REPL displays the access token "2e7d5196-bc90-4482-9b9f-749b6c23b089"
- Student A sends the access token to Student B (e.g. through Telegram)
- Student B executes:
const promise = connect("2e7d5196-bc90-4482-9b9f-749b6c23b089");
then(promise, shared_function_from_a =>
shared_function_from_a("hi there");
}
- Student A sees "hi there" in their REPL