mo.notono.us

Sunday, March 02, 2008

Concept: The 'Serverless' Database-Driven Web Application

For some time now I've been intrigued with the notion of using free hosted services such as Google Base or Google Docs as back-end databases for simple consumer-oriented web applications.  I'm not sure what drives my fascination, other than an irrational but predictable attraction to anything free.

In any case, since the debut of Google Base it has been easy to offload the database itself to Google.  As long as your load is within a certain limit, Google is happy to take your data load.

It will also let you query and read data anonymously, so you can offload that process to each end-user's browser, through the JSON API and client side processing of the results

Ok, so, now we have:

  • DB and DB queries: hosted at Google
  • Reads and processing of read data: JS on Client
  • Presentation: JS/HTML on Client

What's missing?  Writes of course.  Google, probably wisely, have so far chosen to restrict Google Base writes and updates to authenticated users.  Which means you still needed some server code to handle POST requests and wrapping the request with authentication data.  Makes sense.  Right? 

Yes. Except they have now decided to open up Google Spreadsheets to accept data input through a Forms interface.  Which means it is now VERY possible to post data to Google anonymously - thereby removing the final need for your server-based code.  Granted - it's not Google Base, but for simple (non-relational) storage needs, Google Spreadsheet does quite nicely.

Take the following boring spreadsheet: http://spreadsheets.google.com/ccc?key=pc5YG43xKfFnIQuvcVzRjZA&hl=en.
Reads are still simple GETS, and the querying can be done at Google (quite speedily, I might add):
http://spreadsheets.google.com/feeds/list/pc5YG43xKfFnIQuvcVzRjZA/od6/private/full?sq=id%3DSayHello

So far this is pretty much the same as Google Base.  But it also accepts anonymous input from a form: http://spreadsheets.google.com/viewform?key=pc5YG43xKfFnIQuvcVzRjZA.

Go ahead and enter some data and go back to the spreadsheet - as you can see it is updated live.  This form can easily be faked in JS (though that may be against Google's Terms of Service).

Next time I have some serious downtime I'll have to reproduce squrl.us in pure JS/Google format.  And then maybe wrap it up as an iGoogle and/or a Facebook widget...

Labels: , , , , ,

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home