I'm not sure I fully understand your use-case.

You want to parallelize the rendering of the page?
You could potentially do that, but it would be tricky as tapestry goes to great lengths to ensure that pages and components are "POJO", so you don't have to worry about threading. Parallelizing means you're re-introducing threads, basically. But, again, I'm not sure I fully understand what you're trying to achieve. You mentioned elsewhere that each (or at least the majority) of these futures would have to perform an http request... so it sounds like you want to composite a page from disparate html sources? Can you clarify what you're trying to accomplish?

Robert

On May 3, 2009, at 5/33:48 AM , cfineman wrote:


We have an app that's an aggregation of several 'components' (not yet written in Tapestry... using an older in-house framework). Although each component
is not very expensive to create, the aggregate cost can get kinda high
sometimes.

I've been poking around Tapestry for the past couple of days trying to see if I can figure out an elegant way to launch of bunch of "futures" at the start of rendering and then join with them in the "@BeginRendering" handler.

The simplest way I could think to do it is by creating a "@PageAttached" handler in the components that are to be rendered in a farm and creating the
"future" in that method.

I was hoping to find a way to do it in a "container" component that all the "futured" components were in and then crawl the component tree invoking the future on each component with an appropriate tag (perhaps using mixins).
However, there does not seem to be a public way to gain access to the
component tree (the public interfaces don't seem to support this).

Keep in mind, I would like to be able to render most of the page server-side
if possible (otherwise I would have just created a bunch of
javascript-populated divs).

Was hoping to find some slick extension point in Tapestry but it feels like I've not identified the most elegant solution. Does the PageAttached (or perhaps, activate??) feel like the right way to go? Any other suggestions?
--
View this message in context: 
http://www.nabble.com/Using-%22futures%22-to-parallelize-rendering-of-components-tp23353811p23353811.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to