Web Continuation Servers
One interesting concept that I forgot to mention in my review of
Beyond Java is that of a Web Continuation Server.
Web continuations can change the way we think about web applications. In the servlet world, we develop web applications with
a callback paradigm. i.e when a user clicks a link, the servlet container calls the doGet() method of our servlet.
Web Continuations invert control (The notion of control is in the mind of course ;). This means our server side code would call the
container to dispatch a page to the user and wait till the web container gets back to it with a result. When the container gets back with the
result (which means that user has initiated one more request) , the code continues execute from where it last left.
Web continuations makes us think in a linear fashion i.e we can think of HTTP requests and responses as printfs and
scanfs over the network and web applications can be coded like command line applications. It also makes web applications
inherently stateful. Since our code continues exection from the last line it executed before dispatching the page, we don't have to
do any additional steps to store the state(no storing/retrieveing data from HttpSession)
While continuations simplify web applications I am not sure if they would remain simple if
the web app deals with complex navigations. Moreover I think most developers have stopped coding servlets. We use
either a tool or a framework and deal with web applications at a higher level. And lastly frameworks like href='https://rife.dev.java.net'>RIFE have proved that web continuations are possible in Java too. So even if you
do want to use a continuation server, you don't need to think beyond java.