- From: Bjoern Hoehrmann <derhoermi@gmx.net>
- Date: Mon, 07 Jul 2008 00:33:27 +0200
- To: Zhenbin Xu <Zhenbin.Xu@microsoft.com>
- Cc: Sunava Dutta <sunavad@windows.microsoft.com>, "public-html-comments@w3.org" <public-html-comments@w3.org>, Chris Wilson <Chris.Wilson@microsoft.com>, IE8 Core AJAX SWAT Team <ieajax@microsoft.com>
* Zhenbin Xu wrote: >There are still things about the async model that I don't quite understand, such as >how to track the replies -- if 5 postMessge is called consecutively, how to handle >out-of-order reply? It seems to me that the only sensible solution here, while not required by the current draft, is that postMessage adds to a queue on the Window and the events are dispatched in the order of the postMessage calls. As far as I can tell both Firefox and Webkit do this and thus gurantee the ordering. Out of order messages would then only occur when the sending application is misbehaving; there is little that can be done about this kind of problem beyond maintaining a boolean state whether a message is expected or not (request-response protocols usually imply just that). In any case, it seems that implementations cannot gurantee order beyond dispatching the events in postMessage call order without more features for applications to specify their ordering requirements, and they would have a hard time to ensure that the messages would be dispatched out of this order, so one way or the other, developers will see that they come in some specific order almost always, and not seeing for what reason it should be necessary to implement their own ordering mechanism, they'll build content that depends on this order and the specification will re- flect that some day. -- Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de 68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Received on Sunday, 6 July 2008 22:34:07 UTC