9

Click here to load reader

Automating Middleware Specializations for Fault Tolerancegokhale/WWW/papers/ISORC09_GRAFT.pdf · Automating Middleware Specializations for Fault Tolerance ... Aspect-oriented model

  • Upload
    vancong

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Automating Middleware Specializations for Fault Tolerancegokhale/WWW/papers/ISORC09_GRAFT.pdf · Automating Middleware Specializations for Fault Tolerance ... Aspect-oriented model

Automating Middleware Specializations for Fault Tolerance

Sumant Tambe∗, Akshay Dabholkar, Jaiganesh Balasubramanian and Aniruddha GokhaleVanderbilt University, Nashville, TN, USA

Abstract

General-purpose middleware solutions, by defini-tion, cannot readily support domain-specific semanticswithout significant manual efforts in specializing themiddleware. This paper presents GRAFT (GeneRa-tive Aspects for Fault Tolerance), which is a model-driven, generative, and aspects-based approach to spe-cialize general-purpose middleware with failure han-dling and recovery semantics imposed by a domain.Model-driven techniques are used to specify the spe-cial fault tolerance requirements, which are then trans-formed into middleware-level code artifacts using gen-erative programming. Since the resulting fault tolerancesemantics often crosscut the middleware architecture,GRAFT uses aspect-oriented programming to weavethem into the original fabric of the general-purposemiddleware. We evaluate the capabilities of GRAFTusing a representative case study.

Keywords: Fault tolerance, middleware specializa-tion, generative programming, aspects, model-based.

1 Introduction

Research in middleware over the past decade hassignificantly advanced the quality and feature-richnessof contemporary general-purpose middleware, such asCORBA, J2EE and .NET. Support for different non-functional properties, such as fault tolerance, real-time,transactions and security are now readily availablewithin the middleware and its services. Applicationdomains as diverse as industrial automation and busi-ness processing use these middleware for reliable androbust coordination and communication between soft-ware components.

Despite these advances, general purpose middlewarehave limitations in how many domain-specific seman-tics can they readily support out-of-the-box. For ex-ample, fault tolerant CORBA (FT-CORBA) definesthe infrastructure- and application-controlled styles of

∗Contact Author: [email protected]

consistency management. In the former, the middle-ware provides consistency to the applications; however,without knowing the semantics of the data, this style ofconsistency management can at best be coarse grained.On the other hand, in the application-controlled con-sistency management style, the applications must pro-vide all these capabilities thereby incurring additionaldevelopment efforts and maintenance costs. Often it isdesirable for applications to provide the semantics oftheir data to the middleware while delegating all con-sistency management to the middleware.

Supporting such domain-specific semantics usinggeneral-purpose middleware is challenging becausethese semantics are often not supported by the general-purpose middleware. Since different application do-mains may impose different variations in fault tolerance(or for that matter, other forms of quality of service) re-quirements, these semantics cannot be supported out-of-the-box in general-purpose middleware since theyare developed with an aim to be broadly applicableto a wide range of domains. Developing a proprietarymiddleware solution for the application domain is nota viable solution either due to the high developmentand maintenance costs.

Resolving this tension requires answering two im-portant questions. First, how can solutions to domain-specific fault tolerance requirements be made partof general-purpose middleware without permanentlymodifying the latter? An approach based on aspect-oriented programming (AOP) [10] can be used to mod-ularize the domain-specific semantics as aspects, whichcan then be woven into general-purpose middleware us-ing aspect compilers. This creates specialized forms ofgeneral-purpose middleware that support the domain-imposed properties.

Many solutions to specializing middleware exist [9,12], however, these solutions are often handcrafted,which require a thorough understanding of the middle-ware design and implementation. The second questiontherefore is how can these specializations be automatedto overcome the tedious, error-prone, and expensivemanual approaches? Generative programming [4] of-

1

Page 2: Automating Middleware Specializations for Fault Tolerancegokhale/WWW/papers/ISORC09_GRAFT.pdf · Automating Middleware Specializations for Fault Tolerance ... Aspect-oriented model

