Backend as a Service for Web Apps

by Dave Wasmer | last updated May 2012

Update: this article is a few years old by now. I've kept it up for historical purposes, but the landscape has changed significantly since then.

As the list of *-as-a-service’s continues to grow, I thought I’d throw one into the mix. What about the idea of a backend-as-a-service (BaaS)?

The recent surge of client side Javascript frameworks along with the attractiveness of simple RESTful APIs has created an environment where server-side interaction can be reduced to simply database interaction (including validation and some computation). But why stop there?

What if the server-side of the equation was simply a RESTful, schema-less API? It could utilize MongoDB or some other document-oriented storage to avoid a strict schema definition, and even infer data relationships from the inbound URLs.

For rapid prototyping, I think this would be amazing. Move your entire app development into the browser - just point Backbone.js or similar framework to the proper root URLs for their storage, and suddenly everything is down to client side HTML/CSS/JS.

Obviously, this won’t work for everything. High performance applications may need to tune their backend for speed. Security would be a major concern as well, but could be managed similarly to Amazon’s S3 permissions, combined with authentication tokens sent on each request.

The only other hiccup I see would session management. Traditionally, session management (and related issues like user authentication) are handled through the server side.

But ultimately, a cookie-based session is simply a way of tying a particular user to a particular storage record for session data. If that cookie were replaced with a Javascript token, not much would change on a conceptual level. Also, third party authentications could play a large part here. OAuth providers can handle much of the security role.

Ultimately, I think this would help developers produce faster while eliminating the need to hop back and forth across the increasingly obsolete divider between server and client side.


I should mention - I realize Parse (and others) already have released a BaaS. But those focus largely on mobile deployments, and as far as I can tell, their primary value is in auto-generating model code and SDK’s to handle the REST calls. They don’t seem to offer anything for browser-based apps.