i'm also pretty interested in this problem. even if making wicket fully multithreaded would be extremely difficult (if it's desirable at all), it might be possible to increase wicket's liveness within contended sessions. in particular, there are more and less important ajax requests. if you have a form that is doing a slow db-driven auto-complete ajax request and the user finishes typing or picks a completion and hits submit, it's really not a good thing to block on the now-useless auto-complete ajax request until it finishes before starting the submit. by asking the lower-priority ajax request to stop itself (or by invoking the deprecated and controversial Thread.stop() method... can that even be done in a web app container?) it might be possible to get higher priority threads to preempt and grab the page map lock from lower priority ones. in general the problem with wicket is that it has a stateful and mutable component model. if one thread is busy recursively rendering component A and another thread decides to remove it in the middle of that process, what then? to allow the two threads to both work on the component model, you can either block and serialize the threads (current approach) or you can copy the at least part of the model (and any naive approach here would be totally prohibitive). since a wicket ajax request to do a partial render is often localized to a particular piece of the model, it might be possible to do some tree-granularity lock splitting, but this is a really major piece of work and will require at least a lot of discussion and another release cycle after 1.3 to address.
Daniel Stoch-2 wrote: > > Hi, > > There was a thread in may > (http://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg28185.html) > about two asynchronous ajax calls. I have already the similar problem: > I want to use for example 4 AjaxLazyLoadPanel components and load > their contents asynchronous. But all ajax requests are processed in > sequence ("Channel busy - postponing..."). The Matej's answer was: > > "The requests are asynchronous (they don't block request), > but they are scheduled in channel so one request waits until the > previous one finishes. > > Problem is that the pagemap is locked, so you can't have two requests > running on parallel on the same pagemap. If you have operation that > takes too long you should use a worker thread and a periodical > polling." > > I don't understand why pagmap is locked and I can't have two or more > request processing on the server (what is the reason of such > behaviour)? This is probably well known "synchronization in session" > problem: it solves many issues but today, when people want high > responsive "ajaxified" applications, it seems that it is a too > restrictive (?). > I think the best solution would be, when these request could be > processed simultaneously, but partial page rendering (rendering > components added to AjaxRequestTarget) can be still done in sequence. > I hope this is clear enough :). > Polling is not a very elegant and efficient solution (maybe Comet, but > not all servlet containers support this yet). > > -- > Daniel > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > -- View this message in context: http://www.nabble.com/Multiple-asynchronous-Ajax-calls---once-again-tf4034837.html#a11472185 Sent from the Wicket - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user