fers a promising choice to address this question.In this paper we present GRAFT (GeneRative As-

pects for Fault-Tolerance), which incorporates these so-lutions to specialize general-purpose middleware withdomain-specific fault tolerance semantics. GRAFTuses domain-specific modeling and model-driven engi-neering (MDE) [3,16] techniques due to their ability tointuitively capture and modularize domain-specific re-quirements, and their inherent support for generativeprogramming.

GRAFT uses a two stage process. In the firststage, fault tolerance requirements of the domain aremodularized as first class modeling artifacts using ourdomain-specific modeling language called the Compo-nent Availability Modeling Language (CAML). CAMLuses these modularized units to annotate the models ofapplication structure, which in our case are componentassemblies.

Aspect-oriented model weaving [6] is used to au-tomatically transform the original structural modelsinto refinements that incorporate the fault tolerance re-quirements captured using CAML. In the second stage,generators associated with CAML synthesize aspectcode that captures the runtime fault tolerance behav-ior, which is then woven into the middleware code usingan aspect compiler.

We show the feasibility of our approach in thecontext of a representative case study taken froma warehouse material handling system that uses theComponent-Integrated ACE ORB (CIAO) – a C++implementation of Lightweight CORBA ComponentModel (LwCCM) [13] – for implementing the softwarecomponents that control conveyor belt motors. Ourempirical studies focus on measuring the savings in ef-forts to specialize general-purpose middleware.

2 Motivational Case Study

To better present our GRAFT solution, we illustratea case study that benefits from GRAFT to realize itsfault tolerance requirements. Our case study is a ware-house material handling system (MHS). A MHS au-tomates the monitoring, management, and control ofstorage and flow of goods and assets within a ware-house. A MHS represents a class of conveyor systemsused by couriers (e.g., UPS, DHL, and Fedex), airportbaggage handling, retailers (e.g., Walmart and Target),food processing and bottling.Architecture. The software components in the MHSarchitecture can be classified as (1) management com-ponents, which make decisions such as where to storeincoming goods, (2) material flow control components(MFC), which provide support for warehouse man-

agement components by determining the routes thegoods have to traverse, and (3) hardware interface layer(HIL) components, which control MHS hardware, suchas conveyor belts and flippers.

Figure 1 shows a subset of the MHS operations,where a MFC component directs goods within thewarehouse using the route belt a→belt b or the routebelt a→belt c. Flippers F and F′ assist in directinggoods from belt a to belt b and belt c, respectively.Further, as shown in Figure 1, HIL components, such asMotor Controllers (MC1, MC2) and the Flipper Con-troller (FC), control the belt motors and flippers, re-spectively. The MFC component instructs the FlipperController component to flip, which in turn instructsthe Motor Controller components to start the motorsand begin transporting goods.

Figure 1. A Distributed Processing Unit ControllingConveyor Belts

Domain-specific Fault Model. As goods are trans-ported using the different conveyor belts, faults couldoccur. Two broad kinds of faults are possible in theMHS system: (1) hardware faults, (e.g., jamming ofthe flipper) and (2) software faults, (e.g., MC or FCcomponent crashes). Both these faults affect the reli-able and correct operation of the MHS system, and areclassified as catastrophic faults.

Hardware catastrophic faults in the MHS systemare detected by their associated HIL components andcommunicated using application-specific software ex-ceptions. Software faults, such as software componentcrashes, are detected by the clients of those compo-nents using system-level software exceptions generatedby the underlying middleware.Domain-specific Failure Handling and RecoverySemantics. When catastrophic faults are detected ina MHS, the desired system response is to shutdownthe affected hardware assembly and activate a backup

2

Page 3: Automating Middleware Specializations for Fault Tolerancegokhale/WWW/papers/ISORC09_GRAFT.pdf · Automating Middleware Specializations for Fault Tolerance ... Aspect-oriented model

hardware assembly automatically. For example, whenone of the motors of belt b or flipper F fails, the MFCcomponent should stop using the belt b and route thepackages via belt c instead. The consequence of sucha decision means that the HIL components associatedwith belt b should be deactivated and those with beltc as well as flipper F′ need to be activated.

