cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Michels <step...@apache.org>
Subject Re: How to Implement a Javaflow Application properly
Date Sun, 12 Sep 2004 10:02:04 GMT

On Sat, 11 Sep 2004, Nikolaus Rath wrote:

> I suspect that Cocoon uses some sort of Serialization to implement
> Continuations and that the size and amount of referenced objects
> directly influences performance.

The JavaFlow stores the Continuable objects in the session, so that
the field have the scope of the session. On the other side the
local variables are stored into the continuation, managed by the
ContinuationManager .


> Therefore I'm playing with the idea to store the application data in an
> external database and to access it using JDBC.
>
> To put it into a nutshell, my questions are:
>  * How do continuations work in general and what should I consider
>    when using them?

The continuation stores the execution state of a function/method
invocation. Nothing more or less.

>  * Is it sensible to use an external database instead of keeping the
>    data in-memory?

How do you do it in your normal webapp?

>  * How can my java flow handler retrieve a component manager? It would
>    be nice if I can use pooled connections.

Yes, you can use the inherited method getComponent() from
AbstractContinuable

>  * Will my db connection persist a continuation?

?? What? You mean if your continuation persist the db connnect?!

Hmm, I'm not an expert, but I would prefer a separate component
to manage the db interaction.

>  * What will happen with other threads when one thread calls
>    sendPageAndWait?

Nothing, I think. The contination manager uses thread locals to the keep
track of the used thread.

> PS: The Flow feature in cocoon is one of the most exciting ideas I've
> ever seen. Really great work - Thanks for all your efforts!

Thanks.


Mime
View raw message