The end of server side tyranny

The first half of the history of computing has been about the server side, with dumb clients.  The second half is going to be about intelligent clients and severely dumbed down servers.

It is instructive to look at this trend from the lens of the browser. The defining technologies on the client side were HTML and HTTP. The browser knew how to fetch HTML, and could display it. Javascript was a much later add-on.

So engineers flocked to the server side. Server side jocks were born.  The bearded, suspender wearing sysadmins of the ’80’s migrated to the shorts and T-shirt crowd of J2EE toting server side gun slingers. The job of the browser was to render HTML. The server’s responsibility was everything else – database lookups, service integration, authentication, validation… – everything.

Soon, Javascript came along. And it was treated with disdain, as a toy. Server side engineers expressed their disdain of a bratty little interpreted language. No self respecting engineer would work on the client side.

But Javascript continued to grow. In spite of all its warts, it continued to grow. (I highly recommend watching this video of Doug Crockford talking about Javascript – the good parts). And all its warts got covered up by very capable frameworks like jQuery. Browser compatibility continues to be an issue to the day, but tools like jQuery do a good job of managing the differences. Soon, this evolved to client side MVC, reactive programming, two way binding – things like backbone, knockout  and other frameworks evolved to meet the needs of more complexity on the client side. And HTML5 provided the ability to manage data, visualization, and state much better on the client side.

Soon, there was a realization – we can offload more of the work to the client. Kicking and screaming, server side work was being dragged to the client side. The Servers role is relegated to providing the data – JSON, typically – to the client ( I acknowledge that I am simplifying things a bit). The client is responsible for determining how to display it.

I still remember a conversation in 2011, where a server side engineer was aghast about the notion of the client side doing anything other than rendering HTML. The attitude was that the browser, and hence the customer, is a necessary evil.

Let’s look at this from the lens of a consumer of data. There is no question that a device, a browser, is necessary. That is how a consumer interactions with your rendition of the data. The fact that a server exists is inconsequential to the consumer. To the developer, the server is a necessarily evil. You MUST have the browser, the mobile app. You NEED the server because the client cannot do everything. Or can it ?

The server as a necessary evil

So what do servers do exactly?

– Serve up data

– Handle connections from lots of clients, to pull up data

– Do analytics on the back end (preprocessed or at runtime)

– Provide security functionality

In reality all of this can absolutely be done on the client side. The problem is about space, bandwidth (network and CPU).

In fact, that is the direction that new frameworks like meteor are going. JS on the client side, JS on the server, like Node.js. But wait, there is more ! Direct access to the database (Mongo) from the client. The data is stored as BSON in Mongo, allowing rapid conversion to JSON, the data format of choice in the browser.

To be clear, there is still a server layer in Meteor. The trend is clear, however – Increasingly, the role of the server side is continuing to be marginalized. It is all about the client and access to data. Dramatic advances in computation power and power consumption on client devices means that more work can be offloaded to the client.

In a decade, the balance of power will flip completely between the server and the client. The server will do niche jobs and large analytics. New applications build on clients will be powered by client side technology – be it JavaScript, Cocoa or client side Java technology.  The smug looks on server side engineers will be run over by smirks on the faces of client side technology experts.