The MHS thus imposes a group-based fault toler-ance semantics on the software components controllingthe physical hardware. If any one component of thegroup fails, the failure prevents the whole group fromfunctioning and warrants a failover to another group.We call this group of components as a distributed pro-cessing unit (DPU) – in this case mc1, mc2 and fc forbelt b. Further, the clients of a DPU (e.g., the MFCcomponent) must failover to an alternative DPU if anyof the component in the primary DPU fails.System Design and Implementation Challenges.The software components of MHS are implementedusing the Component-Integrated ACE ORB (CIAO),which is a C++ implementation of LightweightCORBA Component Model (LwCCM) [13]. Designingand implementing systems that support DPU groupfailure recovery semantics of a MHS using general-purpose middleware, such as LwCCM and its supportfor fault tolerance via FT-CORBA, is challenging be-cause it lacks out-of-the-box support for (1) groupingmultiple and distributed HIL components and treatingthem as a single unit of failure, (2) recovering a collec-tion of HIL components together based on the grouprecovery semantics and redirecting all client MFC com-ponents to a replica group of HIL components. Theremainder of the paper describes how GRAFT auto-mates such domain-specific fault tolerance semanticswithin general-purpose middleware.

3 GRAFT Process for MiddlewareSpecialization

This section describes the desired properties ofa middleware specialization process, and shows howGRAFT meets these requirements.

3.1 Overview of GRAFT

Redundancy in the form of replicating applicationfunctionality provides the primary means to obtainingfault tolerance across a number of application domains.Redundancy, however, requires maintaining state con-sistency among the replicas for stateful applications. Inaddition to supporting these properties, special formsof replication and fault recovery, such as the DPU se-mantics described in Section 2, must be made available

in general-purpose middleware for the correct opera-tion of the systems.

In component-based systems, such as our case study,realizing these capabilities impacts the entire lifecyclephases of the application. First, application develop-ers must modify their interface descriptions specified inIDL files to specify new types of exceptions, which in-dicate domain-specific fault conditions. Only then canthe IDL compiler provided by the middleware gener-ate stubs that can recognize the additional exceptions.Naturally, with changes in the interfaces and the gen-erated stubs, application developers must reprogramtheir application to conform to the modified interfaces.

Modifying application source code to supportapplication-specific failure handling semantics is notscalable as multiple components need to be modified toreact to failures and provision failure recovery behav-ior. Further, such an approach results in crosscuttingof failure handling code with that of the normal behav-ior across several component implementation modules.

Second, replication requires new instances of ap-plication components to be specified, created and de-ployed. The middleware must then be able to recognizefault conditions and enforce failover by accounting forsemantics, such as the DPU failover. The middlewaremust also support the right state consistency manage-ment for the enhanced fault tolerance requirements.

One approach to realizing this capability is to man-ually modify the general-purpose middleware. Suchmodifications, however, are seldom restricted to a smallportion of the middleware. Instead they tend to im-pact multiple different parts of the middleware. Forexample, the replication semantics from our case studyrequires changes to (a) the generated stubs, (b) func-tionality to maintain group semantics and coordinationamong group members, (c) connection managementamong group components, replicas and clients, and (d)client-side perception of the failover target which nowis a group rather than a single component.

In other words, these modifications crosscut a largeportion of the middleware architecture. Naturally, amanual approach consumes significant development ef-forts and requires invasive and permanent changes tothe middleware. Crosscutting of failure handling hin-ders program comprehensibility and maintainability asthe number of functions or modules where failure han-dling code crosscuts increases.

Overcoming these challenges requires an approachthat automates middleware specialization and relievesapplications from having to incur extra development ef-fort. In particular, the following properties are desiredof the proposed approach:• Property 1: Application developers must not in-

3

Page 4: Automating Middleware Specializations for Fault Tolerancegokhale/WWW/papers/ISORC09_GRAFT.pdf · Automating Middleware Specializations for Fault Tolerance ... Aspect-oriented model

cur extra effort at design/development-time, e.g., nochanges to IDL and existing system models that de-scribe how application components are assembled anddeployed should be required. Moreover, any approachto capture the domain-specific requirements must bemodularized to avoid scattering.• Property 2: No manual efforts should be expendedto incorporate the crosscutting changes to middlewarewhile ensuring that no permanent changes are madeto existing middleware. In other words, the domain-specific changes should remain decoupled from the orig-inal middleware, yet they must be made available atruntime to the application via the middleware.

