Personal tools
The Open Lighting Project has moved!

We've launched our new site at www.openlighting.org. This wiki will remain and be updated with more technical information.

Difference between revisions of "RPC Protocol"

From wiki.openlighting.org

Jump to: navigation, search
(Created page with " OLA is a client / server architecture. Data passed between the client and the server is serialized using [https://developers.google.com/protocol-buffers/ Protocol Buffers...")
 
Line 1: Line 1:
  
 +
A common question that comes up is "How can I communicate with olad using something other than C++, Python or Java?".
  
OLA is a client / server architecture.
 
  
 +
== Intro ==
  
Data passed between the client and the server is serialized using [https://developers.google.com/protocol-buffers/ Protocol Buffers].
+
OLA is a client / server architecture. The clients and the server (olad) communicate over a TCP socket. By default olad listens on localhost:9010.  Data passed between the client and the server is serialized using [https://developers.google.com/protocol-buffers/ Protocol Buffers]. The [https://developers.google.com/protocol-buffers/docs/overview overview] and [https://developers.google.com/protocol-buffers/docs/encoding data encoding] pages describe the specifics of the serialization process.
  
 +
To write a new client at the very least you need an implementation of protocol buffers for your language. Luckily there is widespread support for protocol buffers in [https://code.google.com/p/protobuf/wiki/ThirdPartyAddOns many languages].
  
 
== Simple Example ==  
 
== Simple Example ==  

Revision as of 09:53, 3 March 2014

A common question that comes up is "How can I communicate with olad using something other than C++, Python or Java?".


Intro

OLA is a client / server architecture. The clients and the server (olad) communicate over a TCP socket. By default olad listens on localhost:9010. Data passed between the client and the server is serialized using Protocol Buffers. The overview and data encoding pages describe the specifics of the serialization process.

To write a new client at the very least you need an implementation of protocol buffers for your language. Luckily there is widespread support for protocol buffers in many languages.

Simple Example

From common/rpc/Rpc.proto,

message RpcMessage {
  required Type type = 1;
  optional uint32 id = 2;
  optional string name = 3;
  optional bytes buffer = 4;
}


common/protocol/