Thursday 5 May 2011

Event-driven web applications

I gave a talk on JAX 2011 on event-driven web applications.

My argument was that AJAX, Push and Mobile Access have changed the way web applications need to work, that latency and efficiency is key now. Put a bit simpler: Where we had documents before, we now have constant interactions. Or, as David Gelernter put it, where we had places (like files) to put something, we know have time-based streams. It is the death of the application state and the rise of the event.

Because HTTP was meant to be structured information, it is stateless. All the software which has been developed for the web, including Java, is therefore built around the transition from stateless to stateful and back. In the future it might very well be that the 3-tier is being replaced by the tiers stateless data (HATEOAS), events and stateful user interface. This goes along the lines of SOFEA, MVVMCQRS or the LMAX architecture.

Next generation non-blocking I/O frameworks like Node.js (or nowadays (this post is written in 2012) Vert.x) will allow purely agent and event based asynchronous behavior. This does not mean it must be purely on the client (like Yahoo Manhatten showed us) or even HTTP, but that tiers are going to be even more loosely coupled than we can imagine, and that API design will become key.



I would like to hear your ideas on that, whether we will go down that road or rather the other directions with technologies such as functional programming, actors (Erlang) or even Software Transactional Memory such as Akka (or Play).