Question

I recently stumbled across DBslayer (http://code.nytimes.com/projects/dbslayer/wiki/WhyUseIt) and wondered what is the actual benefit of using it as an interface to mysql.

As far as I understand, it runs as some kind of proxy for mysql and offers a HTTP / JSON interface. So? Why should I use this setup instead of connecting directly to mysql?

Was it helpful?

Solution

It sits in front of a mysql server and gives you the chance to execute queries through a REST api - so you can use it from any application without going through the headache of establishing database connections and using a driver.

It makes more sense when you need to use the database as a service that multiple apps will use or when you use something like nodejs, which makes it really easy to read and write the json that dbslayer works with.

Check out the why use it link.

OTHER TIPS

MySQL API call is a blocking call. What that means is your thread will wait until your db finished processing.

Such behavior is not desirable for non-blocking network framework such as node.js or Tornado Web.

One real life example of DbSlayer deployment is http://plurk.com

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top