This talk is an introduction to Google's protocol buffers (aka protobuf). Protocol buffers are a language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler. This talk will include a demonstration of using protobuf with Python to communicate with an embedded, processing- and memory-restricted device.
With the explosion of IoT devices, it is becoming commonplace to have a single, full-featured computer attached to one or more embedded, memory- and bandwidth-restricted devices. In those embedded devices, the use of text-based structured data can consume too much storage, processor time, and/or network bandwidth to be feasible for communicating with those devices. As a result, when one wants to monitor or control such devices from a full-featured remote computer, one often resorts to simple, ad hoc transfer mechanisms, at the cost of maintainability and extensibility. Protobuf offers a fast, extensible, and language-neutral mechanism for serializing structured data. Protobuf can be used anywhere one is looking for efficient and extensible serialization of structured data, be it between processes on the same computer or between two heterogeneous computers connected via a network. For this talk, a demonstration of how a rich computing environment (i.e., a laptop computer) can use the Python protobuf implementation to transfer data to and from a constrained-performance embedded device running a stripped-down, C-based protobuf implementation. The demonstration will highlight the attractive features of protobuf (language neutrality, efficiency of encoding, reduction of ambiguity, backward compatibility, and automatic generation of data access classes).