cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: [RT] flow machinery
Date Tue, 25 Oct 2005 21:31:36 GMT
Torsten Curdt wrote:
> Gang,
> there are a few things regarding the current flow machinery that
> are bugging me for quite a while now. In order to support flow
> serialization they need to be addressed.
> 1. Class vs Interface
> The WebContinuation is currently a class. IMO it makes much more
> sense to turn it into an interface an have the individual "FlowEngine"
> implementation act as a factory. That way javaflow could create
> WebContinuations that implement Serializable.


> 2. Naming
> The name JavaInterpreter just misses the point. I would like to
> rename the "Interpreter" interface to something like "FlowEngine".
> Other suggestions are welcome.

+1 as well. I even proposed it 2 years ago [1] ;-)

> 3. Continuation Management
> When it comes down to serialization of flow there are 2 aspects.
> One is flow persistence and the other one is flow replication
> across machines.
> In order support flow persistence we would need the make the
> ContinuationManager save and reload serializable continuations.
> ...which is not big deal. Unfortunately replication is a slightly
> different subject.
> The distributed ContinuationManagers would need to synchronize
> the continuation trees across the network or at least find a way
> to direct to the appropriate server that holds the continuation.
> TBH ...I am not eager to re-invent the wheel here. In fact this
> whole machinery is already in place for sessions. Why not re-use it?
> In fact I don't really see a big point of having web continuations
> without sessions anyway.

+1 again. There aren't many real use cases where continuations span 
several sessions. And being tied to session may be one of the 
constraints/requirements to use clustered continuations.

> Assuming the continuations are stored inside the session, storing
> and restoring the sessions would take care of the persistence.
> Directing to the server with the right session also assures to
> get to the right cocoon instance running the right ContinuationManager.

Yup. This is required also for load balancing.

> Flow replication itself should then also be solved by session
> replication without any further effort. The only open question
> is the continuation expiry mechanism. It might be good enough to
> just run the expiry on every machine ...I am wondering how that
> might affect the replication though.

Looks like HttpSessionActivationListener can by our friend here, as it 
allows session attributes to be notified when a session is passivated 
and activated.



Sylvain Wallez                        Anyware Technologies
Apache Software Foundation Member     Research & Technology Director

View raw message