User Tools

Site Tools


at:tutorial:distribution

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
at:tutorial:distribution [2007/04/26 20:07] elisagat:tutorial:distribution [2007/04/26 20:13] elisag
Line 51: Line 51:
 The code block to execute when the service type becomes available is parameterized with the actual remote reference to the discovered service object. In the example above, ''messenger'' is a remote reference to the remote object exporting the ''InstantMessenger'' service type. Imagine the interaction between the instant messenger applications executing the above code of two persons, e.g. Bart and Lisa. When the instant messenger of Bart and the instant messenger of Lisa come into one another's communication range, Bart will discover Lisa and Lisa will discover Bart via the ''InstantMessenger'' service type. Then, both will interchange their names and store it in their ''buddyList''. The code block to execute when the service type becomes available is parameterized with the actual remote reference to the discovered service object. In the example above, ''messenger'' is a remote reference to the remote object exporting the ''InstantMessenger'' service type. Imagine the interaction between the instant messenger applications executing the above code of two persons, e.g. Bart and Lisa. When the instant messenger of Bart and the instant messenger of Lisa come into one another's communication range, Bart will discover Lisa and Lisa will discover Bart via the ''InstantMessenger'' service type. Then, both will interchange their names and store it in their ''buddyList''.
 <note> <note>
-We are using a future to get the return value of the ''getName'' asynchrnonus message invocation. For further details about futures and the ''when:becomes:'' language construct, we refer the reader to the previous chapter on the concurrency model of AmbientTalk.+We are using a future to get the return value of the ''getName'' asynchrnonus message invocation. For further details about futures and the ''when:becomes:'' language construct, we refer the reader to the previous chapter on the [[actors|concurrency model of AmbientTalk]].
 </note> </note>
  
Line 61: Line 61:
 ===== Partial Failure Handling ===== ===== Partial Failure Handling =====
  
-Let us consider again the example instant messenger application described in previous subsection to further explain the semantics of AmbientTalk's remote object references and how they deal with transient disconnections. When an object discovers a service type, the ''when'' observers are triggered receiving as parameter a remote far reference to the remote object discovered. As explained in previous sections, far references operates asynchronously. When a client object sends a message via a remote reference, the message is buffered in the remote far reference and the client does not even wait for the message to be delivered. This is crucial in distributed computing in order to prevent race conditions. The parameter passing in the context of distribution works similar to the inter-actor message sending semantics:+Let us consider again the example instant messenger application described in previous subsection to further explain the semantics of AmbientTalk's remote object references and how they deal with transient disconnections.  
 + 
 +When an object discovers a service type, the ''when'' observers are triggered receiving as parameter a remote far reference to the remote object discovered. As explained in previous sections, far references operates asynchronously. When a client object sends a message via a remote reference, the message is buffered in the remote far reference and the client does not even wait for the message to be delivered. This is crucial in distributed computing in order to prevent race conditions. The parameter passing in the context of distribution works similar to the inter-actor message sending semantics:
  
   - Objects are always passed by far reference, except for isolate objects which are passed by copy.   - Objects are always passed by far reference, except for isolate objects which are passed by copy.
   - Native data types are always passed by copy.   - Native data types are always passed by copy.
 +
  
 When a remote far reference receives a messages, it flushes the message to the remote object providing that it is connected. If the remote far reference is disconnected, messages are accumulate in its inbox in order to be transmitted once the reference becomes reconnected at a later point in time once the network connection is restored.  When a remote far reference receives a messages, it flushes the message to the remote object providing that it is connected. If the remote far reference is disconnected, messages are accumulate in its inbox in order to be transmitted once the reference becomes reconnected at a later point in time once the network connection is restored. 
at/tutorial/distribution.txt · Last modified: 2009/01/30 16:13 by tvcutsem