Hello,

I want to port a standalone Java application to Cocoon Flow, changing the
view component from Swing to HTML (probably JX generated).

I know that javaflow is still unstable, but that's okay for me. It's
just for private use.

Now I wonder what would be the best way to go in respect to performance
and continuations. I searched hard for some docs about how continuations
work internally but I didn't find anything helpful. 

My current plan is to use a very small handler class (inherited from
org.apache.cocoon.components.flow.java.AbstractContinuable) that calls
the main application with the object itself as the only parameter, so
that the application can use sendPageAndWait.

The thing I'm worried about is the fact that my application loads data
files (3 - 5 MB) completely into memory to work with them. At the end,
the file is written back to disk, overwriting the old one.

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

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?
 * Is it sensible to use an external database instead of keeping the
   data in-memory?
 * How can my java flow handler retrieve a component manager? It would
   be nice if I can use pooled connections.
 * Will my db connection persist a continuation?
 * What will happen with other threads when one thread calls
   sendPageAndWait? 

Many thanks in advance for any help!


bye
Nikolaus

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!




Reply via email to