rob.tweed's blog

M/DB:X now morphs into a JSON/XML Hybrid Database

The new Build 4 of M/DB:X transforms it into something very exciting and wholly unique. M/DB:X is now not only a Native XML Database. By now also supporting JSON strings as inputs and optionally outputting its responses as JSON strings instead of XML, M/DB:X is now a JSON/XML hybrid database.

What's the significance of this? Well there are several important consequences:

If you feed a JSON string into M/DB:X's Parse Action, it will convert the JSON object into a corresponding XML DOM and store it. Now in XML DOM format, all the standard M/DB:X XML DOM API methods can be used to modify and manipulate what was originally a Javascript object, and the XML DOM can be searched using XPath. This is a very cool capability and extremely powerful.

The DOM can be returned in JSON format: M/DB:X will convert any XML DOM into a corresponding JSON object.

This now places M/DB:X in esteemed company: for example CouchDB and Persevere. JSON is increasingly being used as the lingua franca for describing objects, not just Javascript objects.

And unlike CouchDB which is still an alpha-grade Apache project, M/DB:X is underpinned by the tried and tested GT.M database with its solid commercial pedigree in the demanding banking industry.

The M/DB:X documentation will be updated to reflect the new JSON capability as soon as possible, but Build 4 is available for immediate download and use.

Watch this space for the next step which will be a mechanism for requesting a temporary secure token to allow restricted access to M/DB:X directly from a browser. This will allow M/DB:X to act as a persistent Javascript object store without the need for an intermediate proxy layer (except to make the authenticated request for a token). This is what CouchDB is aspiring to be but they're still struggling, it seems, with the security layer!

Oh and just for good measure, if you add the name/value pair OutputFormat=JSON to M/DB, it too will output its responses as JSON rather than the standard Amazon SimpleDB format XML !

See for full details and documentation.

Furthermore, renowned XML database guru Ronald Bourret has added M/DB:X to his definitive list of Native XML Databases.

M/DB:X - Lightweight Native XML Cloud Database

This is a brand new concept: an XML Database that's simple and easy to use, entirely accessed via HTTP/REST, and ready for use in the Cloud. There's nothing else like it out there, and it's ready to turn the whole idea of handling and storing XML on its head!

It's called M/DB:X, it's already released and it's ready for use. You can get all the details at

So what, in a nutshell, is M/DB:X?

It's an XML database for the Cloud.

What does that mean? Well, it's a set of REST services that allow you to create and manipulate persistent XML Document Object Models (DOM). You can import XML Documents either as a stream of XML that you send to it in a REST request, or you can ask M/DB:X to fetch a file over the Internet, perhaps from an Amazon S3 bucket.

Alternatively you can build a DOM from scratch, starting with an empty shell containing just a single tag to which you add new tags using simple REST requests.

So what? It can store XML? What's the big deal?

Well, once a DOM is created in M/DB:X you can:

* Display it using the outputDOM Action. The XML document is returned in the HTTP response
* Search the contents of the document using XPath queries
* Inspect the properties of its nodes
* Modify the properties of its nodes
* Add new nodes
* Remove existing nodes
* Transform a document in any way you like using a combination of the above
* And, of course, finally delete the document

..all using simple REST requests.

There are, of course, Native XML Database out there already, but what differentiates M/DB:X is two key things:

- its simplicity. M/DB:X disposes of most of the formality and complexity normally associated with handling XML

- you access it using HTTP/REST requests and it returns its responses as XML.

Basically it's like Amazon SimpleDB meets XML in the Cloud!

All the other Native XML Databases are heavyweight and very formal affairs, built around the concept of XML being validated against a schema and with rigorous adherence to XML namespacing rules.

M/DB:X throws all that away and takes the "good enough" approach, simplifying the concept right
down. Much as SimpleDB provides a place where you can throw together spreadsheet-like databases without any need for pre-defining a schema or indexes, M/DB:X allows you to quickly and easily throw together XML documents and play around with them in any way you like.

