[Monetdb-developers] DBSlayer for MonetDB
Hi, I have set up a development server for OpenStreetMap that allows 'Joe Regular' to perform /any/ SQL request on a dataset limited to the borders of The Netherlands, Belgium and Luxembourgh. That means around 700MB of data. Because OpenStreetMap mainly targets webdevelopment, making it easy-to-use and efficient-to-parse become key issues. Because my favorite webserver [1] implemented DBSlayer [2] technology for MySQL; I could plugin an architecture layer to support different databases. MonetDB is in beta phase, and PostgreSQL is coded. The output is available in native PHP, Python and Ruby arrays; JSON, and XML-RPC is coded but not yet in production. The attached script shows a trivial example how to query a database farm over the web. Hanging more servers under the webserver, automatically increases performance and redundancy. I configured the webserver in such way that a rewrite takes place if no LIMIT was specified. Because the requests are URIs, every request is logged, what makes it possible to analyse the performance and benchmark the test set against new releases. With this platform I am able to plugin my multicolumn 'optimizer' idea, so we all benefit. To the outside Mapi is available, for accessing it by our mclient or ODBC client. If our 'native' Ruby/Python MAPI implementations are ready for testing, I can promote them on the site, or provide a sandbox. The site itself is still boring; http://xapi.openstreet.nl:8000/ Stefan [1] http://www.cherokee-project.com/ [2] http://code.nytimes.com/projects/dbslayer #!/usr/bin/env python import urllib sql="SELECT lat, long FROM nodes_legacy, node_tags WHERE id = node AND k = 'amenity' and v = 'atm';" query = urllib.quote(sql) print 'Original:', sql print 'Encoded:', query url = 'http://xapi.openstreet.nl:8000/python/%s'%(query) response = urllib.urlopen(url) print 'RESPONSE:', response print 'URL :', response.geturl() headers = response.info() print 'DATE :', headers['date'] print 'HEADERS :' print '---------' print headers data = response.read() print 'LENGTH :', len(data) print 'DATA :' print '---------' obj = eval(data) print obj
participants (1)
-
Stefan de Konink