Top Banner
Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen
37

Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Dec 14, 2015

Download

Documents

Myrtle Barker
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: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Dynamic and Selective Combination of Extension in Component-based

Applications

Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen

Page 2: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Outline

Motivation: Dynamic customization of distributed services

Overview of wrapper-based model Lasagne

Problem statement: analysis of problems with wrappers

Detailed overview of Lasagne

Lessons learned

Conclusion

Page 3: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Motivation

Support for dynamic and client-specific customization of distributed services is needed

An example: web service on the Internet Multiple clients are accessing service instance simultaneously Different clients have different customization needs One client must be able to customize the web service for use

in its own context, without affecting other clients (service behavior delivered to

other clients must not be affected)

Page 4: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Motivation (ctd)

Customization process = context-sensitive and dynamic combination of extensions to a minimal core system Extensions can be functional (e.g. refined core service) and

non-functional (e.g authentication, authorization)

Revisiting example: web service on the Internet Each client must be able to select a subset of extensions into

the core service for use in its own context:

per client request, per client session without interfering with other clients

Page 5: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Short overview of Lasagne

A programming, deployment and run-time model that supports dynamic combination of extensions per client request

Inspired by wrapper-based design patterns Decorator and Role Object

Advantages of wrappers already support combination of extensions to a component operate at instance-level => customization of online services

Deal with disadvantages of wrappers object identity problems

Page 6: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Wrapper-based design patterns Decorator [Gamma et al]

Disjunctive chaining supports selective combination

Agenda

Decorator 1 Decorator 2

Decorator 2

Decorator 1

Page 7: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Wrapper-based design patterns

Role Object [Baumer et al] Component type widening

Dynamically adds new service interface selection of roles by means of specification object

Role 2

Component

getRole(specification)

Role 1

Page 8: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

AtomicAgenda

AuthorizationCheckWrapper

Authorization&

Access Control

DatingSystem

GroupAppointment

Service

SimpleAgendacore system

extensionsAccessDenied

ExceptionHandler

Problem Statement

System-wide interaction refinement

Page 9: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Spaghetti ProblemAgenda

DatingSystem

Object Identity Problem

Atomic Agenda

Atomic Agenda

Group App. Service

AccessDenied Exception Handler

Group App. Service

AccessDenied Exception Handler

Authoriz. Check Wrapper

Authoriz. Check Wrapper

Page 10: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Spaghetti ProblemAgenda

Authoriz. Check Wrapper

Atomic Agenda

Atomic Agenda

Authoriz. Check Wrapper

DatingSystem

Group App. Service

AccessDenied Exception Handler

Group App. Service

AccessDenied Exception Handler

Object Identity Problem

Page 11: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Spaghetti ProblemAgenda

Atomic Agenda

Atomic Agenda

DatingSystem

Group App. Service

AccessDenied Exception Handler

Group App. Service

AccessDenied Exception Handler

Object Identity Problem

Authoriz. Check Wrapper

Authoriz. Check Wrapper

Page 12: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Spaghetti ProblemAgenda

Atomic Agenda

Atomic Agenda

DatingSystem

Group App. Service

AccessDenied Exception Handler

Group App. Service

AccessDenied Exception Handler

authorization & access control

Object Identity Problem

Authoriz. Check Wrapper

Authoriz. Check Wrapper

Page 13: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Spaghetti Problem Agenda

Atomic Agenda

Atomic Agenda

DatingSystem

Group App. Service

AccessDenied Exception Handler

Group App. Service

AccessDenied Exception Handler

authorization & access control

Object Identity Problem

Authoriz. Check Wrapper

Authoriz. Check Wrapper

Page 14: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Coordination Problem Agenda

DatingSystem

Atomic Agenda

Atomic Agenda

Group App. Service

AccessDenied Exception Handler

Group App. Service

AccessDenied Exception Handler

Authoriz. Check Wrapper

Authoriz. Check Wrapper

Page 15: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Coordination Problem Agenda

Atomic Agenda

Atomic Agenda

DatingSystem

Group App. Service

AccessDenied Exception Handler

Group App. Service

AccessDenied Exception Handler

Inconsistency

Authoriz. Check Wrapper

Authoriz. Check Wrapper

Page 16: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Coordination Problem Agenda

Atomic Agenda

Atomic Agenda

DatingSystem

Group App. Service

AccessDenied Exception Handler

Group App. Service

AccessDenied Exception Handler

Calling context must be propagated over entire

core system

Authoriz. Check Wrapper

Authoriz. Check Wrapper

Page 17: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Coordination Problem Agenda

Atomic Agenda

Atomic Agenda

DatingSystem

Group App. Service

AccessDenied Exception Handler

Group App. Service

AccessDenied Exception Handler

Calling context must be propagated over entire

core system

Authoriz. Check Wrapper

Authoriz. Check Wrapper

Page 18: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Coordination Problem Agenda

Atomic Agenda

Atomic Agenda

DatingSystem

Group App. Service

AccessDenied Exception Handler

Group App. Service

AccessDenied Exception Handler

Contextual change must be propagated over entire

core system

Authoriz. Check Wrapper

Authoriz. Check Wrapper

Page 19: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Other problems solved

Partial ordering constraints between wrappers

Some wrapper composition logic should not be under control of the clients

Use of design patterns must be anticipated by core application developer.

Technical problems Problems with delegation and common self State consistency between multiple instances of the same

wrapper definition

Page 20: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Turning Spaghetti into Lasagne

Externalize wrapper composition logic from the code of core system and extensions

