Google Open Sources Its Data Interchange Format
A number of readers have noted Google's open sourcing of their internal data interchange format, called Protocol Buffers (here's the code and the doc). Google elevator statement for Protocol Buffers is "a language-neutral, platform-neutral, extensible way of serializing structured data for use in communications protocols, data storage, and more." It's the way data is formatted to move around inside of Google. Betanews spotlights some of Protocol Buffers' contrasts with XML and IDL, with which it is most comparable. Google's blogger claims, "And, yes, it is very fast — at least an order of magnitude faster than XML."
So is, well, just about anything.
If I was the first to comment this, I would say "Cool!"
Isn't xdr compact enough?
"Google's blogger claims, "And, yes, it is very fast -- at least an order of magnitude faster than XML."
That is just because they aren't using enough XML!
"When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
It is good that Google has started making more things open source, but they still have a long way to go. Right now they are comparable to Apple, they like open source, make some open source products, but aren't like Red Hat and make everything open source, but I guess we should be glad they aren't like Microsoft where nothing is open source.
Taxation is legalized theft, no more, no less.
Is that like PHP's serialize?
I must say - I'm amazed.
C++
Python
Java
what about PERL ? :]
Just think of the kind of power it took to make millions of employees standardize on the same format for their data interchange. Humans just gravitate to power wielding forces. Wonder what format they require for their surprise blog posts.
Go out and write one, sonny!
That's the beauty of open source.
SunRPC is old and awkward. Always want something better.
what's up with everyone going on about "an order of magnitude"? do you think it makes you look smart? it doesn't.
...and we'll be happy.
It is by my will alone my thoughts acquire motion; it is by the juice of the coffee bean that the thoughts acquire speed
But here, in an unusual departure from the norm, the default values for these members are set to digits (for strings or literals) or values (for numerals) that define their place in a sequence -- where they fall within a record.
Wow! They've invented fixed position data files. What will they invent next, a cool new programming language called RPG?
perl -e 'print "Shut the fuck up!\n"'
I'm sure it won't take long for the module to show up on CPAN.
I read the internet for the articles.
It looks like Google has taken some of the good elements of CORBA and IIOP into its own interchange format.
While CORBA certainly is bloated in a lot of ways, the IIOP wire protocol it uses is vastly faster and more efficient than any XML out there.. and yes it is just as "open" (publicly documented and Freely available for use in any open source application) as any XML schema out there. J2EE uses IIOP as well and its is technically possible to interoperate (although the problem with CORBA is that different implementations never really interoperated as they were supposed to).
As a side note, I'd rather write IDL code than an XML schema any day of the week too, but that's another rant.
both really from the same design sheet, but thrift has been opensource'd for over a year, and has many more language bindings. its been in use in several opensource projects (thrudb comes to mind), and has much more extant articles/documentation.
http://developers.facebook.com/thrift/
"And, yes, it is very fast â" at least an order of magnitude faster than XML."
Just wait for the XML zealots to come crashing and not believing that XML is not the fastest, best, solution to all the world's problems (including cancer) and of course people at Google are amateurs and id10ts and WHY DO YOU HATE XML kind of stuff.
Or, as Joel Spolski once said: http://www.joelonsoftware.com/articles/fog0000000296.html
No, there is nothing wrong with XML per se, except for the fans...
how long until
That must suck, posting at -1...your post was funny...for me at least...
And as a bonus, they help undermine opponents who use competing technologies by helping train the workforce away from their practices. Overall I think it's very intelligent and well done strategic move.
Oh honey look... How cute... an angry slashdotter!
I've had to work with PERL for the past month, and I'm not that impressed with it. It seems so... haphazard.
Binary encoding, none hierarchy based string list, and simple file serialization are all faster than XML. XML was created flexibility, commonality and human readability not speed. XSL, XQuery, and XPATH along with the DOM or SAX supply out of the box query, transformation, and manipulation capability.
Are doomed to re-invent it.
The point of this isn't so much that it's faster than XML (so is everything else), it's that google took everything that a real person needs in a IDL and cut out everything else. Most IDLs have a serious case of second system effect, where features are added that nobody uses but seriously complicate the API. Even XML suffers from that (have you ever seen the kind of data structure you need to store a DOM, or what that does to library APIs for manipulating XML)?
I'd use it because 95% of the time all I need is something simple like this, and the other 5% of the time I should go back and rethink my design anyway.
That said, there is still a case for XML, especially the self documenting and human readable nature of the document, but there are a lot of cases where it is used today where it only adds unnecessary complexity and actually makes your code more difficult to maintain instead of simpler.
I read the internet for the articles.
So...when can we abandon these silly letters and decimal numbers to express ourselves in binary? It's like the elephant in the room. We all want a semantic web, but we all want it in English. At least Lojban has a start on a parsable language, but it still wants to be speakable.
Thats OK, we have Storable.
According to Brad Fitzpatrick's(of LiveJounral fame) blog, He's working on Perl support.
This looks very, very similar to ASN.1 which has been around for years.
I always told people that -- it's optimized for:
1. Easy parsing by parsers written by people who slept through their compiler classes.
2. Verification in situations when it's impossible to devise a meaningful reaction to a failure (other than either "everything failed, turn off the computers and go home" and "assume the data to be valid anyway because ALL of it will have the same formatting error because the same program generates it")
3. Dealing with data that arrives in neatly packaged "documents" and "requests", as opposed to being constantly produced and consumed.
4. Either communicating between programs that have the same knowledge of message semantics, or preparation of pretty human-readable documents.
None of the above even remotely applies to anything practical except UI/display formats -- this is why XHTML and ODF (and because of that at some extent XSL) are usable, SOAP is a load of crap, and for the rest of purposes XML is used as a glorified CSL with angle brackets. XML is widespread because monumentally stupid standard is still better than no standard.
So here is your example of how superior can be ANY format that is not based on this stupid idea.
Contrary to the popular belief, there indeed is no God.
How do you "Open Source" a Data Interchange format. There is no source to open? You just specify a format and distribute the specs to your trading partners and there you go. I am getting so damn sick and tired of open source this and open source that. The words "open Source" have specific meaning. It is not a catch all term friendly licensing. So Google published the format it uses to push data around. Big Fuckin Deal. In case anyone is interested. I organize my dvd collection by genre and title alpabetically on a book shelf. Look mom, I open sourced my data storage format. Ridiculous.
Yeah, and I'd like this for the .NET CLR and Mono as well. I looked at the code and the generators are not that complicated, maybe I'll give it a shot over the weekend. Does Google accept outside contribs for projects like these?
Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
http://brad.livejournal.com/2387105.html
Nerd rage is the funniest rage.
Looks kinda like JSON to me.
XML cannot have a speed. XML is a format. It has no speed. The speed in which it is processed is entirly dependant on the software and algorithums used to process it.
Undetectable Steganography? Yep, there's an app fo
How is this either implementationally or conceptually different from BER/DER encoding (commonly used and available all over the place)?
Looks to me like it is exactly the same thing, reimplemented. I am sure bearing a mark of Google is nice and all, but they are definitely reinventing the wheel here.
lol. Not that FAST is IDENTICAL, but it is essentially just a much more sophisticated implementation of the same basic idea...
"Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
It's called "Perl".
It takes a man to suffer ignorance and smile
Be yourself no matter what they say
I guess that XDR wasn't good enough, then, or ASN.1 (which supports multiple abstract encodings to boot).
XML, as an interchange format?
I suppose one could load source code into memory, and compile it every time, too. Even Java compiles to bytecode.
Bloated formats are fine for human interpretation (I rather like one kind of structure for my config files), or occasional parsing (which is why most of the stuff in /etc is human-readable, for small data sets (I do remember when "the internet" was one big /etc/hosts file), but for interchange? Just cause you're big-endian and I'm little-endian?
The trick to making non-human readable formats acceptable is the prevelence of wide-spread encoding and decoding tools.
Yes, XML is self-describing, at least syntactically (and formally with an XSD), and specific encoding semantics can be tagged, but the same can be achieved with means for type encoding. The big thing with XDR and related formats is that types are implicit -- both ends need to know what is being serialized. For RPC, with well-defined interfaces, this is not a problem, but it does make type-checking a remote service a bit of a challenge.
However, types can be encoded as data, and serialized as well: this happens for variant types naturally. Thus, there is no reason to not have a type-encoding and type-exchange protocol to permit dynamic type-checking. The advantage over self-describing data serializations is that it can be done on an as-required basis, instead of with every damn serialization.
In Liberty, Rene
You... You have GOT to be new here.
True confidence comes not from realising you are as good as your peers, but that your peers are as bad as you are.
It's all text. So... It's only as fast as its reader and writer.
Obviously, those at Google felt XML didn't work well for them. They have the resources to invent a protocol and libraries to support it. And, they are big enough to be their own ecosystem, which means as long as everyone at Google is using their formats, interop is no biggie. Good for them, I don't begrudge that decision.
I'm actually a game developer, not a web developer, so I'll speak to XML's use as a file format in general. Here's a few points regarding our use of XML:
* We only use it as a source format for our tools. XML is far too inefficient and verbose to use in the final game - all our XML data is packed into our own proprietary binary data format. .NET platform (Windows is our development platform, of course). It's astoundingly easy to serialize data structures to XML using .NET libraries - just a few lines of code.
* We also only use it as a meta-data format, not a primary container type. For instance, we store gameplay scripts, audio script, and cinematic meta-data in XML format. We're not foolish enough to store images, sounds, or maps in a highly-verbose, text-based format. XML's value to us is in how well it can glue large pieces of our game together.
* All our latest tools are written in C# and using the
* Because it's a text-based format and human readable, if a file breaks in any way, we can just do a diff in source control to see what changed, and why it's breaking.
I'll make a concession that I've heard of some pretty awful uses of XML. But those who dismiss XML as a valuable tool in the toolchest are equally as foolish as those who believe it's the end-all and be-all of programming (I'm not saying that's true of you, just pointing out foolishness on both sides). Like any tool, it's most valuable when used in it's optimal role, not when shoehorned into projects as a solution to everything.
Irony: Agile development has too much intertia to be abandoned now.
http://brad.livejournal.com/2387105.html
.. from things like YAML and JSON?
You're not really going to see the benefits of Perl in one month. It's not a very straightforward language like that.
I have my own data format that is an alternative to XML as well. It works by normalizing the data into records which all contain the same number of fields, and placing an agreed-upon delimiter between each field. The end of the record is indicated by a newline.
I think this "delimited" format has a lot of potential.
Tired of FB/Google censorship? Visit UNCENSORED!
"then compile them to produce classes to represent those structures in the language of your choice"
That's not entirely true, but I digress. Anyway, can someone shed some light on how this is different than binary serialization I've been using to pass C# objects around for quite some time now? It is just a matter of giving the class a Serializable attribute and then using the BinaryFormatter class to serialize the object to a stream. XML serialization is available if needed to pass to non-M$ entities, but binary serialization has been around a while, no?
Our systems ( application servers, frameworks, data serialization and unserialization facilities etc ) understand/support XML-RPC, binary XML-RPC, JSON and PHP object notation (ref: PHP serialize() / unserialize() functions).
There is a set of primitives ( string, integers, floats, arrays, structures, timestamps, raw data ) which are the only datatypes developers utilize; the serialization process is transparent. That way, depending on the nature and capabilities of the systems involved in a data interchange procedure, the more efficient transport protocol is utilized ( for example JSON when interfacing with an application server from a Javascript application, XML-RPC when talking to remote XML-RPC servers etc ).
It's probably more important to decide upon a list of primitive constructs and always operate on that kind of datatypes as opposed to figuring out the ideal way to store and retrieve them. You can always come up with an even better way to encode that data later on, anyway.
Technology ramblings : Simple is Beautiful
XML is good because it promotes keeping orthogonal, two very different problems : structuring data and encoding it. Tying these two problems creates complications down the road, as entangling independent areas of information processing and algorithm sciences usually does.
Thankfully an alternative to XML.
If you didn't think XML was among least efficient transport formats then you weren't really paying attention. Battery-conscious mobile devices do not really enjoy parsing XML DTD and then the XML file itself.
It reminds me a little bit of AOL's SNAC message types.
We get something good for the industry from Google, after a rash of bad press, and is actually NOT a beta.
Kriston
I agree, the "order of magnitude" note sounds more like a media-bite than anything, but here are a few points to consider.
1.) The example they give is for a small set of data, and percentages vary more dramatically as sample sizes decrease.
2.) If your usage generally involves many such small sets of data, the benefits of slight reductions in latency will multiply significantly.
3.) Even if the speed performance is identical to XML, the reduction in data size should not be ignored, especially in large-volume production environments.
4.) This is not a small internal tool Google is releasing -- this is a major component which they have heavily used. It has been real-world tested (albeit at just one company) and proven at ridiculous scales.
5.) They are giving this away. Source, documentation, examples -- the works. I know this isn't driven entirely by altruism, but neither is it is an embrace-extend-extinguish maneuver. They just made a tool that meets a specific need better than what was currently available, and then made it available.
Man, the BetaNews article is horrible. Practically everything — except for the direct quotes from the Google blog post — is incorrect. I somehow expect more from someone who goes by "Scott M. Fulton, III".
Nope, they're conceptually the same. The ".proto" files are like DTD or XSD. The actual document data is stored in a binary format (though there's also a text representation). The data manipulation API is similar what you get from Castor or JAX-B.
The "= number" at the end of a field definition is not a "default value". It is a numeric tag that identifies that field. That said, "= number" is quite unintuitive syntax; maybe something like "@number" would have been less confusing.
Looking at some of the documentation, I don't think the aforementioned numbers directly index the field's location in the record. They lay down the present fields one after another, probably putting each field's tag number before the field data. This also allows them to avoid sending fields that use the default value. So they still need to specify how long each record is — either with "fenceposts" between records or a "length" specifier before each record.
Perl is to programming languages what English is to natural languages: easy to fool around with, hard to learn well, but when you do, the expressive power is incredible. And when you mess it up, nobody understands what you're trying to say.
How is this earth shattering?
XML takes a long time on the wire. And marshalling/unmarshalling to XML is somewhat inefficient. I'm hoping neither of those is news.
So, yes, if your main goal is ruthless efficiency, there are clearly better ways to go than XML. Google has demonstrated what appears to be a reasonable one, and congrats for that.
But this misses one of the main points of XML. It's relatively human readable, and it's useful for self-checking and standards compliance.
XML works nicely in a web service environment where your code works with something someone somewhere else on the internet wrote. You can have a contracted format so you know that what you get is what you need. You can go in and debug the bloody thing if you can't unmarshall the message. You can standardize formats with others easily (hand someone an XML schema, and they can write compliant XML). These are good features. And they all come at a performance cost.
Google is solving a problem XML was never designed for, but is probably used for in a number of cases today for lack of obvious alternatives. And for that, they should be congratulated. But this is hardly the death knell for XML.
The similarity between these things and NeXT's Property Lists (now called "Old-School Property Lists" that Apple/NeXT has standardized on XML) is incredible. Some things are changed, like having a specification instead of just assuming that the recipient will parse it and figure it out, but the likeness is there. I wonder if any of the proto people at google had experience with plists, or if it's just a case of convergent design.
Everything old-school is new-school again, I guess.
Well now XML is wedged between YAML on the low end (e.g. config files, human readable data, ad hoc files) and ProBuff on the high end (massive structured data bases).
It's mainn continuing advantage is its huge installed base, mind share, and some really handy toolkits. Even things like MacOSX are built around a streamlined verion. But with more languages handling YAML natively (e.g. Ruby) it's going to be hard to make the case for YAML.
It will of course be good for Document formatting which is where markup language got their start and are well suited.
nt
In the document, google showed one case of XML
<person>
<name>John Doe</name>
<email>jdoe@example.com</email>
</person>
However, in the company I used to work, we required such a file to be written something like
<person
name="John Doe"
email="jdoe@example.com"/>
The google protocol buffer format it will beperson {
name = "John Doe"
email = "jdoe@example.com"
}
I failed to see why the protocol buffer format is much smaller and faster.
There is a spark in every single flame bait point.
ASN.1, from 1985, really is very similar. Here's a message defined in ASN.1 form:
Note that this has almost exactly the same feature set as Google's representation. There are named, typed field which can be optional or repeated. It just looks more like Pascal, while Google's syntax looks more like C.
All that work! How sad I am that we must reschedule the Web Services Choreography Working Group to consider to study XML's replacement, Protocol Buffers.
I looked at some of their binary interchange format. It looks like a valid Perl program to me! *rimshot*
Still waiting for Perl to make use of the Euro key as an operator...
Anyway, can someone shed some light on how this is different than binary serialization I've been using to pass C# objects around for quite some time now?
It's portable and language-independent?
Is it also faster than binary XML?
https://fi.dev.java.net/performance-reports/General/parse/report.html
Whoa, Mr. AC there, that was extremely helpful.
BTW, it's Perl, not PERL.
Pray tell us, why should I heed someones opinion on a the language when he can't even spell it's name correctly?
Boost Serialization Library is a better alternative.
www.boost.org
XML is crappy format
That statement underlines most people's myopic vision of the XML family of technologies. XML is not a format it is a family of technologies based around a common grammar.
:-) XML was designed for situations where the representation needs of the client are unknown and/or dynamic.
XML is not a bucket.
It is not a passive container for data.
It is a transformable semantic graph.
The heart and sole of XML is XLST it serves as a common 'glue' that allows the transformation between the various standardized 'languages' XML, XHTML, XLST, XSL-FO, SVG, RDF, RSS, etc...
Example; the same XML document (lets say it represents rows in a database) can be transformed into a web page, pdf file, visual graph, rss feed, directed graph, or [insert non-XML text based output of choice]. More importantly the transformation can take place on the client side of a transaction effectively decoupling content and representation.
That being said, I completely agree that XML is over-kill for simple fixed message passing. But, then again simple fixed format message passing isn't what XML was really designed for
--
If you don't know XSLT you don't know XML
OMG!!! TEH GOOGEL IS NOT TEH USIGN TEH STUNDARDZ!!111!!
How DARE Teh Googel use something which hasn't been debated, mused, discussed, hem hawwed, and finally ratified into a preliminary standard by people forwarding a hidden agenda? Why... they are just as bad as Teh MiKKKr0$$$l0th, going off and doing their own thing all the time!!
Where does Teh Googel's evel ever end?
Perl is considered a second-class language at Google. Python is what's used for tasks where others would use Perl.
If Google had tried to build their system on relational databases, XDR, and NFS, they would have spent huge amounts of money and spent lots of time trying to shoehorn their software into those constraints. And it's not just Google that did this: Amazon did the same thing, with their SimpleDB, S3, and SQS.
The actual mistakes were relational databases, XML, and distributed POSIX file systems; all of those were systems designed by people with too much time on their hand and no real-world, large scale problems to solve. Finally, those mistakes are getting corrected, at least when it comes to high-end computing. At the low end, I suppose people will continue to tinker around with those toys.
It look an awful lot like serialized java beans to me. Set, get, make the "class" serilizable, then stream it out over the internet (RMI anyone?) or to a file. Talk about reinventing the wheel. Is this junk really worth open sourcing?
Que?
Comment removed based on user account deletion
Comment removed based on user account deletion
Uh, no. Google officially deems perl unmaintainable, and its internal use is completely verboten.
You're quite welcome to write your own if you want it, but it's not something we'd ever use ourselves.
Android Supported Applications :)
I think this is actually the fastest most compact way possible to encode information. It all depends on how good the compilers are. What they've done is replaces a generalized system like XML with custom written code that works only for the specific messages that are being passed. Nothing could be faster. The objection has always been that writing the custom code is hard. They have solved that issue.
Ok, that's nice of google to release this but...
How many patents do they hold (or are pending) that relate to the design and implementation of this technology?
Will they sue you for using it if you sue them for doing something else?
The big difference is that a protocol buffer cannot be understood without the message format (.proto file). Now lets actually take a look at a real list, like say the developers for apache (as a list of {name:,email:} objects):
protobuf: ~1654 bytesjson: 1915 bytes
protobuf.lzop: ~744 bytesjson.lzop: 809 bytes
What you see is precious little difference in the size of the data even though the json is self-describing. The lzop version is essentially identically sized, and compressing and decompressing with lzo is wicked fast. So size is not a reason to use proto buffers.
Maybe speed is? Instead of using lzo compression just create a JSON binary format. This is trivial, and provides essentially the same size and speed benefits as protocol buffers while still being JSON in nature.
The only advantage to protocol buffers then is that they generate access and verify classes for you in you favorite language (if that language is C++, Java, or Python). Big deal, again this is absolutely trivial.
To me what this demonstrates is premature optimization. Instead, first use a simple text format like JSON then if that is too large compress it. Then if that is too slow send it in binary.
Note: I approximated the size of the proto buffers based on the descriptions of the binary format since I haven't downloaded the code (it actually compresses less well since I did not vary the 'length' bytes in my test file).
Help us provide free content to the world by donating today!
Copyright infringement
From Wikipedia, the free encyclopedia
Jump to: navigation, search
Globe icon
The examples and perspective in this article or section may not represent a worldwide view of the subject.
Please improve this article or discuss the issue on the talk page.
It has been suggested that Statutory damages for copyright infringement be merged into this article or section. (Discuss)
"Copyvio" redirects here. For the Wikipedia term, see Wikipedia:Copyvio.
The Cathach of St. Columba, a seventh century book of psalms. Tradition cited it as the book whose illicit transcription by Saint Columba in 560 AD led to the overturn of an Irish copyright ruling by force of arms.
The Cathach of St. Columba, a seventh century book of psalms. Tradition cited it as the book whose illicit transcription by Saint Columba in 560 AD led to the overturn of an Irish copyright ruling by force of arms.[1]
An advertisement for copyright and patent preparation services from 1906, when copyright registration formalities were still required in the US.
An advertisement for copyright and patent preparation services from 1906, when copyright registration formalities were still required in the US.
Copyright infringement (or copyright violation) is the unauthorized use of material that is covered by copyright law, in a manner that violates one of the copyright owner's exclusive rights, such as the right to reproduce or perform the copyrighted work, or to make derivative works.
Contents
[hide]
* 1 The term "piracy"
* 2 Examples of copyright infringement
* 3 Sample Troll
* 4 Worldwide collaboration to fight copyright infringement
* 5 Legality
o 5.1 The infringement suit in American law
+ 5.1.1 First element: establishing ownership of a valid copyright
+ 5.1.2 Second element: establishing actual copying
+ 5.1.3 Third element: establishing misappropriation
+ 5.1.4 Defenses to infringement
+ 5.1.5 Amendments to the 1976 Copyright Act
o 5.2 British law
+ 5.2.1 Criminal offences
* 6 See also
* 7 References
* 8 External links
[edit] The term "piracy"
The practice of labeling the act of infringement as "piracy" actually predates copyright itself. Even prior to the 1709 enactment of the Statute of Anne, generally recognized as the first copyright law, the Stationers' Company of London in 1557 received a Royal Charter giving the company a monopoly on publication and tasking it with enforcing the charter. Those who violated the charter were labeled pirates as early as 1603.[2]
For electronic and audio-visual media, unauthorized reproduction and distribution is occasionally referred to as piracy or theft (an early reference was made by Alfred Tennyson in the preface to his poem "The Lover's Tale" in 1879 where he mentions that sections of this work "have of late been mercilessly pirated").
APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
I've been working on another alternative binary data encoding technique for a few years. I don't have the big name of Google behind me, but I think my solution has some advantages over these XDR derivatives. Argot (www.einet.com.au) has a binary format, allows dynamic type agreement between client and server, and various other things.
Yet Another Interface Definition Language...
What's wrong with XDR?
3/4 of the companies I've worked for had some engineer who had to unroll his own RPC format with matching IDL for some "technical" reason that had no basis in reality. They were all pretty crummy implementations. All you hot shot engineers, please, just stop re-inventing the wheel.
It's easy to say XML is slow... no one ever planned it to be fast! The reason for XML's existence is to be human readable (especially by people who are used to reading HTML). That's it. People expecting it to be fast are using the wrong tool for the job.
I can argue that XML file does not need to be verbose. I can structure my data any way I want.
I can use short name for XML elements and structure them more efficiently. For example:
is as good as an example given for protocol buffer
person {name: "John Doe"
email: "jdoe@example.com"
}
I guess Google hasn't heard of ASN.1 either, and I'm referring to the binary format of the protocol of course. Who in their right mind would ever use XML on the wire is smiply beyond me and who would design entirely new binary encoding format when extremely efficient design and implementations, namely the ASN.1 already exists, is also kind of beyond me... Way to go Google!
BDAT format lives!
Have gnu, will travel.
I don't understand why they don't use WBXML if they think XML is slow to parse and/or XML files are huge. WBXML has been made exactly to solve those problems, although it isn't that widely known outside mobile world.
OK, Corba IDL and IIOP have some quirks, but they work very well. There are excellent Open Source implementations like JacORB, TAO or IIOP.NET that interoperate very well with each other or J2EE. Google could have been compatible to all this instead of going their own way.
It's obvious that the developers were familar with the flaws of older protocols, and found ways to fix most of them.
Maybe, but no mention is made of ASN.1, which to me suggests a lack of historical awareness. I would have appreciated a comparison. A comment from Kenton Varda, attached to the announcement blog post, reads in part:
Sorry, I personally am not very familiar with ASN.1 DER. A brief look at some documentation suggests to me that it is more complicated than Protocol Buffers, which can be good or bad depending on whether you need that complication.
If it is pre-processed to produce C++ code, Java code, etc... it should be possible to do in XML also without affecting size and speed. It is time to come-up with an "xml to protocol buffers" (de)converter.
Yeah, and I'd like this for the .NET CLR and Mono as well. I looked at the code and the generators are not that complicated, maybe I'll give it a shot over the weekend.
Some people have already mentioned that on the Google Group, so its probably a good idea to go there and compare ideas / combine efforts.
Does Google accept outside contribs for projects like these?
Yes, but I think the guy running it is encouraging separate projects that are then pushed upstream. Internally, this is very mature software, so the release cycle won't be as fast as some people will want, at least while it ramps up.
But, but .. is it compliant with sections 2.1 and 2.12 of RFC1925?
-- Reality checks don't bounce.
Google elevator statement for Protocol Buffers is "a language-neutral, platform-neutral, extensible way of serializing structured data for use in communications protocols, data storage, and more."
Christ, I hope I'm never in an elevator with someone who would consider THAT an elevator statement.
---"What did I say that sounded like 'Tell me about your day?'"---
Not surprising either. I have done similar thiongs several times. Still, it is nice to find this augemented with a reasonable binary encoding and a cross-platform (to some degree) library support.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
That being said, it is still a very nice scripting language to do data parsing and integration on the fly.
Sig it.
you are all missing my original point. Google is open sourcing a tool to read/write a data interchange format that they developed from interaction with Google. Why was the tool necessary in the first place? because They introduced yet another data interchange format. How is this a step forward? This is ANOTHER proprietary format.
Windows Communication Foundation > this garbage.
I always find it amusing when people use the Web to sulk about the faults of XML.
Anyway, this is what Google has to say: .proto file).
However, protocol buffers are not always a better solution than XML â" for instance, protocol buffers would not be a good way to model a text-based document with markup (e.g. HTML), since you cannot easily interleave structure with text. In addition, XML is human-readable and human-editable; protocol buffers, at least in their native format, are not. XML is also â" to some extent â" self-describing. A protocol buffer is only meaningful if you have the message definition (the
Uh, no. Google officially deems perl unmaintainable, and its internal use is completely verboten.
That is so cool...
Bow-ties are cool.
The way Protocol Buffers encode data is similar to how I have designed protocols in the past. But, of course, there are various ways to encode data. Some examples:
- Encode your data in human-readable form, using separators. E.g. s-expressions, CSV, XML, JSON.
- Encode your data using type, length, value tuples. E.g. some encodings in ASN.1.
- Encode your data using type, value (and length, if necessary) tuples. E.g. some encodings of ASN.1.
Then there are choices as to adding indices to quickly jump to interesting parts of the data or skip over uninteresting parts, mechanisms for forward compatibility, etc.
I wonder if anyone has done a comparison of various techniques that can be used in data interchange formats and their impacts on message size, parsing performance, and other interesting quantities.
Please correct me if I got my facts wrong.
Binary encoding, none hierarchy based string list,
and simple file serialization are all faster than XML.
XML was created flexibility, commonality and human readability not speed. XSL, XQuery, and XPATH along with the DOM or SAX supply out of the box query, transformation, and manipulation capability.
The thing about "human readability" is that, just like any other binary file format (ASCII text is a binary encoding too, remember) it is not intrinsically human-readable, rather it relies upon a proper set of tools to make it human-readable.
The counter-argument here is that, while that's true enough, just about every tool in the world can read ASCII files, right? From Blender to Emacs to a simple paginator like "more"...
But except in simple cases that's not sufficient to actually work with the data. In XML for instance one would ideally like a structural representation of the data, the ability to hide a block at a time to streamline the display, etc. Or if editing you'd at least want simple validation features, maybe the ability to match opening tags with closing ones, etc... In theory you can work the data over in any text editor but in practice you would use something more specialized.
If the same specialization is made available for a compact binary format, then it'll be every bit as "human-readable" as an ASCII-encoded one.
Bow-ties are cool.
If anything, I was trying to praise Perl. Guess the mods around here just have a twisted sense of humor.
I noticed a posting in the discussion group questioning the use of little-endian "on the wire" rather big-endian (network byte order). The response was that most of googles computers were little-endian, which seems pretty short-sighted.
XML's not really good at being human-readable, either.
About the only thing XML is really good at is "being widely supported by available tools", which is often quite important.
Wow, define a datatype, and generate code snipets to manage-it. Fantastic! And that's news!?
It seems people is just too bussy reading new acronims, to learn computer programming fundamentals. Go figure!
But... hey!, that's from Google, it must be great somehow... Bullshit!
What's in a sig?
Cool, thanks.
Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
I don't know who you are, young man, but you are a poetic genius.