Hi,

I have used [1] for similar task some times ago. I needed to make calls to
external services which took some time. Wicket renders the components
sequentially so the total time was the sum of all. By using FutureModel I
reduced it to the time of the slowest external call.
There is also a Java version at [2]. I haven't used it though.

Another approach would be to use ComponentRenderer#renderComponent() that
uses a temporary page. This way you can render the panels in parallel and
then use the HTMLs as model objects of Labels


1.
https://github.com/wicketstuff/core/blob/master/jdk-1.7-parent/scala-extensions-parent/wicket-scala/src/main/scala/org/wicketstuff/scala/model/FutureModel.scala
2.
https://github.com/wicketstuff/core/blob/master/jdk-1.7-parent/minis-parent/minis/src/main/java/org/wicketstuff/minis/model/FutureModel.java

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Sun, Jun 14, 2015 at 12:04 PM, Robert Gründler <[email protected]>
wrote:

> Hi,
>
> our backend application has a page containing ~20 panels which render
> health-checks of different components in our
> infrastructure. Each one of these checks can take some time (~ 10 seconds)
> until it timeouts if the background-component
> is not reachable.
>
> Until now we’ve used AjaxLazyLoadingPanels to render those panels, but due
> to the fact, that wicket can only run
> one ajax request at a time on a single page, this can result in extremely
> long loading times until all panels are displayed.
>
> I’ve tried to implement the panel rendering using websockets - but it
> seems i’m running in the same problem like the concurrent
> ajax request issue - meaning that when i spawn the loading of the
> expensive panel in the background, which page instance
> should i use to render the panel?
>
> So my question is: Is there a way to render multiple panels concurrently
> in wicket? Which each panel having it’s own timeout?
>
> regards
>
>
> robert
>
>
>

Reply via email to