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:32] – * 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 93: | Line 93: | ||
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 108: | 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 117: | Line 130: | ||
</ | </ | ||
- | Be aware that unexporting a object will not only trigger the takenOffline observers but also the disconnected observers since the taking offline event is also considered as a logical disconnection between two devices. Unlike | + | Be aware that unexporting a object will not only trigger the takenOffline observers but also the disconnected observers since the taking offline event is also considered as a logical disconnection between two devices. Unlike |
Note that disconnection, | Note that disconnection, | ||
< | < | ||
- | The complete implementation of the instant messenger application explained along this section | + | The complete implementation of the instant messenger application explained along this chapter |
</ | </ |
at/tutorial/distribution.txt · Last modified: 2009/01/30 16:13 by tvcutsem