M/DB:X also bucks the trend by using a non-validating parser. Basically you can throw anything that looks vaguely like XML at M/DB:X and it will do its best to turn it into an XML DOM. It won't return errors and it won't complain that what you gave it doesn't conform to a particular schema or that it wasn't properly structured XML. If it can turn it into a DOM, it will.

This will have the XML gurus out there wailing and gnashing their teeth of course! So why's this a cool thing and not a problem?

Well, for example, it means that you can get it to import "lazy" structured HTML pages from any URL you like and it will tidy it up as best it can and turn it into an XML DOM for you. Once it's done that for you, you can analyse that page, take bits out of it, find stuff in it, all using proper XML techniques and XPath queries instead of hacking about with the raw page text.

Relax, however: give M/DB:X a properly structured valid XML document and it will produce the DOM you'd expect!

Speed, simplicity, ease of operation and near-zero administration are the objectives of M/DB:X.

It's a simple-to-install extension to the M/DB Virtual Appliance, so you can be up and running in no time at all.

XML databases just got simple! Go and check it out!

Oh, and did I mention: M/DB:X is free Open Source software.


M/DB is now Open Source

Hot on the heels of our release of EWD as an Open Source product, we're now doing the same with M/DB, releasing it as a Free Open Source product licensed under the GNU Affero General Public License Version 3.

A new build of the M/DB Virtual Appliance is now available for download. This contains full source code for M/DB in the directory /usr/local/gtm/ewd. The names of the M/DB Mumps routines are prefixed "MDB".

By releasing M/DB as Open Source software, we're hoping that others will assist in extending its capabilities. Areas where additional effort would be welcomed include:

- emulating the new Select action that has been added to SimpleDB
- backup and other maintenance facilities, packaged as REST services

The new release includes the new Free Open Source standalone m_apache gateway. You should notice a significant increase in performance: M/DB is now blindingly fast!

We hope you all enjoy the new Free Open Source M/DB, a product that showcases the internet-scale capabilities of Mumps technology, and its pre-eminence as a schemaless, hierarchical database.


Well, after all that talk about Mumps as an Internet-scale hierarchical, schemaless database, we decided to do something about it:

We are pleased and excited to announce M/DB, our new API-compatible alternative to Amazon's SimpleDB. M/DB makes use of the inherent natural hierarchical, schemaless characteristics of the Mumps database to deliver an identical experience to SimpleDB.

Actually M/DB's use of Mumps has allowed it to pull off two tricks that differentiate it from SimpleDB:

- SimpleDB limits you to just 1k per attribute which many people find to be just too limiting. M/DB increases that to 32k (and I think that, too, can be increased).

- SimpleDB treats everything as text, so if you need to hold integer or real values and make comparative queries on them, you have to do extremely tedious tricks such as packing them out with leading zeros. M/DB's underlying Mumps engine, of course, applies its dynamic data-typing, so numbers behave properly as numbers without needing any
packing whatsoever.

The initial beta release of M/DB is in the form of a VMWare Virtual Appliance, so it can be used as a standalone "black-box" database, accessed via its REST APIs. The Virtual Appliance has been built using GT.M and our latest version of the MGWSI gateway which provides direct HTTP access to the GT.M engine via Apache.

If anyone is interested in building their own M/DB system on top of an existing GT.M or Cache platform, get in touch. Yes, you saw that correctly: M/DB will also run on top of Cache.

We believe that M/DB heralds a new role for the Mumps database technology in the Internet-scale database world, particularly for cloud service providers who want to produce an alternative or back-up to SimpleDB.

For more information about M/DB, visit our web site at

By the way, we're looking for others to consider adding value-added services to M/DB through simple, abstracted REST APIs. Backup and other such administrative tasks is one area that comes to mind. Get in touch if you have any thoughts and ideas.

Syndicate content