Friday, September 30, 2011

Restandra


JavaScript Testing

For my honours project, I have been working a on RESTful HTTP database connector for the distributed database Cassandra (RESTful + Cassandra = RESTandra). Thankfully the programming side of it is almost done, which leaves the problem of testing.

RESTandra is essentially a RESTful Cassandra API (integrated into the 0.8-dev build of Cassandra), the interface is merely a URL, this makes things like user testing unnecessary, as the components of the URL are specified by the hierarchy of Cassandra & the principles of REpresentational State Transfer.

This leaves actually testing the performance of RESTandra, which causes quite a big problem, as Cassandra is designed to handle very large amounts of data. To tackle this I developed a distributed method of testing in JavaScript. The test 'page' here: http://restandra.dyndns.org:18220/ attempts to simulate the traffic of a real application through a series of AJAX requests to a RESTandra/Cassandra cluster. While the test is running, it times how long the test application takes to preform the set read/write/edit/delete operations and then submits the results to a server outside of the cluster, for processing.

The 'test' page is delivered though HTTP from RESTandra. This is certainly not the best way to serve web pages, however, due to JavaScript's same origin policy, it's necessary (you cant have both RESTandra and a HTTP server running on the same port).

Thanks for your interest in my project and if you can spare the processor cycles, please run the test for as long as you can.


Test Page souce (RESTandra is only set up to deliver 1 page, therefore all the scripting is in the head of the page):


Thanks, Jonny


No comments:

Post a Comment