32
VERSION CONSISTENCY IMPLEMENTATION

V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

Embed Size (px)

Citation preview

Page 1: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

VERSION CONSISTENCY IMPLEMENTATION

Page 2: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

2

CONTENTS

Apache Tuscany VcContainer Domain manager VcContainer communication

Page 3: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

3

DYNAMIC UPDATES

Dynamic update of software systems is often desired, sometimes required

How to achieve version consistency is one of the key challenges

Version ConsistencyIntuitively, any extant transaction, with all its (direct and indirect) sub-transactions, is executed as if entirely in the old or entirely in the new configuration.

Page 4: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

4

DYNAMIC UPDATES

Goal: implementing a framework to execute dynamic update of component-based

systems verify the correctness of version consistency

algorithm

Page 5: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

5

TECHNOLOGIES

Varieties of technologies is available

SCA specification defines a common programming model for different technologies

Apache Tuscany is an open source implementation of SCA, it’s stable and makes component-based development much more easier

Service Component Architecture (SCA)

Page 6: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

6

COMPONENT-BASED DISTRIBUTED SYSTEMS

Static configuration of an example CBDS

DBPortal

Auth

Proc

com : Component

: Static Dependence

Page 7: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

7

COMPONENT-BASED DISTRIBUTED SYSTEMS

Runtime Portal component

Tuscany components communicate via endpoint service endpoint:  the service a components expose reference endpoint

Interceptor handles messages passing through it transaction, security, …

Page 8: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

8

OUR CONCERNS

Local dynamic dependences maintaining Dependences management Transaction ID allocation Component lifecycle management On-demand setup Achieving freeness

Page 9: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

9

MAINTAINING LOCAL DEPENDENCES

We need to maintain following local dependences future/past arcs entering current component

InArcsRegistry future/past arcs leaving current component

OutArcsRegistry sub transaction and its root transaction

TransactionRegistry

Page 10: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

10

OUR CONCERNS

Local dynamic dependences maintaining Dependences management Transaction ID allocation Component lifecycle management On-demand setup Achieving freeness

Page 11: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

11

MANAGEMENT OF DEPENDENCES

When a transaction starts When a transaction is running When a transaction ends

Page 12: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

12

MANAGEMENT OF DEPENDENCES

When a transaction starts create future arcs store future arcs notify parent/sub components

When a transaction is running When a transaction ends

Page 13: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

13

WHEN A TRANSACTION STARTS

When root transaction T0 starts, setting up is needed

Page 14: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

14

WHEN A TRANSACTION STARTS

Portal need to create future arcs

DBPortal

Auth

Proc

Setting up

futureT0

futureT0

Page 15: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

15

WHEN A TRANSACTION STARTS

Version consistency algorithm

Notify algorithm module that T0 starts; create future arcs to Auth and Proc component

add future arcs to OutArcsRegistry

notify Auth and Proc that a future arc is created

Page 16: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

16

MANAGEMENT OF DEPENDENCES

When a transaction starts When a transaction is running

update local future/past OutArcsRegistry notify sub component to update their

InArcsRegistry identify root and its sub transaction

When a transaction ends

Page 17: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

17

WHEN A TRANSACTION IS RUNNING

When root transaction T0 is running, processing is needed

Page 18: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

18

WHEN A TRANSACTION IS RUNNING

Update future arc

DBPortal

Auth

Proc

Progressing

pastT0

Page 19: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

19

WHEN A TRANSACTION IS RUNNING

Version consistency algorithm

update related future arc in OutArcsRegistry

notify Auth that future arc of T0 needs to be updated

Notify algorithm module that T0 is running and Auth component will not be used

Page 20: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

20

IDENTIFICATION OF ROOT TRANSACTION

When root transaction T0 is initiated on Portal, how does sub-transactions T1 on Auth component know its root transaction?

Page 21: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

21

IDENTIFICATION OF ROOT TRANSACTION

Define a trace interceptorto add root transaction ID T0 to the message that is passing through it

to resolve message to get root transaction T0, and map current sub transaction root(T1)=T0

Page 22: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

22

MANAGEMENT OF DEPENDENCES

When a transaction starts When a transaction is running When a transaction ends

update local dependences notify parent component

Page 23: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

23

WHEN A TRANSACTION ENDS

Transaction T0 ends

Page 24: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

24

WHEN A TRANSACTION ENDS

Update arcs

DBPortal

Auth

Proc

Cleaning up

pastT0

pastT0

pastT0

pastT0

Page 25: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

25

WHEN A TRANSACTION ENDS

Version consistency algorithm

update related future arc in OutArcsRegistry

notify Auth that future arc of T0 needs to be updated

Notify algorithm module that T0 ends and all components will not be used

Page 26: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

26

VC CONTAINER

A business component and its related VC modules are wrapped in a VcContainer as a single node

Page 27: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

27

OUR CONCERNS

Local dynamic dependences maintaining Dependences management Transaction ID allocation Component lifecycle management On-demand setup Achieving freeness

Page 28: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

28

ALLOCATION OF TRANSACTION ID

In one domain, for each transaction, it should have an unique ID define a domain manager component allocate

and destroy transaction ID

Page 29: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

29

FUTURE WORK

Maintaining local dynamic dependences Management of dependences Allocation of unique transaction ID Component lifecycle management On-demand setup Achieving freeness

Page 30: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

30

COMPONENT LIFECYCLE MANAGEMENT

When a component needs dynamic update, it must be deactivated and messages it receiving must be cached.

When dynamic update is done, the component should be activated

Page 31: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

31

ON-DEMAND SETUP

Dynamic configuration management could introduce significant overhead Solution: a configuration can be set up on-

demand

Page 32: V ERSION CONSISTENCY IMPLEMENTATION. C ONTENTS Apache Tuscany VcContainer Domain manager VcContainer communication 2

32

ACHIEVING FREENESS