otm:ordering_of_messages:discard_late

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
otm:ordering_of_messages:discard_late [2011/06/27 08:31]
aspectscript
otm:ordering_of_messages:discard_late [2011/06/27 08:34] (current)
aspectscript
Line 1: Line 1:
-Web applications typically update data from servers (//eg.// whether, time, streaming media, dollar rates, thread posts). Developers have to overcome the issue of using obsolete data due to a late response of a server. For example, consider a website that shows an [[http://en.wikipedia.org/wiki/Streaming_media|streaming media]] using several ajax requests. If responses of ajax requests are retrieved in wrong order, the streaming media cannot be observed correctly. A solution could be to wait for all frames, however, this solution could delay to much the streaming media. A better solution is to discard the late frames (//a.k.a// frame skip) to show the streaming media. The **DiscardLate** strategy discards the late responses of ajax requests (obsolete responses). As an example, we present below a streaming media about a fight (the streaming media is finite by simplicity). This example shows the effects that reproduce in a streaming media when frames are retrieved in a random order.  +====== The Discard Late Strategy ====== 
 + 
 +Web applications typically update data from servers (//eg.// whether, time, streaming media, dollar rates, thread posts). Developers have to overcome the issue of using obsolete data due to a late response of a server. For example, consider a website that shows an [[http://en.wikipedia.org/wiki/Streaming_media|streaming media]] using several Ajax requests. If server responses of Ajax requests are retrieved in wrong order, the streaming media cannot be observed correctly. A solution could be to wait for all frames, however, this solution could delay to much the streaming media. A better solution is to discard the late frames (//a.k.a// frame skip) to show the streaming media. The **DiscardLate** strategy discards the late server responses. As an example, we present below a streaming media about a fight (the streaming media is finite by simplicity). This example shows the effects that reproduce in a streaming media when frames are retrieved in a random order.  
  
 When the "activate order" button is clicked, the streaming media is shown in the correct flow. When the "deactivate order" button is clicked, the streaming media is shown a random flow. **NOTE:** Please first watch the application without clicking the "activate order" button to appreciate clearly the aforementioned issue.  When the "activate order" button is clicked, the streaming media is shown in the correct flow. When the "deactivate order" button is clicked, the streaming media is shown a random flow. **NOTE:** Please first watch the application without clicking the "activate order" button to appreciate clearly the aforementioned issue. 
Line 18: Line 20:
   var request = jp.target ;   var request = jp.target ;
   if (this.idServerRespExpected <= request.idServerResp) {   if (this.idServerRespExpected <= request.idServerResp) {
-    jp.proceed() ;+    jp.proceed();
     this.idServerRespExpected = request.idServerResp + 1;     this.idServerRespExpected = request.idServerResp + 1;
   }   }
Line 29: Line 31:
 </code> </code>
  
-Go back the [[otm/ordering_of_messages|the parent page]] web page.+Go back the [[otm/ordering_of_messages| parent Web page]].
  • otm/ordering_of_messages/discard_late.1309163500.txt.gz
  • Last modified: 2011/06/27 08:31
  • by aspectscript