You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by David Legg <da...@searchevent.co.uk> on 2005/10/11 01:42:26 UTC

Is Flow suitable for high throughput apps?

I've noticed the current trend to use flow for everything (I've just 
finished listening to the Bricks talk at the Cocoon get together 2005).

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.

I'm talking about apps like a search page where some arguments are passed 
and Cocoon runs some business logic to return a results page.  It's tempting 
to use flow to simplify the process of gluing the business objects together 
but would that be a grossly inefficient thing to do in this case?

Regards,
David Legg



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Is Flow suitable for high throughput apps?

Posted by Leszek Gawron <lg...@mobilebox.pl>.
David Legg wrote:
>> Leszek Gawron wrote:
>> If you fear rhino based flowscript might not be performant enough and 
>> all you need are stateless operations - use apples block.
> 
> 
> Thanks.  I've never bothered to look at the apples block.  The 
> 'alternative' to cforms label always frightened me off!
apples block is not an alternative to forms. This is another flow 
implementation (so it is an alternative to javaflow or flowscript).

Daisy CMS has been built around apples - you can checkout the code and 
inspect it yourself.

-- 
Leszek Gawron                                      lgawron@mobilebox.pl
IT Manager                                         MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Is Flow suitable for high throughput apps?

Posted by David Legg <da...@searchevent.co.uk>.
> Leszek Gawron wrote:
> If you fear rhino based flowscript might not be performant enough and all 
> you need are stateless operations - use apples block.

Thanks.  I've never bothered to look at the apples block.  The 'alternative' 
to cforms label always frightened me off!

David Legg



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Is Flow suitable for high throughput apps?

Posted by Leszek Gawron <lg...@mobilebox.pl>.
David Legg wrote:
> I've noticed the current trend to use flow for everything (I've just 
> finished listening to the Bricks talk at the Cocoon get together 2005).
> 
> 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.
> 
> I'm talking about apps like a search page where some arguments are 
> passed and Cocoon runs some business logic to return a results page.  
> It's tempting to use flow to simplify the process of gluing the business 
> objects together but would that be a grossly inefficient thing to do in 
> this case?
If you fear rhino based flowscript might not be performant enough and 
all you need are stateless operations - use apples block.

-- 
Leszek Gawron                                      lgawron@mobilebox.pl
IT Manager                                         MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Is Flow suitable for high throughput apps?

Posted by Reinhard Poetz <re...@apache.org>.
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Is Flow suitable for high throughput apps?

Posted by Mark Lundquist <ml...@wrinkledog.com>.
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...

HTH,
—ml—


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Is Flow suitable for high throughput apps?

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Oct 10, 2005, at 5:00 PM, David Legg wrote:

> I guess I was trying to guage how to treat flow; as an everyday tool 
> or as a powerful solution for complicated multi-page web forms.

It's both!	:-) :-)
cheers,
—ml—


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Is Flow suitable for high throughput apps?

Posted by David Legg <da...@searchevent.co.uk>.
> You don't need to create continuations - cocoon.sendPage() won't create 
> one.

Ah!  Of course!

Yes that helps.  I guess I was trying to guage how to treat flow; as an 
everyday tool or as a powerful solution for complicated multi-page web 
forms.

Regards,
David Legg

----- Original Message ----- 
From: "Upayavira" <uv...@odoko.co.uk>
To: <us...@cocoon.apache.org>
Sent: Tuesday, October 11, 2005 12:50 AM
Subject: Re: Is Flow suitable for high throughput apps?


> David Legg wrote:
>> I've noticed the current trend to use flow for everything (I've just 
>> finished listening to the Bricks talk at the Cocoon get together 2005).
>>
>> 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.
>>
>> I'm talking about apps like a search page where some arguments are passed 
>> and Cocoon runs some business logic to return a results page.  It's 
>> tempting to use flow to simplify the process of gluing the business 
>> objects together but would that be a grossly inefficient thing to do in 
>> this case?
>>
>> Regards,
>> David Legg
>
> You don't need to create continuations - cocoon.sendPage() won't create 
> one.
>
> Does that make it more viable for you?
>
> Regards, Upayavira
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Is Flow suitable for high throughput apps?

Posted by Upayavira <uv...@odoko.co.uk>.
David Legg wrote:
> I've noticed the current trend to use flow for everything (I've just 
> finished listening to the Bricks talk at the Cocoon get together 2005).
> 
> 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.
> 
> I'm talking about apps like a search page where some arguments are 
> passed and Cocoon runs some business logic to return a results page.  
> It's tempting to use flow to simplify the process of gluing the business 
> objects together but would that be a grossly inefficient thing to do in 
> this case?
> 
> Regards,
> David Legg

You don't need to create continuations - cocoon.sendPage() won't create one.

Does that make it more viable for you?

Regards, Upayavira

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org