otm:ordering_of_messages

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 [2011/01/12 03:36]
aspectscript
otm:ordering_of_messages [2011/06/27 06:19] (current)
aspectscript
Line 1: Line 1:
-====== Ordering of messages ======+====== Controlling Message Causality ======
  
-[[http://en.wikipedia.org/wiki/Ajax_%28programming%29|Ajax technologies]] are a group of interrelated Web development methods used on the client-side to create interactive Web applications. With Ajax, Web applications can retrieve data from the server or other clients asynchronously in the background. As the figure below shows, a Web application sends //requests// to the network (eg. servers or other web applications) and later this Web application retrieves //responses//, which are processed by user defined functions, named //callbacks//.  +{{ :otm:ajax.png?533x270 |}}
  
-{{ :otm:webordering.png?352x253 | Ajax requests }}+A Web application can send several Ajax requests to different serversHowever, the application can retrieve and process the server responses in an arbitrary order; meaning that this application may behave nondeterministically due to the lack of control of the causality between Ajax requests and server responses. For example, the figure shows that if a WebApp sends 
 +two Ajax requests to a server, two scenarios are possible:the server returns server response 1 followed by server response 2 or vice versa. Depending on the expected behavior of the Web application, different strategies to control the message causality can be used. We now present 
 +three Web applications that require three different strategies:  
  
-Unsurprisingly, the responses can be retrieved in an arbitrary order, which not necessarily respect the order in which their associated requests are sent. This feature brings unexpected (and not easily controllable) results when these responses are processed in a particular order. To control these unexpected results, OTM allows developers to define //expressively// the strategy of order of the executions of these responses. Next, we present three examples that show the use of different strategies of ordering. 
  
-  [[otm/ordering_of_messages/Fifo|Fifo]]. The fifo strategy executes the responses in the same order in which their associated requests are sent. This example illustrates how to define and use the fifo strategy to create and show correctly a Web page.  +  [[otm/ordering_of_messages/Fifo|FIFO]]. The FIFO strategy processes the server responses in the same order as the Ajax requests are sent. This example illustrates how to define and use the fifo strategy to create and show correctly a Web page. 
-  - [[otm/ordering_of_messages/Discard Late|Discard Late]]. The discard late strategy does not execute the responses that are retrieved late (//eg.// the first response is not executed or skipped if the second was already executed). This example illustrates how to define and use the discard late strategy to show correctly the flow of a streaming media. +
-  - [[otm/ordering_of_messages/Discard Early|Discard Early]]. The discard early strategy does not execute the response that are retrieved early (//eg.// the second response is not executed if the first has not executed yet). This example illustrates how to define and use the discard early strategy to show correctly the posts of a thread in a forum.+
  
-Go [[|OTM home]].+  * [[otm/ordering_of_messages/Discard Late|Discard Late]]. The Discard Late strategy discards the late (and obsolete) server responses. This example illustrates how to define and use the discard late strategy to show correctly the flow of a streaming media. 
 + 
 +  * [[otm/ordering_of_messages/Discard Early|Discard Early]]. The Discard Early strategy discards early server responses. This example illustrates how to define and use the discard early strategy to show correctly the first posts of a thread in a forum. 
 + 
 +Using WeCa, which combines [[en.wikipedia.org/wiki/Aspect-oriented_programming|aspects]] and [[http://en.wikipedia.org/wiki/Vector_clock|message ordering strategies]], we develop these strategies. 
 + 
 +Go [[../weca|WeCa home]].
  • otm/ordering_of_messages.1294817777.txt.gz
  • Last modified: 2011/01/12 03:36
  • by aspectscript