You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Evan Chooly <ev...@gmail.com> on 2007/07/31 16:26:50 UTC

AjaxLazyLoadPanel updates serialized?

When trying to use two different lazy loaded panels i noticed that they
appear to be serialized.  The current implements uses a
AbstractDefaultAjaxBehavior to create the call back to lazy load the actual
content.  But these calls appear to be serialized in a page.  Would it make
more sense to use a AjaxSelfUpdatingTimerBehavior?  Wouldn't that allow for
parallel execution?  I'm trying that out now but thought I'd get some
feedback in case there is some fundamental point I'm missing about the
current implementation.

Re: AjaxLazyLoadPanel updates serialized?

Posted by Igor Vaynberg <ig...@gmail.com>.
you have to rewrite the panel and create a polling script

so something like:

boolean iscomponentready() {...} in the panel that is called by the polling
script (ajaxtimerbehavior) and when it returns true you then replace the
component. so the work of collecting all that data is done in a separate
thread.

-igor


On 7/31/07, Evan Chooly <ev...@gmail.com> wrote:
>
> On 7/31/07, Martijn Dashorst <ma...@gmail.com> wrote:
> >
> > AFAIUI the serialization already occurs on the server: the session
> > will be locked while you retrieve the panel contents. The client's
> > single request channel makes the congestion on the server less (less
> > threads waiting for access to the user's session).
> >
> > If you have 3 lazy panels on your page, that would mean 3 additional
> > requests going to the server at the same time, using 3 threads on the
> > server. Now imagine 1000 users requesting the same page at once (not
> > that uncommon, aka 9am syndrome)...
> >
> > The session (or rather the pagemap) is sync'd because we need to give
> > each thread exclusive access to the component hierarchy.
>
>
> Hrm.  Is there no way around that?  We have some components that are more
> database intensive to build rather than java and lazy loading them in
> parallel is kinda the point.  Serializing the display, while better than
> nothing, is not terribly ideal.
>

Re: AjaxLazyLoadPanel updates serialized?

Posted by Evan Chooly <ev...@gmail.com>.
On 7/31/07, Martijn Dashorst <ma...@gmail.com> wrote:
>
> AFAIUI the serialization already occurs on the server: the session
> will be locked while you retrieve the panel contents. The client's
> single request channel makes the congestion on the server less (less
> threads waiting for access to the user's session).
>
> If you have 3 lazy panels on your page, that would mean 3 additional
> requests going to the server at the same time, using 3 threads on the
> server. Now imagine 1000 users requesting the same page at once (not
> that uncommon, aka 9am syndrome)...
>
> The session (or rather the pagemap) is sync'd because we need to give
> each thread exclusive access to the component hierarchy.


Hrm.  Is there no way around that?  We have some components that are more
database intensive to build rather than java and lazy loading them in
parallel is kinda the point.  Serializing the display, while better than
nothing, is not terribly ideal.

Re: AjaxLazyLoadPanel updates serialized?

Posted by Martijn Dashorst <ma...@gmail.com>.
AFAIUI the serialization already occurs on the server: the session
will be locked while you retrieve the panel contents. The client's
single request channel makes the congestion on the server less (less
threads waiting for access to the user's session).

If you have 3 lazy panels on your page, that would mean 3 additional
requests going to the server at the same time, using 3 threads on the
server. Now imagine 1000 users requesting the same page at once (not
that uncommon, aka 9am syndrome)...

The session (or rather the pagemap) is sync'd because we need to give
each thread exclusive access to the component hierarchy.

Martijn

On 7/31/07, Evan Chooly <ev...@gmail.com> wrote:
> When trying to use two different lazy loaded panels i noticed that they
> appear to be serialized.  The current implements uses a
> AbstractDefaultAjaxBehavior to create the call back to lazy load the actual
> content.  But these calls appear to be serialized in a page.  Would it make
> more sense to use a AjaxSelfUpdatingTimerBehavior?  Wouldn't that allow for
> parallel execution?  I'm trying that out now but thought I'd get some
> feedback in case there is some fundamental point I'm missing about the
> current implementation.
>


-- 
Wicket joins the Apache Software Foundation as Apache Wicket
Apache Wicket 1.3.0-beta2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/

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