The rest of this section presents our two stageGRAFT process to specialize middleware for domain-specific fault tolerance properties, while meeting theserequirements. Stage 1 in GRAFT leverages existingstructural models of applications modeled as compo-nent assemblies, and annotates them with domain-specific fault tolerance requirements using our CAMLlanguage. The C-SAW [18] aspect-oriented modelweaver is then used to transform the base models intothose comprising new structural elements correspond-ing to the fault tolerance requirements.

In stage 2, the refined structural models and theirdeployment decisions are used to carry out specializa-tion to the middleware that hosts these applicationcomponents. GRAFT uses the AspectC++ [19] aspectcompiler to weave in the generated specialized code intothe CIAO middleware. The entire GRAFT process isorchestrated within our CoSMIC [5] MDE framework.

3.2 Stage 1: Design-time Support for Specializa-tion

Specializing middleware for fault tolerance proper-ties imposed by a domain requires a means to spec-ify these requirements from which the middleware canbe specialized. The level of IDL, application logic ormiddleware code to specify these requirements is notthe right level of sbstraction since all these approachesare crosscutting and invasive, which require significantmodifications to and maintenance of different artifacts.Satisfying Property 1 from Section 3.1 requires that theapplication design and its structure (i.e., the composi-tion of its components) be shielded from the domain-imposed fault tolerance capabilities that are desiredwithin the general-purpose middleware.

Thus, it is desirable to specify these requirementsusing approaches that are intuitive, non invasive, andwhich promote automation. Model-driven engineering(MDE) [16], which uses domain-specific modeling lan-guages (DSML) [7], provides the right level of abstrac-

tion at which such domain-specific requirements can becaptured. MDE can enable a clean separation of appli-cation structural models from domain-specific fault tol-erance requirements by leveraging the language compo-sition property [11] supported in MDE. Moreover, sinceMDE is a widely used approach to designing large-scaleapplications, it becomes the natural choice to specifythese domain-specific requirements.I. Specifying requirements using MDE: GRAFTprovides a DSML called the Component AvailabilityModeling Language (CAML), which provides capabil-ities to annotate application structural models withdomain-specific fault tolerance requirements. CAMLis developed using the Generic Modeling Environment(GME) [2], which provides a meta-programmable de-sign environment for developing domain-specific graph-ical modeling languages. CAML leverages the DSMLcomposition property of GME to compose itself on anexisting DSML that supports structural modeling.

This property ensures that any domain-specific an-notations of fault tolerance requirements to applica-tion structural models are realized as superimpositionor an overlay, which preserves the original design andstructure of the application. CAML also leverages the“separation of concerns” capability provided by GMEwherein the modeling environment can provide differ-ent views or projections of the overall system to the ap-plication developer. To that end, CAML’s fault toler-ance requirements are separated from the application’sstructural models by projecting them only in the QoSview but not in the structural view.

Figure 2. Composing Availability Annotation Meta-model of CAML

To capture the DPU semantics of our case studyfrom Section 2, we developed an annotation meta-model in CAML that is composed with a base lan-guage as shown in Figure 2. To modularize the DPUfault-tolerance requirements at the modeling level,CAML provides a key modeling abstraction calledFailOverUnit that supports group recovery semantics

4

Page 5: Automating Middleware Specializations for Fault Tolerancegokhale/WWW/papers/ISORC09_GRAFT.pdf · Automating Middleware Specializations for Fault Tolerance ... Aspect-oriented model

for the components associated with the relation Par-ticipates. One or more components can be grouped to-gether and treated as a DPU when they are associatedwith a single FailOverUnit.

