views:

853

answers:

4

I was just looking through some information about Google's protocol buffers data interchange format. Has anyone played around with the code or even created a project around it?

I'm currently using XML in a Python project for structured content created by hand in a text editor, and I was wondering what the general opinion was on Protocol Buffers as a user-facing input format. The speed and brevity benefits definitely seem to be there, but there are so many factors when it comes to actually generating and processing the data.

+4  A: 

If you are looking for user facing interaction, stick with xml. It has more support, understanding, and general acceptance currently. If it's internal, I would say that protocol buffers are a great idea.

Maybe in a few years as more tools come out to support protocol buffers, then start looking towards that for a public facing api. Until then... JSON?

Darren Kopp
+6  A: 

Protocol buffers are intended to optimize communications between machines. They are really not intended for human interaction. Also, the format is binary, so it could not replace XML in that use case.

I would also recommend JSON as being the most compact text-based format.

Mark Renouf
+1  A: 

From your brief description, it sounds like protocol buffers is not the right fit. The phrase "structured content created by hand in a text editor" pretty much screams for XML.

But if you want efficient, low latency communications with data structures that are not shared outside your organization, binary serialization such as protocol buffers can offer a huge win.

maxfurni
+1  A: 

Another drawback of binary format like PB is that if there is a single bit of error, the entire data file is not parsable, but with JSON or XML, as the last resort you can still manually fix the error because it is human readable and has redundancy built-in..

See? Answer a question with something other than spam, and you'll get upvotes.
John Saunders
what are you talking about? I have got plenty of badges and votes with other posts on vtd-xml... if they are spams, users can vote it down, I have not received a single negative vote ... the problem is that you are making decisions for those people yet you don't seem to understand the substance of the posts