-
Notifications
You must be signed in to change notification settings - Fork 2
dev doc
The library is split into two parts RPC and API. To get better understanding of the internal mechanism you should understand what RPC is and read the msgpack-rpc specification.
The API implements the interface for plug-in developers. Calls and responses specified in the Protocol are handles here. The classes defined here make use of the RPC module and only implement high level interfaces.
- Implementation of run/register/result calls
- Manage responses and results
- Helpers for remote Functions
The RPC module implements the connection, serialization and handling of incoming messages. The implementation is as minimal as possible the main operations are handled by the API module. The RPC module should never make use of any API functionality. Therefore no includes from Splonecli.API are allowed!
- Manage the connection
- Handle incoming messages and call appropriate function API functions (using callbacks and registered functions)
- Handle errors on msgpack-rpc level and make sure received messages are in the correct format
This is just a list of things that might be of interest.
- Currently Lists are not supported as arguments for run calls.
- If a function is not annotated properly, The function will be ignored
- A mechanism to store results locally could be nice
- Results may contain strings. Since we don't distinguish between strings and binary data we have to find a mechanism to separate them later. (Or let users of the library handle this problem)
-
If you register functions during a test, make sure you erase them afterwards:
RemoteFunction.remotefuncions = {} -
Make sure you test things only once. Especially if a function is mostly a wrapper, a short test will be enough