Feeds

Google releases serialization scheme

Pedantic programmers hold love-in

Reducing security risks from open source software

Fail and You Protocol buffer: it’s the object serialization scheme the pretentious little shit on your development team has been talking at you about during lunch hours for the past couple of days. You’ve been feigning interest with a steady stream of “oh-yeahs” and “that-sounds-cools”, so you don’t really know what it is.

Well today is your lucky day because I’m about to drop some science up in this bitch.

It’s Like XML But From Google, Therefore It’s Awesomer

A protocol buffer is a way to serialize an object such that it can be shared across platforms. You define your object in terms of its primitives in a special language, run the protocol buffer compiler over your definition, and it will produce code in your language to serialize and unserialize this object. With Google’s code, you can share objects across any programming languages you want, as long as they are either C++, Java, or Python.

If you’re putting two kids through college, you likely know this technology by the name ASN.1. Otherwise, it’s just XML with a Google pedigree.

What makes the protocol buffer so popular with the pretentious little shits? Aside from wanting to put it on the CV they send to Google every three months, it’s got scalability written all over it. Oh, scalability: the problem that tens of thousands of engineers yearn for, but only six actually have.

Google invented the protocol buffer because they found XML parsing to be too slow, and XML messages too large. Now this is a good optimization in an environment that needs to process tens of millions of requests per minute, but it is unlikely that your company’s CRM system will benefit from it.

Even if you do have a scalability problem that Protocol Buffers could help, you’ll still be unlikely to use them, because putting your prize-winning testicles out on display as you draw boxes and lines on a whiteboard is most of the fun of solving scalability problems. You’ll be damned if Google is gonna cuckold you on this one.

Can you replace XML with protocol buffers? If you’re just at the outset of a project, it may be worth a look. XML, like a venereal disease, spreads from developer to developer by direct contact. The conservative school of thought suggests that the best way to avoid XML is to simply abstain from programming, but a more pragmatic approach can help to contain the spread of the pestilence while still allowing us to do our jobs. Since programmatic reflection is built into the implementation, it is easy to translate protocol buffers to other formats such as XML, so you can do it if you really have to.

The Power of One eBook: Top reasons to choose HP BladeSystem

More from The Register

next story
NO MORE ALL CAPS and other pleasures of Visual Studio 14
Unpicking a packed preview that breaks down ASP.NET
Cheer up, Nokia fans. It can start making mobes again in 18 months
The real winner of the Nokia sale is *drumroll* ... Nokia
Mozilla fixes CRITICAL security holes in Firefox, urges v31 upgrade
Misc memory hazards 'could be exploited' - and guess what, one's a Javascript vuln
Put down that Oracle database patch: It could cost $23,000 per CPU
On-by-default INMEMORY tech a boon for developers ... as long as they can afford it
Google shows off new Chrome OS look
Athena springs full-grown from Chromium project's head
Apple: We'll unleash OS X Yosemite beta on the MASSES on 24 July
Starting today, regular fanbois will be guinea pigs, it tells Reg
HIDDEN packet sniffer spy tech in MILLIONS of iPhones, iPads – expert
Don't panic though – Apple's backdoor is not wide open to all, guru tells us
prev story

Whitepapers

Top three mobile application threats
Prevent sensitive data leakage over insecure channels or stolen mobile devices.
Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Boost IT visibility and business value
How building a great service catalog relieves pressure points and demonstrates the value of IT service management.
Designing a Defense for Mobile Applications
Learn about the various considerations for defending mobile applications - from the application architecture itself to the myriad testing technologies.
Build a business case: developing custom apps
Learn how to maximize the value of custom applications by accelerating and simplifying their development.