Explicitly distributed AOP using AWED † Luis Daniel Benavides Navarro, Wim Vanderperren, Bruno De Fraine, Mario Su¨dholt Davy Suve´e OBASCOproject SystemandSoftwareEngineeringLab E´coledesMinesdeNantes/INRIA VrijeUniversiteitBrussel 4rueAlfredKastler Pleinlaan2 44307Nantescedex3,France 1050Brussels,Belgium {lbenavid,sudholt}@emn.fr {wvdperre,bdefrain,dsuvee}@vub.ac.be ABSTRACT Keywords Distribution-related concerns, such as data replication, of- Aspects, remote pointcuts, AWED, distributed execution, ten crosscut the business code of a distributed application. distributed language constructs. Currentlysuchcrosscuttingconcernsarefrequentlyrealized on top of distributed frameworks, such as EJBs, and initial 1. INTRODUCTION AOsupportforthemodularizationofsuchcrosscuttingcon- cerns,e.g.,JBossAOPandSpringAOP,hasbeenproposed. Distributed applications are inherently more complex to Based on an investigation of the implementation of repli- develop than sequential ones because of the additional re- catedcachesusingJBossCache,wemotivatethatcrosscut- quirements brought about by a partitioning of the software tingconcernsofdistributedapplicationsbenefitfromanas- systemacrossthenetwork(e.g.,handlingofcommunication pectlanguageforexplicitdistributedprogramming. Wepro- and synchronization between system components, network poseAWED,anewaspectlanguagewithexplicitdistributed failures, management of load balancing, ...). Previous re- programming mechanisms, which provides three contribu- search has shown that traditional programming languages tions. First, remote pointcut constructors which are more do not allow to separate well distribution concerns from general than those of previous related approaches, in par- standardfunctionalconcerns[34]. Webcaching[28,10]and ticular, supporting remote sequences. Second, a notion of unit testing of distributed applications [24], for instance, distributed advice with support for asynchronous and syn- havebeenshowntobesubjecttoseriouscrosscuttingprob- chronous execution. Third, a notion of distributed aspects lems. Techniques developed in the field of Aspect-Oriented includingmodelsforthedeployment,instantiationandstate SoftwareDevelopment(AOSD)[22]shouldbeusefultosep- sharingofaspects. Weshowseveralconcreteexampleshow arate distribution concerns. However, despite its increasing AWED can be used to modularly implement and extend popularityforsequentialapplications,relativelyfewAOap- replicatedcacheimplementations. Finally,wepresentapro- proaches address the development of distributed software. totypeimplementationofAWED,whichwehaverealizedby By now, a number of distributed middleware solutions extending JAsCo, a system providing dynamic aspects for have been developed that offer features for aspect-oriented Java. development, such as JBoss AOP [1] and Spring AOP [3]. However, these solutions in essence apply a non-distributed AO system to an existing framework for distribution, such CategoriesandSubjectDescriptors asJ2EE.Morespecifically,theycanonlymodifythedistri- C.2[Computer-communicationnetworks]: Distributed bution behavior of a base program by introduction (or re- Systems—Distributed applications; D.3.3 [Programming moval)ofdistribution-relatedcodeexpressedintermsofthe languages]: Language Constructs and Features underlyingframework. Suchapproachesarethereforeinher- ently limited to the framework’s capabilities. In particular, theydonotprovidegeneralsupportforexplicitdistribution GeneralTerms in the aspect language or weaver technology, for instance, Languages, Experimentation tosupportautomaticdeployment,statesharingandremote execution. †This work has been supported by AOSD-Europe, the Eu- Few AO approaches, most notably D [34], JAC [25] and ropeanNetworkofExcellenceinAOSD(aosd-europe.net). DJcutter [24], have support for explicit distribution in as- pects. However, these approaches provide rather limited supportforaspectswhicharetriggeredonconditionsofpro- grams running on remote hosts. Mechanisms to quantify over sets of hosts are lacking, and advice execution cannot Permissiontomakedigitalorhardcopiesofallorpartofthisworkfor personalorclassroomuseisgrantedwithoutfeeprovidedthatcopiesare be distributed over remote hosts. Sequence aspects, for in- notmadeordistributedforprofitorcommercialadvantageandthatcopies stance,haverecentlybeenprovenusefulforsystem-levelim- bearthisnoticeandthefullcitationonthefirstpage.Tocopyotherwise,to plementationofwebcaches[16],inparticularprotocolmod- republish,topostonserversortoredistributetolists,requirespriorspecific ifications, but none of the AO languages for distributed as- permissionand/orafee. pects support remote sequences. A larger set of distributed AOSD06,March20–24,2006,Bonn,Germany Copyright2006ACM1-59593-300-X/06/03...$5.00. abstractionshouldsupport,inparticular,alargersetofdis- 51 tributed applications which may require diverse distributed 1 public Object put(Fqn fqn, Object key, Object value) implementation strategies. throws CacheException { Toresolvetheseshortcomings,thispaperintroducesAWED, 3 GlobalTransaction tx=getCurrentTransaction(); MethodCall m = anaspect-orientedprogramminglanguagewithexplicitsup- 5 new MethodCall(putKeyValMethodLocal, portfordistribution. AWEDhasthreemaincharacteristics. new Object[]{tx, fqn, key, value, Boolean.TRUE}); First, it offers remote pointcuts that can match events on 7 return invokeMethod(m); } remote hosts, including support for remote sequences. Sec- ond, it allows for distributed advice execution. Third, it Figure 1: Low-level transaction handling in class providesamodelofdistributedaspectswhichaddressesde- TreeCache ployment, instantiation and data sharing issues. Further- more,wepresentanimplementationofAWEDbuiltontop of the dynamic AOP system JAsCo [30]. This implemen- standard behavior of JBoss Cache is also hindered by this tation allows to dynamically apply distributed aspects and crosscutting. It is, for instance, not possible to replicate apply compiler optimizations such as just-in-time compila- specific data only in subsets of the caches from the cluster, tion and hot swapping. Finally, to motivate and illustrate once a cluster has been initialized. ourapproach,wepresentadetailedanalysisofcrosscutting JBoss Cache comes equipped with two AO-related mech- concerns in the context of the application server JBoss [2], anisms which could potentially be useful to overcome the usingAWED,inparticular,toaddressmodularizationissues modularization issues mentioned: an interception mecha- of the JBoss Cache component. nism(packagejboss.cache.interceptors)andJBossCache- This paper is structured as follows. Sec. 2 motivates AOP. With regard to the first mechanism, we show be- crosscutting problems concerning replication and transac- low that these interceptors do not resolve the crosscutting tion concerns in JBoss cache. Sec. 3 presents the AWED issues mentioned above. The second mechanism, JBoss- aspect language. In Sec. 4 we show how AWED can be CacheAOP,isanAspect-OrientedextensionofJBossCache appliedtodifferentdistributionproblems,inparticulardis- implemented using JBoss AOP, which allows to use JBoss tributed caching schemes. Sec. 5 introduces DJAsCo, our Cache togetherwithstandard Java objects (“POJOs”) in a publicly-available prototype implementation of AWED on transparentmanner. JBossCacheAOPenablesdevelopersto topofJAsCo. Sec6discussesrelatedworkandSec.7gives simply put an object in a cache, and automatically handles a conclusion and presents future work. the mapping of the object to the cache; the programmer can continue using POJOs as usual. This mechanism thus 2. MOTIVATION: CACHE REPLICATION does not match our goals either: JBossCacheAOP is solely used to facilitate the use of JBoss Cache in an application ANDJBOSSCACHE but does not address modularization or extension of JBoss As a motivating example we consider distribution prob- Cache’s cache replication functionality. lemsarisinginthecontextoftheJBossapplicationserver[2], Technically, the JBoss Cache implementation stores data whichisbuiltonJ2EE,theJava-basedmiddlewareplatform. in a tree data structure. The main tree data class is aug- Concretely,weconsiderreplicationintheJBossCachesub- mented with code to support a chain of interceptors, par- systems[7]. Replicatedcachesthatprovideafaststoreclose tiallyseparatingcrosscuttingconcerns(e.g.,replication,trans- toclientapplicationsareacommonsolutiontospeedupdis- actions, eviction policies and automatic access to backend tributed applications. The cache implementation of JBoss data stores) in classes called interceptors. Each method in- can be used to replicate data within a set of machines and vocation to a TreeCache object is then processed by the el- thus ensures that all machines can access that data locally. ementsoftheinterceptorchain. TheTreeCacheclass,how- JBoss cache is a replicated transactional cache, i.e., the ever, is still subject to crosscutting by the code for replica- coherenceofhtedatainthecachesformingacommonclus- tionandtransactions. Forinstance,eachlow-levelcachema- ter is ensured by guarding updates using transactions. A nipulationmethod,suchasputhastogetthetransactional JBoss cache can either be configured to be local, in which context, modify it if necessary and pass it along explicitly casenodataisreplicatedtoothercachesonothermachines, as shown in Figure 1, where the object of type MethodCall or it can be global, which means that all changes are repli- is used for replication purposes. cated to all the other caches (on all other machines) that Figure 2 illustrates these crosscutting concerns by show- are part of the cluster. Transactions in JBoss Cache are ingthescatteringofreplicationandtransactioncodeinclass implemented using pessimistic locking. Once a transaction TreeCache (left diagram in the figure) in the interceptor is finished on the local machine, a two phase commit pro- package (right). Replication code is colored black in both tocol is initiated to replicate transactions. If all the caches subfigures, transaction code is marked dark gray and calls can acquire the necessary local locks and make the modifi- intotheTreeCachemethodfromtheinterceptorpackageare cations,acommitmessageissenttofinalizethetransaction, coloredlightgray. Thefiguresclearlyexhibitcrosscuttingof otherwise the transaction is rolled back on all nodes. replication code, its tangling with transaction code and the In the following we focus on two modularization prob- interdependencebetweentheTreeCacheclassandtheinter- lems which JBoss Cache is subject to. (Note that we do ceptor package (the large number of calls from TreeCache notinvestigateifJBoss,whichweconsideralegacyapplica- intotheinterceptorpackagearenotshownbecausetheyare tion, could have been restructured to avoid these problems frequently located near or part of the crosscutting code in in the first place.) First, as we will analyze in detail below, the TreeCache class.) the replication concern in JBoss Cache is crosscutting: it is More precisely, the TreeCache class includes 188 meth- scatteredoverlargepartsofitsimplementationandtangled ods and consists of 1741 lines of code (LOC): the scattered with other scattered concerns. Second, modification of the coderelevantforreplicationamountstomorethan196LOC; 52 inanasynchronousorsynchronousfashiononremotehosts and pointcuts can predicate on where advice is executed. Third, distributed aspects, which enable aspects to be con- figuredusingdifferentdeploymentandinstantiationoptions. Furthermore, aspect state can be shared flexibly among as- pect instances on the one hand, as well as among sequence instances which are part of an aspect on the other hand. 3.1 Syntaxandsemantics AWED’ssyntaxisshowninFig.3usingEBNFformalism (i.e., square brackets express optionality; parentheses mul- tiple occurrences, possibly none; terminal parentheses are enclosed in apostrophes). Figure 2: Crosscutting concerns in JBoss: class 3.1.1 Pointcuts TreeCache (left), interceptor package (right) Pointcuts (which are generated by the non-terminal Pc) arebasicallybuiltfromcallconstructors(executionallows to denote the execution of the method body), field getters the code for transactions accounts for more than 228 LOC. andsetters,nestedcalls(cflow)andsequencesofcalls(non- The situation for the interceptor framework is similar: it terminal Seq). includes 9 classes consisting of 1263 LOC altogether; the AWEDemploysamodelwhere,uponoccurrenceofajoin (lower-bound) line counts for code relevant for replication, point, pointcuts are evaluated on all hosts where the corre- transactions and calls to TreeCache respectively are 30, 41, spondingaspectsaredeployed. Pointcutsmaythencontain and 73. This provides strong evidence that the interceptor conditions about (groups of) hosts where join points origi- mechanism is not sufficient to solve the crosscutting prob- nate (term host(Group)), i.e., where calls or field accesses lems. occur. Furthermore, pointcuts may be defined in terms of Hence, understanding the replication and transactional where advice is executed (term on(Group)). Advice execu- behavior of the JBoss Cache implementation, which uses tion predicates may further specify a class implementing a the interception mechanism, is far from trivial. Even sim- selectionstrategy(usingthetermon(Group,Select))which ple modifications to the policies are difficult because of the may, e.g., act as an additional filter or define an order in crosscutting concerns. This applies, e.g., if the replication which the advice is executed on the different hosts. Groups policyistobechangedtoonewherereplicationisdoneonly are sets of hosts which may be constructed using the host when a cache is interested in some specific data and only specifications localhost, jphost and adr:port, which re- within the subgroup of hosts that are also interested in the spectively denote the host where a pointcut matches, the samedatainsteadofreplicatingalwaysbetweenallmembers host where the corresponding join point occurred and any of a cluster. Finally, note that AspectJ-like languages are specific host. Alternatively, groups may be referred to by not appropriate in this context: as shown by Nishizawa et name. (Namedgroupsaremanageddynamicallywithinad- al.[24]theyaresubjecttolimitations,inparticular,requir- vice by adding and removing the host which an aspect is ing inadequately complex aspect definitions in the context located on, see Sec. 3.1.2 below.) of distributed crosscutting functionalities. Finally,pointcutdefinitionsmayextractinformationabout the executing object (target) and arguments (args), and maytestforequalityofexpressions(eq),thesatisfactionof 3. THEAWEDLANGUAGE general conditions (if), and whether the pointcut lexically Modularization of crosscutting concerns for distributed belongs to a given type (within). Pointcuts may also be applicationsusinganaspectlanguage,i.e.,intermsofpoint- combined using common logical operators. cut,adviceandaspectabstractions,suggestssupportforthe Asafirstexample,thefollowingsimplepointcutcouldbe followingissues: (i)anotionofremotepointcutsallowingto part of a replicated cache aspect: capturerelationshipsbetweenexecutioneventsoccurringon call(void initCache()) && host(”adr1:port1”) differenthosts,(ii)anotionofgroupsofhostswhichcanbe Here, the pointcut matches calls to the cache’s initCache referred to in pointcuts and manipulated in advice, (iii) ex- method that originate from the host that has the specified ecution of advice on different hosts in an asynchronous or address. The advice will be executed on any host where synchronouswayand(iv)flexibledeployment,instantiation, the aspect is deployed (possibly multiple ones) as there is and state sharing models for distributed aspects. no restriction on the advice execution host. The following AWEDprovidessuchsupportthroughthreekeyconcepts example restricts the execution hosts to be different from at the language level. First, remote pointcuts, which enable the host where the joinpoint occurred: matchingofjoinpointsonremotehostsandincluderemote pointcut putCache(Object key, Object o): calls and remote cflow constructs (i.e., matching of nested call(* Cache.put(Object,Object)) calls over different machines). As an extension of previ- && !on(jphost) && args(key, o) ous approaches AWED supports remote regular sequences Here, the pointcut matches calls to the cache’s put oper- whichsmoothlyintegratewithJAsCo’sstatefulaspects[33] ation on hosts other than the joinpoint host and binds the butalsoincludefeaturesofotherrecentapproachesfor(non- correspondingdataitems. (Notethatinthiscasetheclause distributed) regular sequence pointcuts [14, 15, 16, 4]. Sec- !host(localhost) could replace !on(jphost) to achieve ex- ond, support for distributed advice: advice can be executed actly the same effect of matching non-local joinpoints.) If 53 //Pointcuts Pc ::= call(MSig) | execution(MSig) //Aspects | get(FSig) | set(FSig) | cflow(Pc) | Seq Asp ::= [Depl][Inst][Shar]aspectId’{’{Decl}’}’ | host(Group) | on(Group[,Select]) Depl ::= single | all | target({Type}) | args({Arg}) Inst ::= perthread | perobject | perclass | eq(JExp,JExp) | if(JExp) | perbinding | within(Type) Shar ::= local | global | inst | group(Group) | PckPc | Pc&&Pc | !Pc Decl ::= [Shar]JVarD | PcDecl | Ad Seq ::= [Id:]seq({Step}) | step(Id,Id) PcDecl ::= pointcutId({Par}): Pc Step ::= [Id:]Pc[→Target] Target ::= Id | IdkTarget Group ::= {Hosts} //Standardrules(intensionallydefined) Hosts ::= localhost | jphost | ”Ip:Port” | GroupId MSig,FSig ::= //method,fieldsignatures(AspectJ-style) GroupId ::= String Type ::= //typeexpressions Select ::= JClass Arg,Par ::= //argument,parameterexpressions Id ::= //identifier Ip,Port ::= //integerexpressions //Advice JClass ::= //Javaclassname JExp ::= //Javaexpressions Ad ::= [syncex]Pos({Par}): PcAppl’{’{Body}’}’ JStmt ::= //Javastatement Pos ::= before | after | around JVarD ::= //Javavariabledeclaration PcAppl ::= Id({Par}) Body ::= JStmt | proceed({Arg}) | addGroup(Group) | removeGroup(Group) Figure 3: AWED language thecorrespondingadviceputstheiteminthelocalcache,a (Here, identifiers like initCache denote undefined point- conditionontheaspecttype(named,e.g.,ReplCache),such cuts specifying corresponding call pointcuts.) The pointcut as !within(ReplCache), can be used to avoid triggering the above defines a sequence of four steps. An initialization pointcut during the advice execution. step which may be followed either by a put operation (s2), termination of the cache (s3) or an error step (s4). A put Sequences. Sequences (derived by the non-terminal Seq) operation (s2) may be repeated, followed by a cache termi- are supported by two constructions on the pointcut level. nation (s3) or result in a cache inconsistency (s4). After First, the term [Id:] seq({Step}) allows to define sequences cache termination, the cache may be initialized once again. whichmaybenamedusinganidentifierandconsistofalist Finally,acacheinconsistencyterminatesthesequence(and of (potentially named) steps (non-terminal Step). A step may be reacted upon by advising the pointcut). maydefinethestepstobeexecutednext(non-terminalTar- Note that the above definition does not enforce that the get).1 Asequencematchesifthesequenceiscompleted,i.e., steps are taking in the context of the same cache. This is, if the current joinpoint matches the last step and previous however,simpletoachievebybindingthetargetsofthedif- joinpointsoftheexecutiontracematchedtheprevioussteps ferent steps target(c), and use eq or if pointcuts to ensure in order. Second, the term step(seq,step) matches if the theappropriaterelationshipsatdifferentstepsinasequence. step named step of the sequence named seq matches. This Astepmaybereferredtoinpointcutsandadviceasexem- allowsadvicetobetriggeredafteraspecificstepwithinase- plifiedinthefollowingexamplewhichshowshowtoprovide quenceusingatermoftheforms: seq(... l: logout() ...)kstep(s, la).special pointcut for the second step in the previous se- Notethatthislasttermmatchesthecompletesequencebe- quence(andhowtobindthevariablesusedinthatstep)so sidesthespecifiedstep;thiscan,ifnecessary,easilyberuled that advice can later be attached to it: out. Thissequencedefinitionallowsforasmoothintegration pointcut putVal(Cache c, String key, Object o): of sequences and the finite-state aspects of non-distributed step(replS, s2) && target(c) && args(key, o) JAsCo. To illustrate the use of sequence pointcuts, consider the 3.1.2 Advice following pointcut, which could be part of a simple cache Advice(non-terminalAd)ismostlydefinedasinAspectJ: replication protocol: it specifies the position (Pos) where it is applied relative pointcut replPolicy(Cache c): to the matched join point, a pointcut (PcAppl) which trig- replS:seq(s1: initCache()&&target(c)→s3 ks2 ks4, gerstheadvice,abody(Body)constructedfromJavastate- s2: cachePut() → s3 ks2 ks4, ments, and the special statement proceed (which enables s3: stopCache() → s1 the original call to be executed). s4: cacheInconsistency()) Inanenvironmentwhereadvicemaybeexecutedonother hosts (which is possible in AWED using the on pointcut 1Notethatwhileoursequencesobviouslyencodefinite-state specifier), the question of synchronization of advice execu- automata,manyapplicationsofregularstructures,inpartic- ular communicationprotocols [16], are effectively sequence- tion with respect to the base application and other aspects like,i.e.,ofaone-dimensionaldirectedstructure,sothatwe arises. AWEDsupportstwodifferentsynchronizationmodes decided to use the more intuitive terminology for AWED. forremoteadviceexecution: bydefaultremoteadviceisex- 54 ecuted asynchronously to the calling context. In this case 1 all aspect CacheReplication{ synchronization, if necessary, has to be managed by hand. pointcut cachePcut(Object key, Object o): In contrast, syncex marks remote advice for synchronous 3 call(* Cache.put(Object,Object)) && args(key,o) && !on(jphost) && execution. Local advice is always executed synchronously. 5 !within(CacheReplication); Thesemanticsoftheproceedstatementis“localized”: the lastaroundadviceinvokestheoriginalbehavioronthelocal 7 before(Object key, Object o): cachePcut(key,o){ Cache.getInstance().put(key, o); } host. The return value of the around advice is sent back 9 } to the original joinpoint host and processed in the regular aroundadvicechainonthatjoinpointhostincaseofasyn- chronous advice execution. Asynchronous advices are exe- Figure 4: Cache replication as an aspect cutedinparallelandthereisthusnoguaranteewithrespect to advice precedence. We have opted for this semantics be- In Sec. 2 we have presented distributed caching and, in cause it provides for an intuitive yet efficient remote advice particular, its supportthroughthe JBoss Cache OO frame- execution semantics. work,asamotivatingexampleforcrosscuttingindistributed Advice is also used to manage named groups of hosts: applications. Fig. 4 shows how an aspect for cache replica- addGroupaddsthecurrenthosttoagivengroup,remove- tion can be implemented using AWED which accounts for Group allows to remove the current host from a group. allplaceswherecacheelementsarerequestedandreplicated To give an example of basic advice functionality, the fol- to all other caches in a cluster, i.e., an essential part of the lowing advice definition is useful in the context of collabo- functionalityofreplicationwithinJBossCache’sTreeCache rating replicated caches: class. around(String k, Object o): putCache(k, o) { Object obj = getNewRemoteValue(k); Internet if (obj != null) { proceed(k, obj); } else { proceed(k, o); } } Summary−based access This advice first tests whether a new value is present re- motely for a given key. If this is the case, the new value is Cache group stored in the cache. 3.1.3 Aspects provide data request data, request summary update Aspects(non-terminalAsp)groupasetoffieldsaswellas pointcut and advice declarations. Aspects may be dynam- ically deployed (Depl) on all hosts (term all) or only the local one (term single). Furthermore, aspects support four instantiation modes (Inst): similar to several other aspect languages, aspects may be instantiated per thread, per object, or per class. Figure 5: Adaptive cache behavior However, aspect instances may also be created for differ- ent sets of variable bindings arising from sequences (term The aspect declaration in line 1 indicates that the as- perbinding) as introduced in [16, 4]. In this last case, a pect will be distributed globally and that a singleton in- new instance is created for each distinct set of bindings of stance (AWED’s default instantiation mode) is created on the variables in the sequence, i.e., of the variables declared each host. The pointcut defined in lines 2–5 matches calls as arguments of a sequence pointcut or fields used in the putting elements in the cache; the term !on(jphost) limits sequence pointcut. advice execution to aspects which are not deployed on the Finally, AWED allows distributed aspects of the same host where the join point matched. The advice (lines 7–8) type to share local state (Shar): values of aspect fields may simply puts the element in the cache. As the pointcut as- besharedamongallaspectsofthesametype(termglobal), sured that only aspects which are remote to the matching allinstancesofanaspectwhichhavebeencreatedusingthe join point perform this advice, replication is thus achieved. instantiationmechanismsintroducedbefore(terminst),all As a more intricate example, we consider an example of aspects belonging to the same group (term group(Group)) thelargenumberofreplicationstrategiesforcachesthatuse or all aspects on the one host (term local; note that these hierarchical,cooperativeandadaptivecachingstrategies[8, possiblybelongtodifferentexecutionenvironments,suchas 19]. Such strategies typically do not distribute data over JVMs). Sharing modifiers can be given for an aspect as a whole clusters but replicate objects only to caches in the wholeorindividualfields(Decl),ifbotharegiven,thelatter cluster that explicitly request them. Furthermore, coopera- have priority. tivebehaviorisuseful,e.g.,lookingforacopyinneighboring caches before (slowly) accessing farther caches or a central- 4. APPLICATIONS ized server holding the master copy of the data at hand. In this section, several applications of AWED are pre- ThiskindofbehaviorisnotpartofthecurrentJBossCache sented. Weillustratehowreplicated,cooperatingdistributed specification and would be very difficult to graft on its im- caches can be modularly implemented, and how distribu- plementation without the use of AO techniques due to the tion and execution clustering concerns can be introduced crosscutting problems of its replication code. concisely into an existing non-distributed application. Inthefollowingwepresenttheheartofasummary-based cooperative cache strategy using AWED. Summary-based 4.1 Cachingrevisited caching strategies (see, e.g., [18]) use “summaries”, i.e., 55 small digests of the cache contents of neighboring caches. The summaries can be used to test whether a cache con- tains a value with high probability. They can therefore be usedtoguidethedecisionwhichneighboringcachestocon- tact and thus reduce network traffic. Fig. 5 schematically illustrates a summary-based caching strategyusedinthecontextofacooperativereplicatedcache scheme. In the following, we present an aspect Collabora- tiveCachePolicy (see Fig. 6) realizing cache groups which replicate data among them as introduced in the previous example, but which also uses summaries to selectively get 1 all aspect CollaborativeCachePolicy { data from farther caches outside the cache group. These twosetsofhostsarerepresentedbygroupscacheGroupand 3 group(cacheGroup, summaryHosts) SummaryT summaries; group(cacheGroup, summaryHosts) int cacheMisses = 0; summaryHosts,respectively(line3). Summaryinformation 5 final int THRESHOLD = 1000; is shared between hosts of the cache groups and the far- ... ther hosts at the border using AWED’s group sharing fea- 7 ture. This provides for a concise integration of summaries pointcut initCache(Cache c): 9 call(* Cache.init()) && host(localhost) && target(c); and is appropriate because summary-based caching algo- rithmsonlyinfrequentlyupdatesummaries. Asimpler(and 11 pointcut getCache(Cache c, String key): at times more inefficient) sharing mechanism than for the call(* Cache.get(String)) && host(cacheGroup) 13 && target(c) && args(key); cached data itself can therefore be used for them. Overall, the aspect consists of a three step remote se- 15 pointcut putCache(Cache c, String key, Object data): quence replPolicy (line 20), which first matches the cache call(* Cache.put(String, Object)) && target(c) 17 && args(key, data) && !on(jphost) && on(cacheGroup) initialization,followedbyrepeatedcacheaccessesandcache && !within(CollaborativeCachePolicy); replication operations. An explicit equality test ensures 19 that the put operation in the third step concerns the same pointcut replPolicy(Cache c): 21 replP: seq(s0: initCache(c) -> s1 cacheobjects(identifiedthroughtheirkeys)aslookedupin s1: getCache(c, k1) -> s2, the second step (assuming that the cache object does not 23 s2: putCache(c, k2, val) && eq(k1, k2) -> s1); change). 25 after(Cache c): step(replP, s0) && target(c) { Concretely, at cache initialization time (see the pointcut if (c.isDomain(cache)) addGroup(cacheGroup); at line 8) the two host groups are set up as well as initial 27 if (c.isDomain(border)) addGroup(summaryHosts); summaryinformation(adviceatline25). Acacheaccessus- initializeSummaries(); } ing getCache (line 11) first looks up the value locally, and, 29 around(Cache c, String key): step(replP, s1) && args(c, key) { if not found in the cache group attempts to acquire it from 31 Object obj = c.get(key); the outside. The advice at line 30 first accesses the local if (obj == null) { cache. If the data is not found, it calls proceed to trig- 33 obj = proceed(); if(obj != null) { gerasynchronousremoteadvice(line39)which(becauseof 35 c.put(key, obj); the on clause) queries hosts of group summaryHosts: this cacheMisses++; } } is achieved using a filter selecting hosts whose summaries 37 return obj; } indicatethatthevalueshouldbepresent. Theremotelyex- 39 syncex around(Cache c, String key): ecuted advice body returns the query result and requests step(replP, s1) && args(c, key) updates of the summaries if a threshold number of cache 41 && on(summaryHosts, awed.combination.and( awed.targets.filter(summaries), modifications has been exceeded (this accounts for the ba- 43 awed.result.getFirst)) { sicpropertyofinfrequentupdatesofsummaryinformation, if (cacheMisses > THRESHOLD) see[18]). Thereplicationwithinthecachegroupisachieved 45 updateSummaries(summaries.getHosts()) return c.get(key, o); } asabovebymatchingputoperationsusingthepointcutput- 47 Cache(line15). Thispointcutstriggerstheadviceatline48 before(Cache c, String key, Object o): which executes a put operation on all hosts in the cache 49 step(replP, s2) && args(c, key, o) { group which are different from the host where the original c.put(key, o); } 51 } put occurred. 4.2 DistributionandClustering Figure 6: Aspect-based cooperative cache In [29], Soares et al. illustrate how AOP techniques can be employed to explicitly introduce distribution within ex- isting,non-distributedapplications. Forthis,AspectJisem- ployed to automatically insert the required RMI code frag- ments. Their proposal requires two types of aspects: one aspectforhandlingserverdistributionconcernsandoneas- pectforhandlingclientdistributionconcerns. Attheserver side, a remote interface is generated for each object that should be distributable and the server-side aspect declares theremoteobjectstoimplementthesegeneratedinterfaces. Additional methods are introduced by means of the server 56 1 pointcut distribution(Facade f): pointcut clustering(Facade f): target(f) && call(* *(..)) && 2 target(f) && call(* *(..)) && !host("Servergroup") 3 && !host("Serveripadr:port") && on("Serveripadr:port"); && on("Servergroup", awed.hostselection.RoundRobin); 4 5 syncex Object around(Facade f): distribution(f) { syncex Object around(Facade f): clustering(f) { return proceed(Facade.getInstance()); } 6 return proceed(Facade.getInstance()); } Figure 7: Distribution as an aspect Figure 8: Clustering as an aspect aspecttoimplementvarioustechnicaldetailstosupportref- suited to facilitate a flexible distributed AOP platform, as erencestoserverobjects(bydefaultRMIsendsacopyofthe this setup requires all aspects to be present on all the ap- serverobjecttotheclient). Theclientsideaspectisrespon- plicable hosts at compile or weave time. As such, all hosts sible for capturing and redirecting the local method calls need to be known and fixed in advance, which removes a and declaring these methods to throw remote exceptions. lotofflexibility. AdynamicAOPapproachhowever,allows In addition, each method specified in the remote interface to dynamically add/remove hosts and aspects, which is an requiresadedicatedredirectionadvice,asAspectJdoesnot important feature for large-scale distributed systems. allow to change the target object in a proceed statement Therefore,wehavechosentheJAsCodynamicAOPframe- whichisrequiredtoredirectthecallstotheremoteobjects. work as an implementation platform for the AWED lan- AWED allows for a more elegant solution, which does guage. JAsCo can be easily extended and provides highly not require the overhead of introducing the required RMI- efficientadviceexecutionthroughitsHotswapandJuttasys- specificcode. AWED allows tosolve this distributionprob- tems [32]. Furthermore, JAsCo already natively supports a lemusingasingleaspectwhichisillustratedinfigure7. The modelofstatefulaspectsbasedonfinitestatemachines[33], distribution pointcut selects all calls to Facade methods which can be extended to support distributed sequences as on the client andmakes sure that the accompanying advice well. IntheremainderofthepaperwepresentDJAsCo,an isonlyexecutedattheserverside. Byemployingnegationof extensionofthebaseJAsCosystemforexplicitdistribution. the host designator, calls on the server side will not match We first briefly introduce the JAsCo run-time architecture the pointcut themselves. The redirection behavior is en- anditsoptimizations. Afterwards,theDJAsCorun-timear- capsulated in a synchronous around advice. As the around chitecture and our prototype implementation are discussed advice gets executed on the server host, the getInstance in detail, and a performance evaluation is presented. The method of the Facade class will retrieve an instance which DJAsCo extension has been made publicly available as a is local to the server host (this could be generalized in or- part of the regular JAsCo distribution [20]. der not to rely on a single object.) The proceed expression 5.1 JAsCorun-timeinfrastructure willinvoketheoriginalbehavioronthatFacadeinstancelo- cated on the server host. The AWED solution improves on The JAsCo run-time infrastructure is based on a central the AspectJ-based solution: first, there is no need for RMI connector registry that manages the registered connectors2 specific code to be injected in the server classes, which is and aspects at run-time (see figure 9). This connector reg- a tedious process that is not always possible, and secondly, istryservesasthemainaddressingpointforallJAsCoenti- only one aspect with one pointcut and advice suffices while ties and contains a database of connectors and instantiated intheAspectJsolutionatleasttwoaspectsandapointcut- aspects. Whenever a connector is loaded into or removed advice pairs for each method in the Facade class are nec- from the system at run-time, the connector registry is no- essary. Note that AWED shares this advantage with other tified and its database of registered connectors and aspects middleware-based AOP approaches, such as DJCutter [24] is automatically updated. The left-hand side of Figure 9 and DAOP [26]. illustrates a JAsCo-enabled class from which the joinpoint When multiple servers are available to handle remote re- shadows are equipped with traps. As a result, whenever a quests,onecanchoosetoclustertheseserverstogethersuch joinpoint is triggered, its execution is deferred to the con- that incoming requests can be dispersed, e.g., to balance nector registry, which looks up all connectors that are reg- theserverload. Again,AWEDprovidesanelegantsolution istered for that particular joinpoint. The connector on its and allows this clustering behavior to be encapsulated in a turn dispatches to the applicable aspects. single aspect. Figure 8 illustrates this clustering pointcut. Theconnectorregistryhasanopenplugin-basedarchitec- AllavailableserversarepartoftheServerGroupandtheon ture that allows to easily extend the joinpoint interception, designatorspecifiesthattheaccompanyingadviceshouldbe aspect lookup (pointcut evaluation) and advice execution executedonlyonaserverthatispartofthatspecificgroup. parts, in particular for composition and optimization pur- Asonlyonespecifichostshouldbethetargetoftheredirec- poses. tion,aRoundRobin loadbalancingmechanismisemployed, In addition to the connector registry, the run-time archi- which assigns a server host on a rotating base. tecture consists of two other systems: HotSwap and Jutta. HotSwap allows to dynamically install traps only at those joinpoint shadows that are subject to aspect application. 5. IMPLEMENTATION When a new aspect is deployed, the applicable joinpoints Two of the main features the AWED language requires 2JAsCo introduces explicit connectors that instantiate and fromitsunderlyingmiddlewareimplementationaretheabil- deployaspectsontoaconcrete(component)context. Inour itytointerceptjoinpointsfromotherhostsandthecapabil- AspectJ-basedlanguage,theaspectconstructisresponsible ity to execute advice on other hosts. A static aspect com- for both. An AspectJ-like aspect can easily map onto a piler, as for instance employed by AspectJ [21], is not well connector-aspect pair in JAsCo. 57 5.2 DJAsCorun-timearchitecture TheJAsCorun-timearchitecturecanbedistributedusing twodifferentstrategies: eitherasingleconnectorregistryis kept for all hosts or each host separately maintains a dedi- cated connector registry. The first solution has the advan- tage that a single registry is responsible for the aspect exe- cution,whereasthesecondsolutionrequiresthedistributed connector registries to be synchronized. In general, a cen- tral entity is considered to be a problematic solution in a distributed setting, as it inherently does not scale and can become a performance bottleneck. Therefore we choose to deploy a separate connector registry at each host (see fig- Figure 9: JAsCo run-time architecture ure 10). Every connector registry is responsible for the locally in- tercepted joinpoints and its locally deployed aspects. In shadows are hot-swapped at run-time with their trapped order to allow aspect execution on remote joinpoints, the equivalents. Likewise, the original byte code is reinstalled intercepted joinpoints need to be sent to the other hosts. when an aspect is removed and no other aspects are appli- Likewise,inordertoallowaspectexecutiononremotehosts, cable on the joinpoint shadow at hand. Jutta on the other the aspects need to be distributed as well. The following hand, is a just-in-time compiler for aspects that allows to sections explain these issues in more detail. generateahighlyoptimalcodefragmentforeveryjoinpoint shadow. By caching these code fragments, an important 5.2.1 Remotepointcuts performance gain is realized. The current version of the In order to execute advice that trigger on remote join- JAsCo run-time weaver, based on HotSwap and Jutta, is points, the joinpoint information should be distributed to able to compete performance-wise with statically compiled all interested hosts. To this end, a plugin for the connec- aspectlanguagessuchasAspectJ,whilestillpreservingdy- tor registry has been implemented that: 1) intercepts all namic AOP features [13]. A major concern of the DJAsCo joinpoints, 2) prepares them for transmission and 3) sends design is to preserve compatibility of the weaver with these them to the remote hosts. Joinpoints need to be prepared twotools,inparticulartoenabletheoptimizationofremote before transmission as not all joinpoint information might pointcuts. be transmittable. Our current system uses Java Serializa- tiontotransmitobjectsfromonehosttoanother. Forthis, the joinpoint is first stripped from all contextual informa- tion (e.g. callee, actual arguments) that is nor serializable norprimitive. Furthermore,theadviceimplementationcan- not access advice variables nor reflectively query joinpoint informationthatisnotserializable. Althoughthisisanim- portantlimitation,itistypicalindistributedenvironments. For instance, arguments of Java RMI method invocations need to be serializable or primitive as well. In a last step, the joinpoint information is sent to the remote hosts. In order to locate and send this informa- tion to other interested hosts, the JGroups framework is employed [6]. JGroups is a well-known toolkit for reliable multicast communication. In addition, JGroups supports a wide range of network protocols, which makes our system independent of specific network technologies. JAsCo’sstatefulaspects,i.e.,finite-statebasedsequences[33], have been extended to a distributed setting in order to im- plement AWED’s distributed sequences. This is a rather straightforward process, because the state of a sequence pointcut is not managed by the JAsCo run-time infrastruc- ture (deployed locally, see figure 10), but by the aspect itself. Theaspectinterceptsremotejoinpoints,matchingits stateful pointcut description in a similar way as for join- pointsmatchingregularpointcuts. Afterwards,theinternal state is updated by firing the relevant transition(s) in the internal state machine. Figure 10: DJAsCo distributed run-time architec- ture. The aspects are distributed to all relevant 5.2.2 AspectDistribution hosts. Joinpoint1 occurs in Host X and is also sent In order to execute advice on remote hosts, the aspects toHostYinordertotriggeraspectsonthatremote themselvesshouldalsobedistributedtothehost(s)inques- joinpoint. tion. One solution would be to force an administrator to manuallydeploytheaspectsoneveryapplicablehost. How- 58 ever,asanadviceexecutionhostsometimesdependoncom- all aspect StateSharing { plex expressions with several variables, it might be difficult 2 pointcut stateChanged(Object value): tomanuallydeploytheaspectsontoremotehostsinanopti- set(myaspectname.myfieldname) && args(value) && !on(jphost); malfashion. Forinstance,deployingaspectstohostswhere 4 after(Object value): stateChanged(value) { they can never be applicable is useless and wastes the sys- 6 myaspectname aspectinstance = myaspectname.apectOf(); temresourcesofthoseparticularhosts. Hence,theDJAsCo aspectinstance.myfieldname=value; } extensionautomaticallydistributestheaspectstoallremote 8 } hoststhatmightbeapplicable. Whenanewhostjoins,the DJAsCorun-timeinfrastructuredetectsthisevent, andthe Figure 11: State sharing as a AWED aspect host automatically receives the possibly applicable aspects. Likewise, when new aspects are deployed at a particular host,theyareautomaticallydeployedattherelevantremote hostthatholdsthesharedfield. Therefore,thelocalmaster hosts. It is possible to avoid this automatic deployment of fields are explicitly synchronized using yet another AWED aspects on remote hosts by marking them with the single aspect that is automatically generated at deployment time. modifier. Figure11illustratesasimplifiedversion3ofthisglobalstate Technically,JGroupsisagainemployedtotransfertheas- sharingaspect. The after advice is triggeredfor every state pects and to be informed of changes in the network setup change of the myfieldname field of the myaspectname as- such as newly joined hosts. In contrast to joinpoints, as- pect. The advice is executed on every host except on the pectsareclass-basedentitiesanditsufficestosendtheclass one that triggered the joinpoint. As such, the state change byte-codetotheremotehosts. Hence,possibleserialization is propagated to all other hosts. The advice implementa- problems are avoided. tionfirstfetchesanaspectinstanceofthegiventypeonthe hostwhereitisexecutingandthanchangesthevaluetothe 5.2.3 SynchronousAdviceExecution newly assigned value. Because all aspect instances on that The default mode for advice execution is asynchronous host refer to the same field, the new value is immediately with respect to advice executions on remote hosts. How- propagatedtoallaspectinstancesofthemyaspectnametype ever,whenanadviceismarkedwiththesyncexmodifier,it on the host at hand. needstobeexecutedsynchronously,i.e.,thehostwherethe 5.2.5 Optimizationofremotepointcuts joinpoint occurs, waits for this advice to be executed. As such, the specified aspect precedence on the joinpoint host The JAsCo HotSwap and Jutta systems are compatible is still guaranteed. The return value of the around advice withtheDJAsCoarchitecture. Becauseallaspectsarepresent is sent back to the original joinpoint host and processed in at every applicable host (even aspects that might execute the regular around advice chain. A proceed to the original theiradviceelsewhere),thelocalHotSwapsystemstillknows behaviorishoweverstillalocalproceed(likewisetoproceed where to insert traps. Aspects that do not define pointcuts inanasynchronousadvice),whichmeansthatthejoinpoint relevant for the local host are not deployed and are of no proceeds on the host where the advice is executed and not interesttotheHotSwapsystemastheydonotinducenewly on the joinpoint host. trapped joinpoints. Remote joinpoints are represented sim- DJAsCo implements a synchronous advice execution by ilarly to local joinpoints. Hence, the Jutta system is still generatingaproxyaspectatthejoinpointhost. Thisproxy able to generate and cache a code fragment for executing aspect is automatically generated and dynamically weaved the joinpoint locally. As such, apart from the network de- when an aspect, defining a synchronous advice execution, layandserialization/deserializationcost,noadditionalover- is deployed. The proxy aspect’s advice delegates to the ap- headisrequiredforremotepointcutsanddistributedadvice propriate execution host where the original advice is exe- executions. cuted. The JGroups framework is again employed for the 5.3 Evaluation synchronous communication between the involved hosts. Toconcludethissectionwepresentresultsontwoevalua- 5.2.4 StateSharing tionsusingaspectswithexplicitdistributionforrefactoring andextensionofthestandardreplicationstrategyofJBoss. TheAWEDlanguagesupportsstatesharingbetweendif- ferentinstancesofthesameaspecttyperegardlessofthelo- 5.3.1 RefactoringofJBossreplicationcode cationand/orVMwheretheyareexecuted. Inordertoim- plement local sharing, DJAsCo generates one master field Inthemotivationwehaveidentifiedreplicationandtrans- oneveryhostforeachlocallysharedaspectfield. Allaspect action as two functionalities contributing to crosscutting instancesoftheaspecttypeonthathostautomaticallyrefer withinJBosscache. TransactionhandlinginJBossCacheis tothatfieldusingJavaRMI.Fieldqueriesandupdatesare basicallydoneusingatwophasecommitprotocol. Firstthe automatically redirected to the shared field. This redirec- transactionisexecutedlocally,requiring,inparticular,only tiontakesplacebyemployinganotherAWEDaspectthatis the acquisition of local locks. Once the commit method is dynamically generated and weaved when an aspect, defin- invokedinthecurrenttransaction,allthemodificationsare ing a shared field, is being deployed. Visibility modifiers replicated to all the nodes in a cache replication group: at for the fields (such as private) do not hinder the sharing remotehostsapreparephaseisexecutedand,ifsuccessfulin implementationbecausetheycanbeoverriddenatrun-time. all nodes, the transaction is committed. If a prepare phase Theglobalstatesharingcouldbeimplementedinasim- inanynodefails,thetransactionisrolledbackatallnodes. ilar fashion, i.e., having one globally shared field. However, 3Noticethatthisaspecthasbeensimplifiedforpresentation thissolutionsuffersfromaseriousrobustnessproblemasall purposes. For example, it does not cope with the fact that aspectinstancesofthesametypewouldrelyononespecific aspect types might not be present on every host. 59 tionmode,followedbyinterceptionofgetoperations(which all aspect TransacReplication { 2 ... explicitly indicate interest in some data) and cache replica- pointcut remoteCommit(GlobalTransaction gtx, List modifs): tion operations, until a selective mode termination method 4 call(* org.emn.djasco.cache.ReplHelper.txReplication( is called. Data which is to be replicated is selected through GlobalTransaction, List)) && args(gtx, modifs) 6 && !within(org.emn.djasco.cache.TransacReplication); the advice applied before get operations (step 2 in the se- ... quence replS) which registers interest to the data. 8 syncex around(GlobalTransaction gtx, List modifications): remoteCommit(gtx, modifications) && on(jphost) { 5.3.3 ComparisontoaJBoss-onlysolution 10 try { proceed(); } catch (Exception e) { To conclude this evaluation, let us compare the two pre- 12 ReplHelper.getInstance().rollBack(gtx, modifications); vious examples to an implementation based only on JBoss. throw e; } } JBossCacheimplementstransactionreplicationusingthree 14 syncex around(GlobalTransaction gtx, List modifs): mainclassesTreeCache,ReplicationInterceptorandSyn- 16 remoteCommit(gtx, modifs) chronizationHandler. Reflection is used to (un)marshal && !on(jphost, awed.hostselection.AllSucessfull) { 18 try { messages sent between nodes in the cluster. This archi- ReplHelper.getInstance().preparePhase(gtx, modifs); tecture is augmented with a before-completion and after- 20 } catch (Exception e) { completion idiom that is present in different classes. Meth- ReplHelper.getInstance().rollBack(gtx, modifications); ods include code to hold a special state, which is used to 22 throw e; } proceed(); } coordinate protocol stages. Tracing the default replication 24 ... behavior and integration of the proposed algorithm is far } fromtrivialduetothecrosscuttingthesefunctionalitiesare subject to. Figure 12: Refactoring the JBoss replication code Contrary to the tangled implementation of transaction and replication code in JBoss Cache, our aspect refactor- ing clearly separates replication and transactions (transac- 1 all aspect selectiveReplication { tionsappear,apartfromtheirsetup,onlyinexceptionhan- pointcut cacheGet(String fqn): dlers). Concretely, we have been able to refactor the scat- 3 call(* org.jboss.cache.TreeCache.get(String)) && args(fqn) && on(jphost) && !cflow(* selectiveReplication.*(*)); teredreplicationfunctionalityandthecorrespondingtrans- 5 actionhandlingwhichamountstoaround500LOCinJBoss pointcut replPolicy(String fqn, MethodCall mc): intooneaspectofaround100LOC.Furthermore,ouraspect 7 replS: seq(s1: startSelectiveMode() -> s4 || s3 || s2, s2: cacheGet(fqn) -> s4 || s3 || s2, doesnotrequireanyparticulartransactionmanagementbut 9 s3: cacheReplicate(mc) -> s4 || s3 || s2, reusesthedefaulttransactionmanagementofJBossCache. s4: termSelectiveMode() -> s1) Finally, the second example shows how extensions can be 11 before(String fqn): step(replS, s2) { registerInterest(fqn); } easily integrated using AWED, in particular, because dis- 13 ... tributedprotocolscanconciselybeexpressedusingsequence } aspects. Figure 13: Extending the JBoss replication code 6. RELATEDWORK D [34] has been the first aspect language with means for explicit distribution. This approach includes, in particular, Figure12shows(essentialpartsof)are-implementationof COOL, a synchronization sublanguage, and RIDL, a sub- thetransaction-guardedreplicationstrategyofJBossCache. language for the definition of remote interfaces. The for- AWEDallowstocleanlymodularizethetransaction-guarded mer essentially supports the declarative definition of mu- replicationprotocolinasingleaspect. Thefirstadvicereal- tual exclusion relations between objects. The latter allows izes the protocol part of the host that initiates the transac- to specify the semantics of remote method invocation be- tion: ithandlesdatawithinthelocalcachethroughacallto tweendifferentexecutionspaces,inparticulartheargument proceed and if something fails it rolls the transaction back. passingsemantics. However,Ddoesnotprovideequivalents The second advice executes replication handling at other for most features of AWED, in particular, remote sequence nodes through a remote call to preparePhase() and raises aspects, distributed advice and distributed aspects. an exception if something fails (the rollback functionality JAC [25] is a dynamic AOP-framework, which, in con- for the remote hosts is implemented by another advice not trastwithotherAOPapproaches,doesnotintroduceaded- shown in the example). icated aspect language, but describes aspects in terms of regular OO-abstractions. Their proposed framework is ex- 5.3.2 ExtensionoftheJBossreplicationstrategy tended with the notion of a distributed pointcut definition. As a second evaluation, we realized an extension to the Thispointcutdefinitionextendsaregularpointcutwiththe JBoss standard replication strategy: data should only be ability to specify a named host that delimits the context replicated to nodes that have explicitly requested it, i.e., in which the joinpoint should be detected. In contrast with new objects inserted in a cache group are not replicated AWED,JACdoesnotprovidesupporttodelimitthecontext spontaneously. in which distributed advices should be executed, nor does Figure 13 shows the main parts of an appropriate aspect it support remote sequences and instantiable distributed definition using AWED (the complete implementation, ap- aspects. In order to manage the distributed deployment prox. twice as large, is detailed in [9]). The implementa- of aspects, JAC replicates its Aspect-Component manager, tion uses a sequence pointcut replS which implements a which is similar to the DJAsCo connector registry, on the distributed protocol: this protocol starts selective replica- involved remote hosts. A consistency protocol makes sure 60
Description: