UNPKG

atom-nuclide

Version:

A unified developer experience for web and mobile development, built as a suite of features on top of Atom to provide hackability and the support of an active community.

13 lines (8 loc) 1.11 kB
# Nuclide Service Framework The classes defined in this directory are used to integrate the service framework proxy-generation and marshalling code with the actual message passing layer. See the `nuclide-service-parser` package for steps related to definition parsing, proxy-generation, and type marshalling. ## RpcConnection `RpcConnection` is used by the `RemoteConnection` class - all functions related to the service framework are delegated to a `RpcConnection` instance. These functions are `callRemoteFunction`, `createRemoteObject`, `callRemoteMethod`, and `disposeRemoteObject`. ## ServiceRegistry `ServiceRegistry` is used by the `NuclideServer` class - all functions related to the service framework are delegated to a `ServiceRegistry` instance. All of the messages come in through the `handleMessage` function. ## Types The file [type.js](./types.js) contains typing for message formats. The `RequestMessage` tagged union encodes the format of possible requests that can be sent from the client to the server, while the `ResponseMessage` union encodes the structure of messages that are sent back.