pmuellr is Patrick Mueller, Senior Node Engineer at NodeSource.

other pmuellr thangs: home page, twitter, flickr, github

Monday, March 27, 2006

Tate on Continuations

Just read Bruce Tate's article Crossing borders: Continuations, Web development, and Java programming. I pretty much grok continuations; I definitely get the block concept ala Smalltalk, and once you get that, things like continuations don't look so unusual.

But here are some odd points that he made, at the bottom of the article:

New advances in Web development are rapidly making the continuations approach much more important. Rather than fetching whole Web pages with the traditional request/response models, Ajax applications can asynchronously fetch a small part of a Web page and weave the results into an existing page. But Ajax applications tend to force an application to maintain a connection to a user for long periods of time to keep applications responsive and keep state tracking easy to code. That practice defeats the purpose of stateless programming because you do need to hold resources for each connected user. With continuations, you can keep the state in a continuation and restore the state on demand.

I'm not sure that Bruce gets the whole Ajax thing. Ajax doesn't force any kind of connection as he suggests. The thing with Ajax is that you finally get to do client-side programming; keeping the state on the client, where it belongs. I have no idea what he's even trying to say here.

In the near future, hardware improvements will make the added resource consumption of continuations less critical. Without a major overhaul, Web development frameworks will still be too complicated. Ajax threatens to complicate Web development even more. These factors are all converging to drive the acceptance of continuation servers. In two years, most new Web development will use some continuation server or some simulation of continuations.

What hardware improvements are these? Hardware improvements that will make it cheaper to do continuations in Java? I doubt it; it seems to me there are few hardware changes that impact Java at all; it is a virtual machine, after all! I imagine he must be thinking about virtualization stuff that's coming. But I don't think the enhancements for virtualization are intended to scale to virtualizing our servers over thousands of users. But you never know; I used to use VM/CMS for development back in the day, and it in fact virtualized a 'machine' over hundreds of users. Still, isn't virtualizing a machine for a single web user a bit overkill?

w/r/t Ajax complexity: I know some folks who have recently switched from a traditional J2EE web app development story to an Ajax-based one, and from what I hear (and see, from the app), they are making a lot more headway in getting the app done than they were with the traditional tools. Is it complicated? It's different; not sure it's any less complicated than the traditional tools. It certainly appears to be much more productive.

In two years, I would be very suprised if most new web development is using continuations. Since I don't see a PHP version.

No comments: