Skip to content

Remote Procedure Call RPC

Sudharshan Madhavan edited this page Apr 23, 2021 · 33 revisions

Introduction

Remote Procedure Call (RPC) is a mechanism which allows a program to invoke a function that is defined in another address space. If a user, A, writes a function and shares it with another user B, then B can invoke the shared function in A's program. The return value of the function is retrieved by B, which can then be used in B's program.

RPC is implemented using the Source Academy Module feature. The module is named 'rpc' and exposes three functions, namely connect, share and executeAfter.

The RPC also allows sharing of values in Source programs. These include numbers, strings, booleans, null and undefined. The sharing of arrays of arbitrary nesting is also allowed, along with lists and pairs which resolve into arrays themselves.

User Documentation

Prerequisites

System Overview

system_overview

Semantical Specifications

Functions explanation

Clone this wiki locally