{"id":456,"date":"2009-09-15T16:34:09","date_gmt":"2009-09-15T22:34:09","guid":{"rendered":"http:\/\/jaredrobinson.com\/blog\/?p=456"},"modified":"2009-09-15T16:34:09","modified_gmt":"2009-09-15T22:34:09","slug":"xml-for-documents-not-for-large-data-streams","status":"publish","type":"post","link":"https:\/\/jaredrobinson.com\/blog\/xml-for-documents-not-for-large-data-streams\/","title":{"rendered":"XML for documents, not for large data streams"},"content":{"rendered":"<p>I like XML, and I hate XML. XML is great because robust parsers already exist for nearly every programming language, thus saving work for programmers and reducing bugs. XML stinks because it&#8217;s not always the right tool for the job &#8212; it&#8217;s ugly, and it&#8217;s bulky. So when I read Michael E. Driscoll&#8217;s [comparison of documents (including XML) to trees and data to streams](http:\/\/dataspora.com\/blog\/the-rise-of-the-data-web\/), it struck a chord with me:<\/p>\n<p>> Trees are rooted and finite: you can&#8217;t chop up a tree and easily put it back together again. Streams can be split, sampled, and filtered. The divisibility of data streams lends itself to parallelism in a way that document trees do not. The stream paradigm conceives of data as extending infinitely forward in time. The Twitter data stream has no end: it ought have no end tag. Conceiving of data as streams moves us out of the realm of static objects and into the realm of signal processing.<\/p>\n<p>He also [explains why XML shouldn&#8217;t be used for large data streams](http:\/\/dataspora.com\/blog\/xml-and-big-data\/):<\/p>\n<p>> XML is a poor language for data because it solves the wrong problems &#8212; those of documents &#8212; while leaving many of data&#8217;s unique issues unaddressed. But many promising alternatives exist &#8212; microformats like JSON, Thrift, and even SQLite&#8217;s file format.<\/p>\n<p>I wouldn&#8217;t have thought of using SQLite&#8217;s file format &#8212; it has become somewhat ubiquitous. I admire Google ProtocolBuffers and Apache Thrift for offering open source, multi-language binary encoding for data. Now programmers won&#8217;t be as likely to reinvent the wheel, and they can rely on robust libraries.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I like XML, and I hate XML. XML is great because robust parsers already exist for nearly every programming language, thus saving work for programmers and reducing bugs. XML stinks because it&#8217;s not always the right tool for the job &#8212; it&#8217;s ugly, and it&#8217;s bulky. So when I read Michael E. Driscoll&#8217;s [comparison of &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jaredrobinson.com\/blog\/xml-for-documents-not-for-large-data-streams\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;XML for documents, not for large data streams&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-456","post","type-post","status-publish","format-standard","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/comments?post=456"}],"version-history":[{"count":10,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/456\/revisions"}],"predecessor-version":[{"id":466,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/456\/revisions\/466"}],"wp:attachment":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/media?parent=456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/categories?post=456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/tags?post=456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}