====== Distributed JAsCo! ====== JAsCo now supports a true distributed setup that has very powerful distributed features. Aspects can intercept joinpoints executing on other hosts and are also able to execute their advices on other hosts. This work is a collaboration with the [[http://www.emn.fr/x-info/obasco/|OBASCO group]] of Ecole Des Mines de Nantes in the context of [[http://aosd-europe.net|AOSD-Europe]]. The following paper describes the AWED language and the DJAsCo implementation: * Benavides Navarro, L., Sudholt, M., Vanderperren, W., De Fraine, B. and Suvee, D. Explicitly distributed AOP using AWED. In International Conference on Aspect-Oriented Software Development, ACM Press, March 2006. The DJAsCo website focuses on the implementation and technical realization of AWED. For more information regarding AWED and it concepts, we refer to the AWED website: [[http://www.emn.fr/x-info/lbenavid/awed.html]]. Remember that the current implementation is still a prototype and that many features are still lacking.... ===== Setup ===== In order to activate the distributed setup, simply lauch all VMs using the following VM option: **-Djasco.distribution.enabled=true** Also make sure that the jasco-distribution.jar is in your classpath. ===== Language Additions ===== ==== Remote pointcuts/Distributed Advice ==== There are two new pointcuts for allowing to execute advice on other hosts and select joinpoints specific to certain hosts. These pointcuts are specified as usual, i.e. in the hook's constructor: * **joinpointhost**(ip:port) : only joinpoints from host ip:port (port is optional) * **joinpointhost(localhost)** : only joinpoints from the local host (not from remote hosts) * **executionhost**(ip:port) : execute advice on host ip:port (port is optional) * **executionhost(joinpointhost)** : only execute advice on host of joinpoint These can also be combined using logical operators. e.g. //joinpointhost("10.0.4.10")&&!executionhost("10.0.4.10")// will intercept joinpoints on host 10.0.4.10 and execute the advices on all hosts except host 10.0.4.10. **NOTE:** //The **joinpointhost** keyword is equivalent to AWED's **on** pointcut designator and executionhost is equivalent to AWED's **host** pointcut designator// ==== Distributed Deployment==== It is also possible to limit the deployment scope of the connector so that it does not work distributed. The following options are available using annotations placed in front of the connector specification: * @Distribution(value=Distribution.Type.LOCAL): The instantiated aspects will not be distributed to other hosts for advice execution * @Distribution(value=Distribution.Type.FULL): The instantiated aspects will be distributed to other hosts for advice execution (default) **NOTE:** //The **FULL** deployment is equivalent to AWED's **all** deployment and the **local** deployment is equivalent to AWED's **single** deployment// ==== State Sharing==== It is possible to share state between several aspect instances of the same aspect type that are possibly deployed at several hosts. This can be done by supplying the [[http://ssel.vub.ac.be/jasco/nightly/doc/jasco/runtime/distribution/annotation/Shared.html|Shared]] annotation to an aspect field or aspect declaration. Sharing can either be: * **local**, meaning that all aspect instances of that type on the same host (but possibly in different VMs) share the same value. Aspects on other hosts do not synchronize with that value. * **global**, meaning that all aspect instances in the complete system will share one value. Updates are synchronized between the different hosts. Warning: use with caution since synchronizing all hosts might induce a serious performance overhead. * **group**, all aspect instances of a type share their value only within the same group, aspects deployed on hosts belonging to other groups will have a different value. (tbi)