Mike Driscoll, CTO at Metamarket, published a provocative post on the future of Web Application architectures. He argues that frameworks like node.js signal the end of LAMP.
Three months ago, we decided to tear down the framework we were using for our dashboard, Python’s Django, and rebuild it entirely in server-side Javascript, using node.js. This decision was driven by a realization: the LAMP stack is dead.
Mike sees 3 phases to the Web:
- 1991-1999: The HTML Age - The HTML Age was about documents,
- 2000-2009: The LAMP Age - The LAMP Age was about databases.
- 2010-??: The Javascript Age.The Javascript age is about event streams.
Modern web pages are not pages, they are event-driven applications through which information moves.
He explains:
AMP architectures are dead because few web applications want to ship full payloads of markup to the client in response to a small event; they want to update just a fragment of the DOM, using Javascript. AJAX achieved this, but when your server-side LAMP templates are 10% HTML and 90% Javascript, it’s clear that you’re doing it wrong...
Mike sees that the principal role of the server is to ship an application to the client (Javascript), along with data (JSON), and let the client construct the UI from it. The secondary role of the server is to listen in on a stream for events (a new edit, a message, or ticker change) and efficiently push responses back to clients.
Several people commented:
Bruce Atherton agreed with Mike, but he does not see events flowing through HTTP:
Websockets and SPDY [will] take over the world in that regard, as they are infinitely better suited to the task than HTTP is.
Chase Sechrist showed some concerns about node.js even though he uses it widely:
You still need to know (arguably advanced knowledge) how to debug race conditions and how an event loop works, and even how a call stack works due to recursive callbacks smashing the stack. Because of that, the control flow is very strange and mind-bending to people that have been writing C for 20 years, and even junior engineers that are just getting into programming
"Jorjun" noted that, at the current rate of change, even if this new architecture is justified it will not last:
Within 2 years [there will be] a more productive means of encoding valuable IP. Watch your back, the young ones are coming thru, and Java means nothing to them – they weren’t around in the late 1990s. Javascript is a silly name for a silly language. With curly brackets & geek fudgery & intensely annoying artefacts, to old-skoolers like me Javascript looks hasty, nasty & far too easy to obfuscate.
Asher Snyder, co-founder of NOLOH, agrees with the general premise of the post: "the web should and is moving towards events." but does not believe Javascript will lead the way. He suggests that "we’re heading towards a platform or unified language age, as that’s really the only way the craziness of the web is really manageable for rapid development".
InfoQ talked briefly with Subbu Allamaraju who recently published some performance number comparing node.js with play:
Personally, I find [frameworks like node.js and play] exciting for web developers as they bring in some fresh thinking. Web framework land, particularly on the Java-side have had not such simplicity for a while. Play in particular made a good choice by not layering it on top of Netty and not the legacy servlet framework.
The evolution of Web application architecture is indeed accelerating. It seems that we will land where we started as Web Applications get "thicker", in particular, one can only ask what is left to REST in an event-driven world? We actually don't hear much about REST and its uniform interface lately and how it changed successfully the architecture of Web applications. What is your take on the future of Web Application Architecture? How do you feel about Javascript becoming a mainstream programming language?