at:tutorial:distribution
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
at:tutorial:distribution [2007/05/04 08:34] – * elisag | at:tutorial:distribution [2007/05/04 09:05] – * elisag | ||
---|---|---|---|
Line 69: | Line 69: | ||
Let us consider again the example instant messenger application described in previous section to further explain the semantics of AmbientTalk' | Let us consider again the example instant messenger application described in previous section to further explain the semantics of AmbientTalk' | ||
- | When an object discovers a service type, the '' | + | When an object discovers a service type, the '' |
- 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. | ||
Line 92: | Line 92: | ||
This code illustrate how the instant messenger application notifies when a buddy goes online or offline. In the above code, '' | This code illustrate how the instant messenger application notifies when a buddy goes online or offline. In the above code, '' | ||
+ | |||
+ | In other to cope with partial failures, AmbientTalk also allows developers to retract all currently unsent messages from the far reference outbox by means of the '' | ||
+ | |||
+ | The '' | ||
+ | |||
+ | < | ||
+ | when: Service discovered: { | reference | | ||
+ | when: reference disconnected: | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | The construct returns a table containing copies of all messenges that were sent to this far reference, but not yet transmitted by the far reference to the remote object pointed to. Note that this has the side effect that the returned messages will not be sent automatically anymore; the programmer is thus responsible to explicitly resend all messages that were retracted but still need to be sent. | ||
===== Garbage collecting remote references ===== | ===== Garbage collecting remote references ===== | ||
Line 107: | Line 121: | ||
</ | </ | ||
- | On the client side, taking offline an object results in a permanent disconnection of the remote references pointing to it. In other words, despite having network connection, unexporting an object renders remote far references permanently disconnected. This implies that client have to deal explicitly with unexported objects. To this end, '' | + | On the client side, taking offline an object results in a permanent disconnection of the remote references pointing to it. In other words, despite having network connection, unexporting an object renders remote far references permanently disconnected. This implies that client have to deal explicitly with unexported objects. To this end, '' |
< | < | ||
Line 121: | Line 135: | ||
< | < | ||
- | The complete implementation of the instant messenger application explained along this chapter can be found in the file at/ | + | The complete implementation of the instant messenger application explained along this chapter can be found in the file '' |
</ | </ |
at/tutorial/distribution.txt · Last modified: 2009/01/30 16:13 by tvcutsem