Updated: 11/5/2005; 6:04:41 PM.
Chris Double's Radio Weblog
        

Monday, September 01, 2003

Avi Bryant writes about the advantages of resumable exceptions. I first used restartable exceptions in Dylan. I wrote about my first experiences with it in this comp.lang.dylan thread.

Basically I was processing data in a database using information in another. Sometimes names didn't match up between the two databases. I raised exceptions when these situations occurred deep down in the library and in the user interface code wrote handlers to retry using common mispellings, and if that raised an exception, prompt the user for the correct name to retry. Very useful! Dylan, Lisp (Common Lisp example from Successful Lisp) and Smalltalk exceptions are very powerful.


6:58:48 PM      

Bill Clementson and Avi Bryant have been discussing the problem of sharing a web application session across servers in a continuation based server.

The problem is basically that all state is stored inside the continuation object. A session is composed of multiple HTTP requests. To be nicely load balanced these requests may be served by seperate machines. How does the continuation get marshalled from machine to machine. This is especially a problem if the continuation is based on a language construct like Scheme's call/cc.

The common solution seems to be to limit the entire session to one machine. This solves the problem completely at the expense of less flexibility in load balancing. There's also the problem if the machine fails - a language based non persistable continuation cannot be restored. In practice this may not actually be a problem as Avi mentions.

Another solution is to have persistable continuations. Continuation objects in Sisc scheme are serializable. This means you can save then to a database after each request. You can reload it in another machine and all state is restored. You can shut the server down, restart it and the session can be resumed. The servlet example that is part of the 'contrib' module of Sisc can demonstrate this. You do have to make sure that the continuation doesn't reference any global state otherwise you risk persisting the entire world.


6:45:31 PM      

Via James Robertson: Another Smalltalk weblogger, Richard Demers. He apparently wrote the documentation for BottomFeeder which is very comprehensive - a great job.
6:36:45 PM      

Via James Robertson: Avi Bryant, author of the Seaside web application framework has a weblog. Seaside is a continuation based web application framework written in Smalltalk. Definitely one of the easiest to use - especially with all the great Smalltalk development tools at your disposal.
6:33:20 PM      

© Copyright 2005 Chris Double.
 
September 2003
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        
Aug   Oct



Click here to visit the Radio UserLand website.

Listed on BlogShares

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.