It also captures the degree of replication of a DPUas a unit using an integer attribute called Replica. Fi-nally, the FailOverUnit also provides support for mod-eling system level and application-specific catastrophicexceptions because group recovery semantics are criti-cally dependent on such observable exceptions. Noticehow CAML ensures that the FailOverUnit is projectedonly within the QoS view while the structural view con-tinues to be part of the base language.II. Automating structural changes based onmodularized requirements: Note that middlewarespecializations are required for all component instancesin the system including replicas. Although CAMLmodularizes the domain-specific fault tolerance re-quirements by providing the annotation capabilities,these annotations by themselves do not produce extracomponent instances for the replicas in the structuralmodel of the application. Without these, the modelinterpreters associated with the base language, whichdo not understand the annotations, cannot synthesizedeployment and configuration metadata for the newcomponents. Thus the original structural models ofthe application must be transformed using these an-notated requirements, however, without the developerexpending any effort.

In our case study, such a transformation requiresseveral steps including (1) duplicating models of theprimary components participating in a FailOverUnit,and (2) duplicating their interconnections so that thenecessary connections can be established at deploy-ment time for the replica DPU.

GRAFT uses aspect-oriented model weaving [6]support provided by the Constraint-Specification As-pect Weaver (C-SAW) [18] tool to transform the orig-inal structural models with the annotated require-ments. The C-SAW weaver is a generalized model-to-model transformation engine for manipulating domain-specific models. C-SAW uses a built-in languagecalled Embedded Constraint Language (ECL) to spec-ify transformations.

As shown in Figure 3, we developed a model-to-model transformation using C-SAW that takes aCAML model having a clear separation of structuraldesign and the fault tolerance requirements as an in-put model, and generates a structural output model inresponse to the fault tolerance requirements. The newstructural model is then traversed by existing inter-preters of the base language to produce metadata forpackaging, assembling, deployment and configuration.

Figure 3. Automated Model Weaving Using C-SAW and FailOverUnit Replication Specification Us-ing ECL

Step 1 in Figure 3 represents a CAML model, whichhas fault-tolerance requirements modeled along withthe application’s structure. Step 2 in Figure 3 showshow a CAML model is automatically enriched using atransformation written using ECL. The transformationspecification is parameterized and accepts the numberof desired replicas as a parameter, which is specifiedas an integer attribute of a FailOverUnit in Step 1.Step 3 then uses existing model interpreters of the baselanguage and operates on the transformed models.

The transformation is divided into multiple ECLstrategies that perform two important steps. First,it creates clones of the participant components of aFailOverUnit. Second, it replicates the interconnec-tions between the primary components into replicacomponents. The result of these two steps is thatstructurally identical copies of the primary componentmodels are created. This is necessary because the de-ployment and configuration tools do not distinguish be-tween the primary components and the replica compo-nents.

3.3 Stage 2: Runtime Support for Specialization

The MDE tools deploy the entire system and con-figure the middleware, however, they do not specializethe middleware. It is necessary for the middleware tobe specialized using the the domain-specific fault toler-ant semantics specified in the MDE tools, without ex-pending any manual effort. To address this challenge,GRAFT uses a deployment-time generative approachthat augments general-purpose middleware with thedesired specializations.

For our case study, GRAFT specializes the client-side middleware stubs. Client-side middleware stubs

5

Page 6: Automating Middleware Specializations for Fault Tolerancegokhale/WWW/papers/ISORC09_GRAFT.pdf · Automating Middleware Specializations for Fault Tolerance ... Aspect-oriented model

are used to communicate the exceptions raised at theserver-side middleware so that applications can adaptto exceptional behavior. GRAFT augments the behav-ior of the middleware-generated stubs at deployment-time to catch failure exceptions, and initiate domain-specific failure recovery actions.

Figure 4. Automated Generation of Failure Detec-tion and Handling Code

GRAFT provides a model interpreter, which (1)traverses the CAML model, (2) identifies the compo-nents that participate in FailOverUnits, (3) identifiesthe components that are clients of the FailOverUnitparticipant components, and (4) generates modular-ized source code that provides failure detection andrecovery as shown by Step 1 in Figure 4. Dependingupon the role of the component, two different types ofbehaviors are generated by the interpreter.

We have identified two different roles of componentswith respect to a DPU: (1) a participant of a DPU(e.g., FC component) or (2) an external client of a com-ponent in a DPU but not a participant of the DPU(e.g., MFC component). The participants of a DPUdo not failover, however, clients of a DPU fail overto a replica DPU. To allow this difference in the be-havior, failover code is generated only for the clientcomponents whereas the code for FailOverUnit par-ticipant components do not perform failover; insteadthey trigger fail over in the client components of theFailOverUnit.

