Top Banner
1 Applying Aspect Oriented Modelling to Service Orchestration Crest Centre, King’s College London
20
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ConnieApplying Aspec..

1

Applying Aspect Oriented Modelling to Service Orchestration

Crest Centre, King’s College London

Page 2: ConnieApplying Aspec..

2

Agenda

• Service Workflow – Orchestration

• Cross Cutting Concerns in Workflow

• Applying Aspect Oriented Modelling & Design

• Testing Service Orchestration

Page 3: ConnieApplying Aspec..

3

Motivation of Research

• Business models shift from products to services

• Software as Services (SaaS) model of development - Components are not owned

• Service Oriented Architecture – Integrated modular architecture

• Mechanisms that allow well integrated services are difficult to provide – Service Workflows in WS- BPEL standard

• Cross-cutting concerns – Tangled workflow problem

• Aspect-Oriented Software Development (AOSD) offers means to disentangle cross-cutting concerns

Page 4: ConnieApplying Aspec..

4

Service Workflows – BPEL

• Mechanisms that allow well integrated services are difficult to provide – Service Workflows in WS- BPEL standard

• Processes could only be decomposed according to the control flow

Page 5: ConnieApplying Aspec..

5

Service Workflows – Tangled Cross Cutting Concern

Problem• Concerns that do not align with this decomposition become

scattered across the process description, making it difficult to manage

• Need a means to manage complexity

• To disentangle cross-cutting concerns

Page 6: ConnieApplying Aspec..

6

Aspect Oriented Modelling & Design

• AOP emerged to complement O.O.Programming

• Models Cross cutting concerns – modularised concerns,

making development, maintenance and reuse easier.

• Enable non-invasive addition of concerns – support

software evolution

• Web service to meet post-deployment requirements

Update

aspect Update { pointcut change(): execution(void point.setX(int)) || execution(void point.setX(int)) || execution(void shape.moveBy(int,int))

after() returning: change() { Display.update(); } }

Page 7: ConnieApplying Aspec..

7

Opportunities for AOSD in (SOA)

• Service Monitoring: detect conditions or

violation of properties at run-time.

– or a particular sequence of events has

occurred.

– Design by Contract

• Service Verification - testing

• Service Adaptation – e.g. QoS Requirements

Page 8: ConnieApplying Aspec..

8

Current AOSD Approaches

• Domain Specific Aspect Language Extensions

– Doxpects, AO4BPEL

• Aspects Aware Execution Environment

– AO4BPEL, Small Talk Implementation

– WSFL implemented in JAsCO

• Limitations– Proprietary solution– Portability

Page 9: ConnieApplying Aspec..

9

Problems Identified

• The Proprietary Technology Problem

– Standard Workflow Engines need to be modified

substantially

• In Aspect Deployment

– The Fragile PointCut Problem

– Joinpoint Detection Problem

• Modularisation Problem in Service

Middleware

– Address Infrastructural Concerns as AOP-WS-Middleware

Page 10: ConnieApplying Aspec..

10

Proposed Solution• A framework of A.O. design that provides WS

composition support

• XQuery as the PointCut language

• Aspect Representation in XML

• Model Based Transformation for weaving & deployment

PointCut

JoinPoint

Advice

Aspect Schema .xsd

.wsdl Advice Logic

XSLT Rules .xsl Pointcuts &Joinpoints

Aspects Representation

Page 11: ConnieApplying Aspec..

11

Aspect Weaving & Deployment

• Weaving – the process that coordinates aspects and non-aspects code

• Static Weaving

– Weaving Before Run-time

• Dynamic Weaving

– Allows for dynamically add, remove or refine aspects

– Difficulties are:

• Performance overhead

• Dedicated execution platform

Page 12: ConnieApplying Aspec..

12

Static Weaving

New BPEL Process Description

Static Aspect Weaver

BPEL Process Aspect

Definition Aspect Deployment Description

