Mark Lundquist wrote:
Hi David,
On Oct 10, 2005, at 4:42 PM, David Legg wrote:
I think flow is fantastic, but I wonder if users would still be
recommended to use custom actions and business objects instead of flow
when dealing with high-traffic, non-stateful web pages? The idea of
all those continuations being maintained by the server for a
high-volume page makes me shudder.
Remember, a continuation is only created when you ask for one.
Typically, that means when you call Form'showForm() or
cocoon.sendPageAndWait() (which is called from (Form'showForm()).
(That's using flowscript as an example... not sure how it looks in
javaflow, but it'd be the same idea).
If you just invoke a flow that ends with (in flowscript)
cocoon.sendPage, no continuation is created.
If you are using continuations, then it's for a stateful interaction,
but then you'd have no more concern about scalability than you would
doing it any other server-side way using a traditional
(non-continuation-oriented) framework, e.g. using session variables...
But we aware that all local variables in a flow function are created for all
calls:
var x = Packages.myBusinessObject();
function y() {
var z = Packages.myOtherBusinessObject();
}
If a single user (= session) calls "y" 5 times, you get one myBusinessObject and
5 myOtherBusinessObject objects.
Also note, that myBusinessObject can be garbage collected when all continuations
expire, the myOtherBusinessObject instances expire when the last continuation
of the related continuations tree expires.
A continuation tree consists of all contunations that are created after function
y is called.
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]