On 11/10/10, Koen Deforche <[email protected]> wrote: > Given that you insist on being able to do this with plain HTML as > well, I guess Wt does indeed not support this. Although Wt uses an > asynchronous model for I/O (for http and isapi connectors), it > currently uses a synchronous model for delivering an event and > rendering the response. > > Can I ask why you really want this, since deferring the response to > the browser for a plain HTML request is usually going to give rather > bad user experience ?
I'm not sure I follow that (from the user perspective, it should be the same as with a synchronous response). I don't really see how else to provide information derived from a (high-latency) outside source without doing something like this. For a plain HTML response that requires, let's say, a database query, I have two options. One is to query the database and block for the response, blocking the entire thread. For a purely asynchronous/nonblocking model, that's obviously not feasible, as we can't handle other requests while waiting for the database response. For a (partially) threaded model, it will of course work, but will require more threads for coincident requests that arrive. So, you have a bit of an inherent scalability limit. The other option is to submit the database request, and get signalled on a FD when the request is complete. Which is what I'm trying to do. Either way, the page would render and be sent as soon the database query completes, so I don't see much of a difference for the user. Or of course, the third option is to require suitable AJAX and use server-push :) But that's not an option for me. > I can only see it being marginally useful, but on the other hand, it > should not be hard because Wt already has the necessary low level > concepts in place to do this (i.e. to defer responding to an incoming > request). That is good to hear. I was fearing that if this were not already possible in Wt, then it would require radical restructuring (as the conversion from sync -> async usually does). If that were the case, I'd have little hope of support for such a thing that most people don't care about :) And as far as usefulness... well, I think I'd find it useful for me, so I don't mind doing the legwork. Obviously, include it in Wt itself or not as you wish :) > It seems that you have been roaming the source code anyway, so I could > put you on the right track to implement this and and help in finishing > up ? Oh yes, certainly; I fully expected to be doing all of the work that might be necessary. Just don't expect me to be doing so very quickly; while I definitely will be looking into this and am interested in any pointers you have to give, most of my time is occupied with other things. And thanks for the information so far! Already, what you've said is very helpful. ------------------------------------------------------------------------------ Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
