strutture:lnf:da:chaos:rpc_protocol
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| strutture:lnf:da:chaos:rpc_protocol [2011/08/10 11:24] – bisegni@infn.it | strutture:lnf:da:chaos:rpc_protocol [2011/08/10 12:43] (current) – bisegni@infn.it | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== RPC Protocol ====== | ||
| + | |||
| + | Whit in Chaos all the part, Control Unit, Metadata Server, UI Toolkit talk each other with an rpc system. Due to the abstract design of chaos the RPC system is plugable, so the syntax and semantic os RPC message can be embedded int RCP serialization. Has been chosen BSON to serialize and deserialize action information. With this choice we have only one roc endpoint, this permit to simply migrate the roc protocol to another. | ||
| + | |||
| + | For **submit** a CHAOS System Action we need to construct a BSON package to send to the RPC end point. Some information are needed to precisely locate the action to execute: | ||
| + | |||
| + | * Domain | ||
| + | * Action Name | ||
| + | * Parameter(key/ | ||
| + | |||
| + | |||
| + | This is a sample JSON version of the BSON package to call an action: | ||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Description of the key: | ||
| + | |||
| + | **Domain(cs|cmdm|act_domain)** - The domain represent a group of action. The Chaos Library for COntrol Unit has a default domain called " | ||
| + | |||
| + | |||
| + | |||
| + | **Action Name(cs|cmdm|act_name)** - The name of an action, is an alias used by CHAOS library to recognize the action pointer to call. | ||
| + | |||
| + | |||
| + | |||
| + | **Action Parameter(key/ | ||
| + | |||
| + | |||
| + | |||
| + | **" | ||
| + | The current RPC implementation(MSGPACK-RPC) permit to receive a result of an rcp call. In this, is return a BSON pack with the result of the action submission described as follows: | ||
| + | |||
| + | < | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | </ | ||
| + | |||
| + | ====== The Answer System ====== | ||
| + | |||
| + | Chaos Library for Control Unit support the deferred answer to an action submission. Whe the caller what to receive the result of an action execution, it can add to the BSON submission request pack two additional key. | ||
| + | |||
| + | < | ||
| + | " | ||
| + | This represent the Identification Number of the request. It will be forwarded in the result BSON pack. | ||
| + | With this code the client can correlate the answer to the request. | ||
| + | |||
| + | " | ||
| + | This represent the ip:port of the rpc end point to be used. | ||
| + | </ | ||
| + | |||
| + | |||
| + | **Current RPC used protocol** - Actually CHAOS system library use the MSGPACK-RCP([[http:// | ||
