PDA

View Full Version : New York Times releases DBSlayer



Tampa1adam
February 19th, 2008, 12:29 PM
For more info check out:
http://code.nytimes.com/projects/dbslayer

Once installed and configured, DBSlayer (http://code.nytimes.com/projects/dbslayer) starts up a DBSlayer daemon on port 9090 which acts as a proxy for the backend MySQL server. This proxy can then be queried via HTTP (http://code.nytimes.com/projects/dbslayer#ExampleUsage). The response from the query is returned in the JSON (http://en.wikipedia.org/wiki/JSON) format.

These techniques combined, in my opinion, work GREAT for AJAX (http://en.wikipedia.org/wiki/AJAX) applications.

DBSlayer is built on top of the cross-platform MySQL and Apache Portable Runtime libraries and has been tested on Linux and Solaris-x86 boxes but should work on more machines! A source package for Unix systems can be downloaded here (http://code.nytimes.com/downloads/dbslayer-beta-10.tgz).

eilsoe
February 19th, 2008, 01:39 PM
uh-huh, uh-huh... aaand what exactly does this do...?

biznuge
February 19th, 2008, 02:05 PM
I think it makes a lot of people a lot of money a lot of the time...

or saying that it might just banjax whatever puter it touches...

biznuge
February 19th, 2008, 02:07 PM
*UPDATE*

I clicked the link and apparently i've won the namibian lottery, with an overall prize pot of $9,000,000 (U.S Dollars). All I have to do claim is send my bank account details to a Mr. Ugaki Nmetembo in Windhoek and he'll wire me the money.

lucky I was so intrigued i clicked... :pleased:

ramie
February 19th, 2008, 02:47 PM
I didn't get no namibian lottery, just the project page, seems legit.

This is very tasty, used properly could cut out an entire layer within a web stack.

I.E query the DB directly from flash or JS and have a JSON object returned (no middle man like .net, rails or php), could be a possible problem exposing your DB by querying it over http tho, perhaps I'll post some findings when I try it.

Tampa1adam
February 19th, 2008, 03:07 PM
This is very tasty, used properly could cut out an entire layer within a web stack.

I.E query the DB directly from flash or JS and have a JSON object returned (no middle man like .net, rails or php), could be a possible problem exposing your DB by querying it over http tho, perhaps I'll post some findings when I try it.

Exactly!

I haven't tested anything with it yet, but I don't see where you specify the user/pass for the database/table in that query so it could be a potential security issue?

As for you biznuge I don't know what to tell you. The link works fine for me & ramie apparently??

ramie
February 19th, 2008, 03:14 PM
The user and pass are configured in the DBSlayer server configuration or passed to the server via a command line argument when starting it.

It only supports GET requests over http, so perhaps non destructive queries only?, however you still expose the table structure by querying it over http, I'm defo going to give this a whirl, it looks fantastic on the surface...

EDIT: they advise that it's used for selects and internal network use only... I could imagine this being used as a cache generator to build JSON docs and dump in a public directory for clients to consume :geek:

biznuge
February 19th, 2008, 04:29 PM
lolz. obviously my sarcasm was lost on the fact that this is legit.

aplologies. :devious: