Notes Information Apocalypse

Overloading the MQL Acronym

MQL must be one of the most overused technology acronyms that nobody's heard of, including (but definitely not limited to) such specificities as search/analytics, automated trading, and molecular substructure matching. Two of the more interesting mini-languages wanting to be known as the 'MQL' have been quietly disseminated by Metaweb and Thoughtworks over the past few months, and their separate novel characteristics makes them both worth a further look, if only to better understand what the alpha geeks are up to. While created with remarkably divergent goals in mind, the two languages share the common characteristic of radically discarding the use of XML, which is usually considered to be the 'common sense' approach for developers in both these specific areas.

MQL as the Metaweb query API opens up the massive tuple space of Freebase to custom client queries, enabling third-party applications to retrieve almost any kind of information imaginable. This open-ended potential just wouldn't be possible with the standard approach of passing a hash of parameters over HTTP, but instead of trying to rebuild SQL inside some kind of crazy XML messaging dialect they've opted for a pure JSON approach, using the javascript object literal syntax as a novel method of tuple matching. Instead of using logical expressions to narrow down the requested set of data (SELECT FROM things WHERE something IS some type of thing AND another thing IS NOT yet another type of thing) it simply expects to be passed an object that defines the relationships between types and their object structure that is expected (LIST things BEING THE name OF THE type WITH objects OF type). Objects can be nested too, which makes for a crazy level of possibilities (In static type systems, people are accustomed to saying IS A to describe the mapping between name and type of an object, rather than BEING which I used above to make this point more clear). Metaweb treats this relation in a much more direct sense - types are objects themselves, represented as path components rather than language constraints, which solves some fairly thorny problems with flexible schema evolution. When you've parsed the entire corpus of Wikipedia into your system and started linking all the logical relationships up, you need the kind of mythically impossible API that is both extremely simple and extremely flexible. Metaweb solved the problem brilliantly, by jacking Freebase over a format that almost every browser and programming language in the world understands. Bravo! Snort! Snort! If you've been sucked in to the black hole of relational databases, your brain will benefit from the turnaround of rethinking the concept of a 'type' and being able to easily mash up massive amounts of data by sending little objects back and forward.

The other MQL takes a somewhat opposite approach, actually going so far as to create a new template language based on emphasizing the style of logical clauses that the Metaweb API rejected and going so far as to throw them into direct wiki contact. This is actually a tiny component of Mingle, a project management tool which is really too big to properly discuss in this context (merely the killer app for JRuby in Rails, rolled into one serious overdose of high level software intelligence). One of the features of Mingle is a customizable project dashboard page called the 'Overview' which uses a column grid layout that can be customized wiki style with a markup language which is called; well... if you've read this far - you've pretty much figured out the deal: Excel inside a wiki (with import/export capabilities). Any project with multiple developers checking in code, will automatically trigger various information flows that can be queried by inserting select statements and pivot tables into the main project page. Instant visual visibility of all kinds of aspects of your project with very low overhead for customization.

What can be learned from both these examples of MQL? Mingle and Freebase are examples of highly adaptive software that can be reconfigured as it is used. Interestingly enough, they are both based on the wiki concept, of live editable chunks of content, but they move away from pages into offering a new kind of structured editing experience. Powerful stuff at opposite ends of the spectrum. Freebase has become a massive encyclopedia of how we organize and describe the world. Mingle is moving the wisdom of crowds into small scale group intelligence, adding new kinds of value to the everyday interactions of creative knowledge workers. To succeed, they both needed to break the rules a little. Is MQL merely an incidental accident, or will it become the next big little-language? And which one?