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 revisionBoth sides next revision
at:tutorial:distribution [2009/01/29 15:35] elisagat:tutorial:distribution [2009/01/29 15:36] elisag
Line 270: Line 270:
 </note> </note>
  
-====Distributed unit testing and ''takeOffline''====+====Distributed unit testing and takeOffline====
  
 As previously mentioned, the ''takeOffline'' primitive notifies connected virtual machines when taking an object offline. Since AmbientTalk 2.12, the primitive not only notifies remote virtual machines, but it also notifies the local virtual machine where the ''takeOffline'' was executed so that if any inner actor has local far references to that object, it will also get notified. In other words, if an object is taken offline, all actors holding far references to it (independent of their location) get notified.  As previously mentioned, the ''takeOffline'' primitive notifies connected virtual machines when taking an object offline. Since AmbientTalk 2.12, the primitive not only notifies remote virtual machines, but it also notifies the local virtual machine where the ''takeOffline'' was executed so that if any inner actor has local far references to that object, it will also get notified. In other words, if an object is taken offline, all actors holding far references to it (independent of their location) get notified. 
  
 This semantics are useful for unit test purposes. The unit testing framework shipped with AmbinentTalk has support to perform asynchronous invocations which can be used to perform concurrent or distributed unit tests. However, distributed unit tests couldn't simulate network disconnections as ''network.offline'' works at actor level. In other words, ''network.offline'' simulates a disconnection of the complete virtual machine, but it cannot simulate the disconnection of a particular actor inside the VM. By means of ''takeOffline'' primitive, you can cut the access of an object contained in any actor (within the same VM or a remote VM),  enabling the simulation of the disconnection of an actor inside a virtual machine. This semantics are useful for unit test purposes. The unit testing framework shipped with AmbinentTalk has support to perform asynchronous invocations which can be used to perform concurrent or distributed unit tests. However, distributed unit tests couldn't simulate network disconnections as ''network.offline'' works at actor level. In other words, ''network.offline'' simulates a disconnection of the complete virtual machine, but it cannot simulate the disconnection of a particular actor inside the VM. By means of ''takeOffline'' primitive, you can cut the access of an object contained in any actor (within the same VM or a remote VM),  enabling the simulation of the disconnection of an actor inside a virtual machine.
at/tutorial/distribution.txt · Last modified: 2009/01/30 16:13 by tvcutsem