Skip to main content

Introducing the MonetDB RESTful proxy

Since the release of the MonetDB Node.js module, we embarked on a small project to provide a RESTful interface to MonetDB. The MonetDB RESTful Proxy [1] [2] gives you a REST interface to access common database functionality.  In addition the proxy has an extended functionality for easier handling of JSON documents. Like a few other relational systems, MonetDB provides JSON data type and support for path-based filtering. The proxy ships separately from the database and is currently made available for experimentation, rather than a replacement of established interfaces and protocols.

This project is our way to say: Systems bridging the functionality gap between relational and document stores will be the clear winner in the long run. NoSQL based solutions generally shine at providing RESTful database interactions and lack of schema for document storage. Our approach is to allow for document storage in tables, letting users store and query documents without setting schema, while still provide relational semantics for non-document queries. Relational databases, coupled with JSON support (and a REST interface), can provide a nice symbiosis of document storage and relational tables.

One important feature of the MonetDB RESTful Proxy is extensibility: you can add new URL routes, endpoints and functionality with just a few edits to the sources. Using the available SQL and built-in JSON filtering in MonetDB, backed by Node.js, you can easily add new document-based functionality that suits your needs. For example, if you want to extend the search operations on documents, you need only edit the the routes/_database/_document/find.js file and create a new endpoints based on the existing one. Alternatively, you can create a new file, e.g. for statistical facets support, drop it in the routes/_database/_document/ directory and restart the app. Since the files are indexed at startup, the new routes/endpoints will be automatically added. For more information check the readme [1]. Feel free to try it out on your own.

To illustrate some of the capabilities of the proxy we have written a small hands-on tutorial [3]. See the extended tour on giving you a peaceful rest (pun intended), knowing that REST is at your fingertips in MonetDB as well.

[1] https://github.com/MonetDB/monetdb-rest

[2] https://www.npmjs.com/package/monetdb-rest

[3] https://github.com/MonetDB/monetdb-rest/blob/master/TUTORIAL.md