This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
at:tutorial:distribution [2009/01/29 15:39] elisag |
at:tutorial:distribution [2009/01/30 16:10] tvcutsem *fixed |
||
---|---|---|---|
Line 72: | Line 72: | ||
- 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, | + | When a remote far reference receives a message, it flushes the message to the remote object providing that it is connected. If the remote far reference is disconnected, |
- | Therefore, a remote far reference | + | Therefore, a remote far reference |
< | < | ||
Line 88: | Line 88: | ||
</ | </ | ||
- | This code illustrate | + | This code illustrates |
- | In order to cope with partial failures, AmbientTalk also allows developers to retract all currently unsent messages from the remote far reference outbox by means of the '' | + | In order to cope with partial failures, AmbientTalk also allows developers to retract all currently unsent messages from the remote far reference outbox by means of the '' |
- | The '' | + | The '' |
< | < | ||
Line 102: | Line 102: | ||
</ | </ | ||
- | The construct | + | The '' |
The function '' | The function '' | ||
Line 116: | Line 116: | ||
A leased object reference is a remote far reference that grants access to a remote object for a limited period of time. When the time period has elapsed, the access to the remote object is terminated and the leased reference is said to //expire//. Similarly to remote far references, a leased reference abstracts client objects from the actual network connection state. Client objects can send a message to the remote object even if a leased references is disconnected at that time. Message are accumulated in order to be transmitted when the reference becomes reconnected. When the leased reference expires it, messages are discarded since an expired leased reference behaves as a // | A leased object reference is a remote far reference that grants access to a remote object for a limited period of time. When the time period has elapsed, the access to the remote object is terminated and the leased reference is said to //expire//. Similarly to remote far references, a leased reference abstracts client objects from the actual network connection state. Client objects can send a message to the remote object even if a leased references is disconnected at that time. Message are accumulated in order to be transmitted when the reference becomes reconnected. When the leased reference expires it, messages are discarded since an expired leased reference behaves as a // | ||
- | {{ : | + | {{ : |
====Working with leased object references==== | ====Working with leased object references==== | ||
Line 227: | Line 227: | ||
import / | import / | ||
</ | </ | ||
- | < | + | < |
leasedrefs module exports support primitives to manipulate time intervals (i.e. '' | leasedrefs module exports support primitives to manipulate time intervals (i.e. '' | ||
</ | </ | ||
- | More information pertaining to the API of the leased references language module can be found in the appendix. | + | More information pertaining to the API of the leased references language module can be found in the [[appendix|appendix]]. |
===== Taking Offline Remote Objects ===== | ===== Taking Offline Remote Objects ===== | ||
Line 243: | Line 243: | ||
</ | </ | ||
- | The primitive takes as parameter an object which is removed from the export table of the actor where the code is executed. When the object is removed from the export table, all remote far reference to the object become invalidated and the object no longer belongs to the set of root objects and as such, it can be eventually reclaimed by Java's local garbage collector once it is no longer locally referenced. Although the actual reclamation of an unexported object may be triggered at a later point in time, any attempt to access via a remote far reference results in an ObjectOffline exception notifying the client object that the object was taken offline and thus, the remote far references is invalid. | + | The primitive takes as parameter an object which is removed from the export table of the actor where the code is executed. When the object is removed from the export table, all remote far reference to the object become invalidated and the object no longer belongs to the set of root objects and as such, it can be eventually reclaimed by Java's local garbage collector once it is no longer locally referenced. Although the actual reclamation of an unexported object may be triggered at a later point in time, any attempt to access via a remote far reference results in an ObjectOffline exception notifying the client object that the object was taken offline and thus, its remote far references is invalid. |
- | < | + | < |
- | [[distribution# | + | [[distribution# |
</ | </ | ||
Line 272: | Line 272: | ||
====Distributed unit testing and takeOffline==== | ====Distributed unit testing and takeOffline==== | ||
- | As previously mentioned, the '' | + | As previously mentioned, the '' |
+ | |||
+ | These semantics is useful for unit test purposes. The [[appendix# | ||
- | This semantics are useful for unit test purposes. The [[appendix# | + | By means of the '' |