Clients can customize the wrapper composition logic on a per collaboration basis

Page 21: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

High-level overview of Lasagne

Introductory terms Component-based, distributed core system

Component type =< {services}, {dependencies}> Connection supported by COTS middleware

Client request initiates collaboration between core components

Lasagne customization process consists of three phases: extension programming, deployment of extensions to a core system, and selective combination per collaboration

Agenda 1 DatingSystem Agenda 2

dependency servicecollaboration

connection

Page 22: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

High-level overview of Lasagne

The extension programming model An extensions is implemented as layer of wrappers Wrappers are programmed in hybrid form between

Decorator and Role Object Each wrapper definition is meant for decorating a specific

minimal component type

Group App. Service

Atomic Agenda

*

<{Dating}, {Negotiation}>

<{Negotiation}, {}>

Page 23: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

High-level overview of Lasagne

Deployment of extensions to core application Declarative specification of how to integrate wrappers to a

specific core application specify fine-grained partial ordering constraints

AtomicAgenda

AuthorizationCheckWrapper

Authorization&

Access Control

DatingSystem

GroupAppointment

Service

dynamic extensiblecomponent

SimpleAgenda

AccessDeniedExceptionHandler

Orderingconstraints

Page 24: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

High-level overview of Lasagne

Selective combination per client request

dynamic adjustment of message flow through

appropriate chain of wrappers

:Agenda

Group App. Service

Atomic Agenda

Authoriz. Check Wrapper

AccessDenied Exception Handler

:DatingSystem

Page 25: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Lasagne Concepts

Component Identity Aggregates core instance and its wrappers into one identity Removes the spaghetti of wrapper references

Extension Identifier qualified name that uniquely identifies an extension Is used to designate wrappers as belonging to a specific

extension Composition Policy {…}

specifies the subset of extension identifiers for a specific collaboration between client and core system

A composition policy propagates with the collaboration flow

Page 26: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Lasagne concepts

Contextual properties e.g client-specific preferences, message flow history defined as <name, value> pairs that propagate with the

collaboration flow Interceptors

define contextual properties of collaboration select or unselect extensions. Typical selection rule:

If <condition> is satisfied within <context> then attach/discard <extension identifier> to composition policy

Variation point Extension to runtime component model Generic message dispatch mechanism

Dynamically constructs wrapper chain Interprets composition policy and ordering constraints

Page 27: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Component Identity

Agenda 1 DatingSystem Agenda 2

authorization & access control

Page 28: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Extension Identifiers

Agenda 1 DatingSystem Agenda 2

authorization & access control

<“authoriz”>

<“group”>

Page 29: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Interceptors and Composition Policy

Agenda 1 DatingSystem Agenda 2

authorization & access control

<“authoriz”>

<“group”>

{ } {<“authoriz”>}

add <“authoriz”>

If client_localhost on remote subnet then attach <“authoriz”> to composition policy

{<“authoriz”>}

{<“authoriz”>}

Attach client_localhost, client_identity as contextual properties to collaboration.

Interceptor definitions

{ }

Page 30: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

•Propagation of composition policy

•Propagation of contextual properties

•Variationpoint performs automatic adjustment of message flow

Underlying runtime mechanisms

Agenda 1 DatingSystem Agenda 2

authorization & access control

<“authoriz”>

<“group”>

{ } {<“authoriz”>}

add <“authoriz”>

{<“authoriz”>}

{<“authoriz”>}

Page 31: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Lessons learned

Lasagne is suitable for customization at the coarse-grained architectural level

Extensions are reusable over multiple applications is supported in Java implementation of Lasagne

(co-work with Renaud Pawlak) Wrappers are reusable over different types of

components Deployment-time operation that dynamically

connects extension operation to core operation.

Page 32: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Lessons Learned (ctd)

Lasagne is too low-level and complex to use Need to build higher-level tool or language on top

of Lasagne framework feedback from advanced separation of concerns

community Aspect-oriented programming Aspectual Components GenVoca and Mixin layers Multidimensional separation of concerns

Page 33: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Conclusion Customization of distributed services

non-invasive customization dynamic combination of system-wide extensions

consistency and scalability context-sensitiveness

simultaneous client-specific views message flow history

Lasagne prototypes Programming Languages with an open implementation

Correlate, Java Reflective middleware platforms

Java RMI, Lasagne ORB

Page 34: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Other problems solved

Partial ordering constraints between wrappers

Multiple instances of the same wrapper definition due disjunctive wrapper chains difficult to keep the states of different wrapper instances

consistent to each other

No Delegation Self-call of core component is not redirected through

wrappers

Some wrapper composition logic should not be under control of the clients

Page 35: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Coordination Problem Agenda

Authoriz. Check Wrapper

Atomic Agenda

Atomic Agenda

Authoriz. Check Wrapper

DatingSystem

Group App. Service

AccessDenied Exception Handler

Group App. Service

AccessDenied Exception Handler

Calling context must be propagated over entire

core system

Page 36: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Coordination Problem Agenda

Authoriz. Check Wrapper

Atomic Agenda

Atomic Agenda

Authoriz. Check Wrapper

DatingSystem

Group App. Service

AccessDenied Exception Handler

Group App. Service

AccessDenied Exception Handler

Calling context must be propagated over entire

core system

Page 37: Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.

Lasagne mechanisms Underlying run-time component model

i1

component identity

i0

VariationPoint

wrapper instances

inner.inspect() i3

i2

core instance

(inner i0..3).inspect()

composition policy && ordering constraints