Basics of Protocol Buffers 3 – Part 2

This post explains basics of protocol buffers 3 part 2. It will specifically focus on how to do the followings.1. multiple messages in a same file2. nested messages3. imports4. packages If you would like to read part 1, please read this post. Multiple messages in a same file You can have multiple messages in a same .proto file. Here is an example.All you need to do is to define those messages and reference properly. Nested Messages You can nest messages depending on your design. You might want to nest messages to avoid naming conflicts (you can also use packages for READ MORE

Basics of Protocol Buffers 3 – Part 1

In this post, I am going to explain the basics of protocol buffer 3. Protocol buffer is developed by Google for better handling of data. There are many data formats such as csv, json. However, there are some weaknesses in each format. CSV is easy to handle but has some disadvantages – data type has to be inferred, hard to parse when the data includes commas. JSON is used in many places and can be communicated over the web and very flexible in format but it doesn’t have schema enforcing and JSON objects could be pretty big size because of READ MORE