We have “database APIs” such as abstraction layers over multiple SQL databases and ORMs. But why not take it to the next step and make it a REST API like any other network call that we can make?

Database as a REST API
Database as a REST API

Advantages would be:

Did we just sort-of reinvent Datomic?

Of course, this is not a new idea at all, take restSQL as an example – my question is why is this not talked about more often?

Do most frameworks support this? If not, why not? If so, why don’t most frameworks don’t talk about such a use case in their documentation? If I use Django, I’ll start writing the models and use South to create migrations, and that’s that. If I have to reuse those model, from say, Java, then you’re on your own. The point is that, by default, Django (or Rails) doesn’t encourage you to do such a thing. If you go for a lighter framework such as Flask, then this becomes easier because the ORM is anyway not part of the framework.

Is this concept felt needed only in a polyglot case (multiple database systems, multiple programming languages)?

P.S. Also read Stevey’s Google Platforms rant.

Update on [2013-04-28 Sun]: Also see the very useful tech talk Designing a Beautiful REST+JSON API.

Last Saturday, we were hanging out with A R Karthick who was gracious to take us exploring the Monterey Bay – the three highlights for the day were:

Mystery Spot was interesting and the strange phenomenon there could only be explained by some kind of magnetic force, we would literally stand at an angle in the centre of the mystery spot, and the host was very comic and entertaining, so the visit felt worth it.

Ocean View Boulevard is one of the most beautiful places to drive around and we actually saw a couple of weddings in the open lawns on that road which gives an idea of how scenic that place was.

17-Mile Drive was a nice drive along the coastline. The fun part for me was when Karthick decided to teach me how to drive in the USA and I was so nervous of all the rules (solid line vs. dotted line, whoa!), but he taught well and I got the hang of it, although, maintaining an average of 60 miles per hour on the highway is daunting as I’m not used to those speeds.

A R Karthick
A R Karthick
Leaning in Mystery Spot
Leaning in Mystery Spot

(more…)