To modularize and transparently weave the fail-ure detection and recovery functionality within thestubs, GRAFT leverages Aspect-oriented Program-ming (AOP) [10] support provided by the As-pectC++ [19] compiler. The CAML model interpretergenerates AspectC++ code,1 which is then woven by

1Due to space restrictions we are not showing the generated

the AspectC++ compiler into stubs at the client sideproducing specialized stub implementations as shownby Step 2 in Figure 4. Finally, the specialized sourcecode of the stubs are compiled using a traditional C++compiler.

4 Evaluation of GRAFT

We evaluate GRAFT by measuring the efforts savedto specialize middleware in the context of the MHS casestudy of Section 2. Additionally we also qualitativelyvalidate the runtime behavior of the specialized mid-dleware in meeting the fault tolerance requirements ofthe MHS case study.Evaluating savings in effort to specialize mid-dleware: Table 1 shows the manual efforts saved byadopting GRAFT’s approach in designing and devel-oping the MHS case study described in Section 2. Thetable shows that there is reduction in the efforts ofmodeling replica components and connections for allthe four components. The declarative nature of theCAML’s FailOverUnit annotations and the automatedmodel-to-model transformation thereafter, obviates theneed for modeling the replica components and connec-tions explicitly resulting in a modular design of theMHS system.

A significant reduction in programming efforts isachieved due to automatic generation of code that han-dles failure conditions at runtime in the MHS system.The generated code for each component is different de-pending upon the number of remote interfaces used bya component, the number of methods in each remoteinterface, and the types of exceptions raised by themethods. The number of try blocks in Table 1 corre-sponds to the number of methods whereas the numberof catch blocks correspond to the number of excep-tions.

For example, when MFC component invokes theflip() method of the FC component, 45 lines of aspectcode is generated to handle group recovery semanticsfor that one function call alone. GRAFT’s approachyields higher savings in modeling and programming ef-forts for larger, more complex systems, which may havehundreds of components with tens of them requiringfault-tolerance capabilities.Qualitative validation of runtime behavior: Fig-ure 5 shows how the specialized stubs generated byGRAFT react to failures at runtime and provide grouprecovery semantics. To control the lifecycle of the com-ponents, the aspect code communicates with domainapplication manager (DAM), which is a standard de-

aspect code.

6

Page 7: Automating Middleware Specializations for Fault Tolerancegokhale/WWW/papers/ISORC09_GRAFT.pdf · Automating Middleware Specializations for Fault Tolerance ... Aspect-oriented model

Fault-tolerance Modeling Efforts Fault-tolerance Programming Efforts

Component # of original # of replica # of replica # of try # of catch Total # ofName connections components connections blocks blocks lines

Material Flow Control 1 / 1 0 / 0 2 / 0 1 / 0 3 / 0 45 / 0

Flipper Controller 2 / 2 2 / 0 4 / 0 2 / 0 6 / 0 90 / 0

Motor Controller 1 1 / 1 2 / 0 2 / 0 0 / 0 0 / 0 0 / 0

Motor Controller 2 2 / 1 2 / 0 2 / 0 0 / 0 0 / 0 0 / 0

Table 1. Manual Efforts in Developing ITS Casestudy Without/With GRAFT

ployment and configuration infrastructure service de-fined in LwCCM. It provides high-level application pro-gramming interface (API) to manage lifecycle of appli-cation components. Below, we describe the steps takenby GRAFT when a catastrophic exception is raised.

Figure 5. Runtime Steps Showing Group RecoveryUsing GRAFT

1. When FC makes a call on MC1, MC1 detects amotor failure and raises MotorFailureException,which is caught by the generated aspect code inFC.

2. The specialized stubs in FC, initiate shutdownof the primary DPU by instructing the DAM toremove participating components of the primaryDPU (FC, MC1, and MC2), including itself.

3. DAM contacts application servers hosting the pri-mary DPU components (FC, MC1, and MC2) andinstructs them to passivate and remove the com-ponents.

