cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Judson Lester <>
Subject Re: first impressions on continuations idea
Date Fri, 01 Feb 2002 18:53:32 GMT
Hey there Ovidiu.  I don't know if Allan reads the dev list, but regards if 
he's listening.

> > But I've made my way through the papers you sent, and the relevant
> > threads - I really love it.
> I loved it too when I saw it the first time ;-)
Which makes at least three of us.  Too often the navigational flow of a site 
is lost because it's entirely encoded at the document level, or in an 
instance by instance level.  It would be so much better to be able to 
describe it all in one place.

> > Would a session not be the appropriate place to store continuations and
> > associated data?   The URL strikes me as a really bad idea, as it should
> > be a logic-level address (ie rather than an implementation
> > level (  Under what circumstances might you wish not to
> > resort to session?
> This is a good question.
> If you look at the concept of session in the servlet environment, you
> realize it's only a way to save state across HTTP requests. But with
> continuations, you no longer need this! The continuation saves in it
> the complete stack frame of calls, including local variables. When a
> continuation is resurrected, it will contain the values for all the
> local variables you declare.
> What you're referring to is probably not session, but cookies. The
> problem is you cannot use cookies to encode the continuation's URL, as
> this would prevent the user from hitting the back button. This happens
> because the cookie is set globally, for the whole domain. Hitting the
> back button will not change the cookie's value to point to the right
> page.
> So clearly you need a way to encode the continuation's URL in the page
> itself, rather than assign it to a cookie.

I personally agree with Allan, that trying to encode a user in his URL is 
problematic.  However, I don't see why it would be impossible to establish a 
cookie backed session, and then store the coninuation tree in the session, 
with a map of URLs to continuations.  This gives you the session-hijacking 
protection established by Servlet session scopes, but allows you to also get 
back-button-to-previous-continuation feature that Ovidiu has slowly brought 
me to understand completely.  

> The last step is to write a translator from a more friendly language
> to Scheme. This is the hardest part, as I'm not sure what features
> this language needs to have. I'm trying to decide on this, and
> prototype a little bit with it.

Did you want to discuss at all your thinking in this regard?

To unsubscribe, e-mail:
For additional commands, email:

View raw message