On Wed, Feb 15, 2017 at 10:29 PM, guillaume.mary <[email protected]> wrote:
> Martin Grigorov-4 wrote > > On Wed, Feb 15, 2017 at 9:41 PM, guillaume.mary < > > > guiom.mary@ > > > > > > wrote: > > > >> Martin Grigorov-4 wrote > >> > Hi, > >> > > >> >> > >> >> Did I miss something ? if not is there anything planned about async > IO > >> in > >> >> Wicket 8 ? > >> >> > >> > > >> > There is no planned support for asynchronous pages for Wicket 8! > >> > >> Is there some technical (known) reason ? Or just because of roadmap > >> decision > >> ? > >> I mean, if i have some time can I try to implement it or does it have > >> some > >> technical hard difficulties ? > >> > >> Did anyone already try and didn't manage to do it ? > >> > > > > AFAIK no one tried. > > > > In what use cases it would be helpful ? > > > > Imagine the following: > > 1) the user clicks a link > > 2) onClick() is fired > > 2.1) some slow operation is started in the background > > 2.2) the request is suspended > > 2.3) the slow operation produces a result > > 3) how exaclty the resume will execute the rest of the body of onClick() > > to > > finish the business logic and then re-render (parts of) the page ? > > I wasn't thinking to such a scenario, I agree this is complex to implement. > I though to the final "push" into the OutputStream of the ServletResponse. > I > though that Wicket buffers its response into memory before writing it to > the > stream, this could be done asynchronously. But I'm maybe wrong. If this > could be done it would help the server because at such a moment there's no > more business logic to be done by the application. > But maybe Wicket also has work (Thread dependent) to do after that ? > I am not sure how good such change will be! If the content is already prepared then it would be better just to flush it in the current thread. Otherwise the context switch and the scheduling will delay the write, so the complete request cycle time will be bigger than now. The asynchronous servlets are useful if your logic needs to block on some external resource. While waiting for the external resource it is better to release the http worker thread so the web server can handle another request with it. Once the external resource is available asyncContext.dispatch() will request a new http worker thread. Once the web server has an available thread it will use it to actually do the dispatch. > > > > -- > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/Wicket-8-and-servlet-3-1-async-nio-tp4677098p4677126.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
