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.

Serialization Formats and Libraries

Informal Comparison

An informal comparison...

Structure and Types

Aspect Google Protocol Buffers LCM MessagePack ROS MSG
Fixed set of fundamental types yes ? yes yes
Nesting yes ? yes yes
Arrays/Sequences yes ? yes yes
- Homogeneous yes ? yes yes
- Inhomogeneous no ? no? no
Enums yes ? yes no, but constants
Nullable types no ? yes no
Optional fields yes ? yes no
Inheritance no ? yes no

Description

Aspect Google Protocol Buffers LCM MessagePack ROS MSG
Textual IDL yes, C/Java-like ? yes yes
Binary IDL yes, uses Protocol Buffers ? ? no
Self-describing messages yes, optional not visible in documentation ? yes, by sending textual descriptor

Serialization

Aspect Google Protocol Buffers LCM MessagePack ROS MSG
Random Access without Deserialization no ? ? no
Field Access without Deserialization yes (by skipping) ? ? yes
Parsing of base types in extended msgs ? ? ? ?

Non-Functional

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