Standard BPEL Execution EnvironmentStandard BPEL Execution Environment

1. Extract xsd from .bpel

2. <aspect>.xml & xsd

3. Transformation Rules

1. Locate pointcut

2. Joint point merge

4. Composing new .bpel

Page 13: ConnieApplying Aspec..

13

Aspect Definition in XML1 <aspect name="Billing">2 <using>3 <namespace name="xmlns:bill" uri="my.billing.uri" />4 <partnerLink name="billing" partnerLinkType="bill:billingLT" />5 <variable name="billingMsg" type="bill:billingMsg" />6 </using>7 <pointcut name="CallStarts(Jp)"8 pointcut="invoking(Jp, ‘CallService’, ‘confCallPT’, ‘createConfCall’)" />9 <pointcut name="CallEnds(Jp)"10 pointcut="invoking(Jp, ‘CallService’, ‘confCallPT’, ‘closeConfCall’)" />11 <advice name="billService">12 <invoke partnerLink="billing" portType="bill:billingPT"13 operation="billService" inputVariable="billingMsg" />14 </advice>15 </aspect>

Page 14: ConnieApplying Aspec..

14

Service Implemented Aspect

Definition of Service Implemented Aspects in WSDL:<complexType name="EPmessage">

<all> <elementname="opName" type="string"/> <element name="serviceType" type="string"/> <element name="serviceEndpoint“ type="EndpointReference"/> <element name="value" type="Serializable"/>

</all> </complexType><message name="MessageReceived">

<part name="MsgReceived“ type="tns:EPmessage"/> </message> <portType name="EndPointMonitorPT">

<operation name="SendRequest"> <input message="MessageSent"/>

</operation>

Page 15: ConnieApplying Aspec..

15

Model Based Transformation

- Weaving and aspect deployment- Process of manipulating the meta data of the process schema

- MDA – model based transformation- General purpose languages – no overhead- Generic transformation tools: Graph transformation - Case tools: UML based - Dedicated Tools: QVT- Complexity- Kermeta & Eclipse EMF

Aspect Logic

Page 16: ConnieApplying Aspec..

16

Case Studies

Page 17: ConnieApplying Aspec..

17

Testing Service Workflows

• Service Orchestration - BPEL’s claim v.s. BPMN– Translation between the two processes

• Aspect-Oriented Testing Techniques

• Testing Woven Apects

Page 18: ConnieApplying Aspec..

18

Evaluation Metrics

• AOSD Evaluation

– Multi-Dimensional Separation of Concerns

– Good Design vs. Good Coding

– Performance Bottleneck

– AOSD decomposition:

• Units of aspects

• Well-defined interfaces

• SOA Evaluation

– Comparable with component based software

– SOA is an example of Distributed Computing

• Decomposition of systems into functional or logical components with well-defined interfaces used for communication

Page 19: ConnieApplying Aspec..

19

Aspect View – Customised view of the System

. . .

orchestration

choreography

Aspect Interface

Internal service/API

Presentation of Data

Transformation

Transformation

AOSD in WS Processes & Infrastructural Concerns

Data

Page 20: ConnieApplying Aspec..

20

Future Directions• Dynamic AOP, uses wrapper technologies, offers a way of allowing

components to be individually customized and extended. – Dynamic aspect-oriented programming is relatively straightforward in a trusted

environment, where (with the exception of bugs) aspects can be assumed to be safe. In an untrusted public computing environment, new aspects cannot be assumed to come from a benign source.

• Modularising Web Services Management with AOP

• Relationship between Aspects

• Unraveling Crosscutting Concerns in Web Services Middleware• Monitoring

– PSL representation of service enactments has natural representation as a relational database

– Can use relational queries to perform run-time monitoring– Can use queries to do data mining on execution logs

• Transactions– Providing transactional guarantees remains largely open– What are the building blocks within services? In choreography?– Verifying transactional correctness?