4. Removal of FC component triggers a system-levelexception at the MFC component, which is againcaught by the specialized stub at MFC-side.

5. The specialized stubs for MFC fetch a reference ofFC′ from the naming service. The naming serviceis assumed to be pre-configured at deployment-

time with lookup information for all the compo-nents in the system.

6. MFC successfully fails over to the replica DPU(FC′, MC1′, and MC2′) and resumes the earlierincomplete remote function call. Finally, FC′ com-municates with MC1′ and MC2′ to drive the beltmotors of the backup belt c and continues theoperation of MHS system without interruption.

5 Related Work

Polze et. al., [14], use AOP techniques to describefault-tolerance as a non-functional component propertyand focus on the automatic generation and replica-tion of protected components and fault tolerant middle-ware services based on aspect information and demon-strate service configuration through a graphical user-interface. GRAFT’s approach overlaps significantlywith this approach, however, GRAFT provides auto-matic support for domain-specific failure handling se-mantics to applications as opposed to common middle-ware services.

ACT [15] enables runtime adaptation by transpar-ently weaving adaptive code in the ORBs at runtime,which intercepts and adapts the requests, replies andexceptions that pass through the ORBs. ACT uses aruntime approach, which is based on portable intercep-tors. Although ACT’s generic and rule-based intercep-tor capabilities could be used to provide various failuremanagement semantics at runtime, it provides no sup-port for capturing design-, deployment-time domain-specific fault-tolerance requirements.

Sevilla et. al., [17] describe an automatic codegeneration approach for distribution, fault toleranceand load balancing aspects of component based sys-tems. GRAFT on the other hand provides mechanismsthat specifically support group failover failure seman-tics based on the model- as well as code-based weavingof component-based systems along with runtime mon-itoring infrastructure support.

Afonso et. al., [1] propose a manual AOP-based ap-proach for modularizing existing fault tolerance code

7

Page 8: Automating Middleware Specializations for Fault Tolerancegokhale/WWW/papers/ISORC09_GRAFT.pdf · Automating Middleware Specializations for Fault Tolerance ... Aspect-oriented model

from the legacy threaded applications. But the modu-larization and weaving must be done manually at ap-plication level whereas GRAFT automatically weavesthe domain-specific failure handling code in generalpurpose middleware to provide transparent recoverythough client-side failover.

JReplica [8] attempts to modularize the replicationaspect of fault tolerance using AOP. JReplica extendsUML with a replication language to define replica-tion policies at a finer domain-independent granular-ity whereas GRAFT supports domain-specific failuresemantics such as group failover. However JReplicadoes not provide the middleware implementation forfault recovery whereas GRAFT automatically gener-ates and weaves the necessary failure recovery codetransparently in the middleware. A common featurebetween JReplica and GRAFT is that they both en-sure that only the required method invocation pathsare intercepted.

6 Conclusion

This paper presented GRAFT, which is a two stagegenerative approach to specialize general purpose mid-dleware with domain-specific fault tolerance semantics.General purpose middleware are designed to support awide range of application domains and can only providegeneric solutions for non-functional properties, such asfault tolerance. When the domain imposes a rich set offault tolerance requirements, GRAFT’s approach is toautomatically specialize the middleware using contem-porary aspect-oriented languages to provide the desiredfailure recovery semantics without any modifications tothe applications.

The capabilities of GRAFT were demonstrated inthe context of an automated warehouse inventorytracking system (ITS) case study for group-wide failurerecovery semantics. The MDE capabilities of GRAFTincluding CAML are available in open source as part ofour CoSMIC toolsuite at www.dre.vanderbilt.edu/cosmic.

References

[1] F. Afonso, C. Silva, N. Brito, S. Montenegro, andA. Tavares. Aspect-oriented fault tolerance for real-time embedded systems. In ACP4IS ’08: Proceedingsof the 7th workshop on Aspects, components, and pat-terns for infrastructure software, 2008.

[2] Akos Ledeczi, Arpad Bakay, M. Maroti, P. Volgyesi,G. Nordstrom, J. Sprinkle, and G. Karsai. Compos-ing domain-specific design environments. Computer,34(11):44–51, 2001.

[3] C. Atkinson and T. Kuhne. Model-driven Develop-ment: A Metamodeling Foundation. IEEE Software,20(5):36–41, 2003.

[4] K. Czarnecki and U. W. Eisenecker. GenerativeProgramming: Methods, Tools, and Applications.Addison-Wesley, Reading, Massachusetts, 2000.

[5] A. Gokhale, K. Balasubramanian, J. Balasubrama-nian, A. S. Krishna, G. T. Edwards, G. Deng,E. Turkay, J. Parsons, and D. C. Schmidt. ModelDriven Middleware: A New Paradigm for Deployingand Provisioning Distributed Real-time and Embed-ded Applications. The Journal of Science of Com-puter Programming: Special Issue on Foundations andApplications of Model Driven Architecture (MDA),73(1):39–58, 2008.

[6] J. Gray, T. Bapty, S. Neema, D. C. Schmidt,A. Gokhale, and B. Natarajan. An Approach forSupporting Aspect-Oriented Domain Modeling. InProceedings of the 2nd International Conference onGenerative Programming and Component Engineering(GPCE’03), 2003.

[7] J. Gray, J. Tolvanen, S. Kelly, A. Gokhale, S. Neema,and J. Sprinkle. Domain-Specific Modeling. In CRCHandbook on Dynamic System Modeling, (Paul Fish-wick, ed.), pages 7.1–7.20. CRC Press, May 2007.

[8] J. Herrero, F. Sanchez, and M. Toro. Fault toleranceaop approach. In Workshop on Aspect-Oriented Pro-gramming and Separation of Concerns, 2001.

[9] J. Jin and K. Nahrstedt. On Exploring PerformanceOptimizations in Web Service Composition. In Mid-dleware, pages 115–134, 2004.

[10] G. Kiczales, J. Lamping, A. Mendhekar, C. Maeda,C. V. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-Oriented Programming. In Proceedings of the 11th Eu-ropean Conference on Object-Oriented Programming,pages 220–242, June 1997.

[11] A. Ledeczi, G. Nordstrom, G. Karsai, P. Volgyesi, andM. Maroti. On Metamodel Composition. In Proceed-ings of the 2001 IEEE International Conference onControl Applications (CCA), pages 756–760, MexicoCity, Mexico, 2001. IEEE.

[12] S. Mohapatra, R. Cornea, H. Oh, K. Lee, M. Kim,N. D. Dutt, R. Gupta, A. Nicolau, S. K. Shukla, andN. Venkatasubramanian. A Cross-Layer Approach forPower-Performance Optimization in Distributed Mo-bile Systems. In IPDPS, 2005.

[13] Object Management Group. Lightweight CCM FTFConvenience Document, ptc/04-06-10 edition, June2004.

[14] A. Polze, J. Schwarz, and M. Malek. Automatic gener-ation of fault-tolerant corba-services. In TOOLS ’00:Proceedings of the Technology of Object-Oriented Lan-guages and Systems (TOOLS 34’00), 2000.

[15] S. M. Sadjadi and P. K. McKinley. Act: An adaptivecorba template to support unanticipated adaptation.In Proc. of ICDCS. (2004).

[16] D. C. Schmidt. Model-Driven Engineering. IEEEComputer, 39(2):25–31, 2006.

8

Page 9: Automating Middleware Specializations for Fault Tolerancegokhale/WWW/papers/ISORC09_GRAFT.pdf · Automating Middleware Specializations for Fault Tolerance ... Aspect-oriented model

[17] D. Sevilla, J. M. Garcia, and A. Gomez. Aspect-oriented programing techniques to support distribu-tion, fault tolerance, and load balancing in the corba-lc component model. nca, 00:195–204, 2007.

[18] Software Composition and Modeling (Softcom) Labo-ratory. Constraint-Specification Aspect Weaver (C-SAW). www.cis.uab.edu/ gray/Research/C-SAW,University of Alabama, Birmingham, AL.

[19] O. Spinczyk, A. Gal, and W. Schroder-Preikschat. As-pectC++: An Aspect-Oriented Extension to C++. InProceedings of the 40th International Conference onTechnology of Object-Oriented Languages and Systems(TOOLS Pacific 2002), 2002.

9