Format Exploration » History » Version 6

Version 5 (J. Moringen, 06/20/2011 06:52 PM) → Version 6/12 (J. Moringen, 06/20/2011 06:58 PM)

h1. Format Exploration

Currently, we use the Google Protocol Buffer library and its message definition format for serializing objects at the framework level. The user may use it for its own datatypes, but is not forced to do so by RSB. However, several alternatives exist which we may additionally evaluate. Afterwards, we could promote (at least internally) the use of one of the alternatives or stick to protobuf.

h2. Serialization Formats and Libraries

* Protocol Buffers: http://code.google.com/p/protobuf/
* MessagePack: http://msgpack.org/
* ROS Wire format: http://www.ros.org (TODO link to specs?)
* LCMs wire format (TODO link to specs?)
* JSON
* Binary JSON: http://bsonspec.org/

h2. Informal Comparison

An informal comparison...

h3. Structure and Description

|_.Aspect |_.Google |_. Google Protocol Buffers |_.LCM |_. LCM |_.MessagePack |_.ROS MSG |_. MessagePack |
| Fixed set of fundamental types | yes | ? | ? | yes |
| Nesting | yes | ? | ? | yes |
| Arrays/Sequences | yes | ? | ? | yes |
| - Homogeneous | yes | ? | ? | yes |
| - Inhomogeneous | no | ? | ? | no |
| Textual IDL | yes, C/Java-like | ? | ? | yes |
| Binary IDL | yes, uses Protocol Buffers | ? | ? | no |
| Self-describing messages | yes, optional | not visible in documentation | ? | yes, by sending textual descriptor |

h3. Serialization

|_.Aspect |_.Google |_. Google Protocol Buffers |_.LCM |_.MessagePack |_.ROS MSG |_. LCM |_. MessagePack |
| Random Access without Deserialization | no | ? | ? | no |
| Field Access without Deserialization | yes (by skipping) | ? | ? | yes |

h3. Non-Functional

|_.Aspect |_.Google |_. Google Protocol Buffers |_.LCM |_.MessagePack |_.ROS MSG |_. LCM |_. MessagePack |
| Programming Languages | Java, C++, Python, others community | C, Java, Python, .NET, Matlab | Ruby, C++, others ? | C++, Python, Java, Common Lisp
|
|
Extension without recompile | yes | no by design? | ? | ? |
| Speed (Runtime rel. to PBs) | 1 | ? | .25 (claimed) | ? |