otm:ordering_of_messages:fifo

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
Next revision Both sides next revision
otm:ordering_of_messages:fifo [2011/06/27 05:21]
aspectscript
otm:ordering_of_messages:fifo [2011/06/27 05:25]
aspectscript
Line 1: Line 1:
 +====== The FIFO strategy ======
 +
 A mashup application is created from the combination of information retrieved from different servers, //e.g.// Housing Maps. Programmers have to overcome the issue of creating an incorrect Web page due to an arbitrary (and unexpected) order of server responses. For instance, consider a Web page that is created with two Ajax requests. If the second server response is processed before the first server response, the Web page is created incorrectly. A **FIFO** strategy, which processes the server responses in the same order as the Ajax requests are sent, ensures that the Web page is always created correctly. A mashup application is created from the combination of information retrieved from different servers, //e.g.// Housing Maps. Programmers have to overcome the issue of creating an incorrect Web page due to an arbitrary (and unexpected) order of server responses. For instance, consider a Web page that is created with two Ajax requests. If the second server response is processed before the first server response, the Web page is created incorrectly. A **FIFO** strategy, which processes the server responses in the same order as the Ajax requests are sent, ensures that the Web page is always created correctly.
  
Line 11: Line 13:
 </html> </html>
  
-The Fifo strategy is implemented as a TM advice, which is a JavaScript function, that is executed every time a response is retrieved+The FIFO strategy is implemented as a piece of advice, which is a JavaScript function, that is executed every time a server response is received
  
 <code javascript> <code javascript>
Line 20: Line 22:
   }   }
   else{   else{
-    jp.proceed ( ) ;+    jp.proceed() ;
     this.idServerRespExpected = request.idServerResp + 1;     this.idServerRespExpected = request.idServerResp + 1;
    // executing jp proceeds that can be executed now    // executing jp proceeds that can be executed now
Line 28: Line 30:
 </code> </code>
  
-Go back the [[otm/ordering_of_messages|the parent page]] web page.+Go back the [[otm/ordering_of_messages|the parent Web page]].
  • otm/ordering_of_messages/fifo.txt
  • Last modified: 2012/02/06 17:16
  • by aspectscript