Skip to main content

Posts

Featured

What's a better way of encoding data if you don't want to use JSON, or XML .

What is Protocol Buffers?   Short answer: It's a way to serialize unstructured data.  Benefits: - Smaller - 20-100 x faster - Easier - 3-10 x smaller then xml - Generates code for you - You don't have to handwrite your own parsing code
You define (.proto file) the structure of your data then there is code generated to read and write to data streams. Protocol buffer was developed at Google to help with their index server.  Some developers even use protobuf for storing data persistently for example BigTable. Some developers even use it for RPC ( Remote Procedure Call ) systems. See overview for more on this:

https://developers.google.com/protocol-buffers/docs/overview


Here is an example of a .proto file:
package tutorial; option java_package = "com.learning.protobuf" option java_outer_classname = "SomeOuterClassIMadeUp" message MyTopSecretMsg {      required String info = 1 ;      . . . }
Note: The 'required' keyword could be replaced by 'option…

Latest Posts

Release 0.7

Open Source Clustering: Introduction to Apache Zookeeper

Apache Karaf - Open source OSGi Container - Part 1

Remedy to Java.out.Memory when browsing ActiveMQ JMS Queue that exceed 200,000 messages

Experiment: ActiveMQ 4 Node.JS

Release 0.5

Press Release: WhoTeachsWhat - Using JBoss AS 7 Application Server Hosted on OpenShift

The Future Of Healthcare Technology and Open Source

HTML5 Support in Android and IOS?

Server Vital Sign: Scripts To Respawn MongoDB or Nginx When It Crashes