abstraction of transaction demarcation in component oriented middleware n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Abstraction of Transaction Demarcation in Component-Oriented Middleware PowerPoint Presentation
Download Presentation
Abstraction of Transaction Demarcation in Component-Oriented Middleware

Loading in 2 Seconds...

play fullscreen
1 / 52

Abstraction of Transaction Demarcation in Component-Oriented Middleware - PowerPoint PPT Presentation


  • 103 Views
  • Uploaded on

Abstraction of Transaction Demarcation in Component-Oriented Middleware. Romain Rouvoy - Philippe Merle Jacquard INRIA Project LIFL – USTL {Romain.Rouvoy, Philippe.Merle}@lifl.fr Second ObjectWeb Consortium conference, Paris, November 28 - 29th, 2002. Outline. Context Challenges

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Abstraction of Transaction Demarcation in Component-Oriented Middleware' - qiana


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
abstraction of transaction demarcation in component oriented middleware

Abstraction of Transaction Demarcation in Component-Oriented Middleware

Romain Rouvoy - Philippe Merle

Jacquard INRIA Project

LIFL – USTL

{Romain.Rouvoy, Philippe.Merle}@lifl.fr

Second ObjectWeb Consortium conference,

Paris, November 28 - 29th, 2002

outline
Outline
  • Context
  • Challenges
  • Solution
  • Current experimentations
  • Conclusion
context
Context
  • Under sun lights of middleware for components
    • Enterprise Java Beans (EJB)
    • CORBA Components (CCM)
    • Next best things as .NET, Web Services, etc.
  • “Container” is the key technological artifact
    • Transparent integration of extra functionalities
      • Transaction, security, persistency, server scalability, etc.
    • Various approaches
      • Generated interception code, Fractal component membranes, AOP, MOP, …
  • Many business components require “Transaction Demarcation (TD)” as fundamental extra functionality
    • All/any containers should/will address TD
ejb transaction demarcation
EJB Transaction Demarcation

EJB Container

6 TD policies:

- SUPPORTS

- NEVER

- MANDATORY

- REQUIRED

- NOT SUPPORTED

- REQUIRES NEW

Integration already done by JOnASand any other EJB platforms

Java Transaction Service (JTA)

technical challenge n 1
Technical Challenge n°1

EJB Platform

6 TD policies

Not done by JOnAS, is it?

Few EJB platforms could do this!

Object

Transaction

Service

(OTS)

Java

Transaction

Service

(JTA)

Next Best

Things

(e.g. JOTM)

technical challenge n 11
Technical Challenge n°1

EJB Platform

6 TD policies

Requires abstraction of the TM integration!

Object

Transaction

Service

(OTS)

Java

Transaction

Service

(JTA)

Next Best

Things

(e.g. JOTM)

technical challenge n 2
Technical Challenge n°2

CCM / OpenCCM

EJB / JOnAS

Next Best Things

6 TD policies

6 TD policies

6 TD policies

Who addresses this factorization?

Java Open

Transaction

Manager

(JOTM)

technical challenge n 21
Technical Challenge n°2

CCM / OpenCCM

EJB / JOnAS

Next Best Things

Requires abstraction of the 6 TD policies!

Java Open

Transaction

Manager

(JOTM)

technical challenge n 3
Technical Challenge n°3

CCM / OpenCCM

EJB / JOnAS

Next Best Things

Abstraction of the 6 TD policies

How adding new TD policies?

e.g. requires new sub transaction

Java Open

Transaction

Manager

(JOTM)

technical challenge n 4
Technical Challenge n°4

CCM / OpenCCM

EJB / JOnAS

Next Best Things

Adding new TD policies

e.g. requires new sub transaction

Requires independence between TD and TM!

Object

Transaction

Service

(OTS)

Java Open

Transaction

Manager

(JOTM)

Next Best

Things

(e.g. JOTM)

scientific challenge
Scientific Challenge
  • Abstraction of transaction demarcation in component-oriented middleware
  • Mastering what transaction demarcations are
  • Mastering what transaction managers are
  • Defining the Open Transaction Demarcation Framework (OTDF)
framework challenge
Framework Challenge

CCM / OpenCCM

EJB / JOnAS

Next Best Things

Open Transaction Demarcation Framework

(OTDF)

Object

Transaction

Service

(OTS)

Java

Transaction

Service

(JTA)

Next Best

Things

(e.g. JOTM)

software challenge
Software Challenge
  • Provides the Java Open Transaction Demarcation Framework (JOTDF)
    • Modular and extensible
    • Aspect- and component-oriented
    • Memory and CPU predictability
    • No performance degradation
  • JOTDF should include
    • UML diagrams
    • Java interfaces
    • Java classes
    • Fractal components
what is otdf
What is OTDF ?

OTDF

OTS

EJB Platform

?

JTS

CCM Platform

JOTM

technical challenges n 1 transaction manager abstraction
Technical Challenges n°1 :Transaction Manager Abstraction

OTDF

OTS

JTS

EJB Platform

Factor Point

JOTM

Define a logical factorization

technical challenges n 1 transaction manager abstraction1
Technical Challenges n°1 :Transaction Manager Abstraction

OTDF

OTS

JTS

EJB Platform

Factor Point

JOTM

Need a common protocol

technical challenges n 1 transaction manager abstraction2

Wrapper

Wrapper

Wrapper

Technical Challenges n°1 :Transaction Manager Abstraction

OTDF

?

OTS

?

JTS

EJB Platform

Factor Point

?

JOTM

Provide a TM abstraction

What is this abstraction ?

technical challenges n 2 transaction demarcation abstraction
Technical Challenges n°2 :Transaction Demarcation Abstraction

OTDF

OTS

EJB Platform

6 TD policies

JTS

CCM Platform

6 TD policies

JOTM

Extract the policies

technical challenges n 2 transaction demarcation abstraction1
Switch(td) {

case Supports :

case Required :

case NotSupported :

case RequiresNew :

case Mandatory :

case Never :

}

Technical Challenges n°2 :Transaction Demarcation Abstraction

JOnAS

OTDF

<<interface>>

TransactionPolicy

Supports

Required

NotSupported

RequiresNew

Mandatory

Never

Command Design Pattern

technical challenges n 2 transaction demarcation abstraction2
Technical Challenges n°2 :Transaction Demarcation Abstraction

OTDF

OTS

EJB Platform

6 TD policies

JTS

CCM Platform

6 TD policies

JOTM

Provide interfaces

technical challenges n 2 transaction demarcation abstraction3
Technical Challenges n°2 :Transaction Demarcation Abstraction

OTDF

OTS

EJB Platform

Supports JTS

6 TD Policies :- SUPPORTS

- NEVER

- MANDATORY

- REQUIRED

- NOT SUPPORTED

- REQUIRES NEW

Mandatory JTS

Never JTS

Required JTS

Not Supported JTS

JTS

Requires New JTS

6 TD Policies :- SUPPORTS

- NEVER

- MANDATORY

- REQUIRED

- NOT SUPPORTED

- REQUIRES NEW

Supports OTS

Mandatory OTS

CCM Platform

Never OTS

Required OTS

JOTM

Not Supported OTS

Requires New OTS

Technical code extraction

technical challenges n 2 transaction demarcation abstraction4

Requires New

Not Supported

Required

Never

Mandatory

Supports

JTS

JTS

JTS

JTS

JTS

JTS

Supports

Requires New

Required

Never

Mandatory

Not Supported

OTS

OTS

OTS

OTS

OTS

OTS

Technical Challenges n°2 :Transaction Demarcation Abstraction

OTDF

OTS

EJB Platform

Supports JTS

Mandatory JTS

Never JTS

Required JTS

Not Supported JTS

JTS

Requires New JTS

Supports OTS

Mandatory OTS

CCM Platform

Never OTS

Required OTS

JOTM

Not Supported OTS

Requires New OTS

Technical code extraction

technical challenges n 2 transaction demarcation abstraction5

Supports

JTS

Mandatory

JTS

Never

JTS

Required

JTS

Not Supported

JTS

Requires New

JTS

Supports

OTS

Mandatory

OTS

Never

OTS

Required

OTS

Not Supported

OTS

Requires New

OTS

Technical Challenges n°2 :Transaction Demarcation Abstraction

OTDF

OTS

EJB Platform

JTS

CCM Platform

JOTM

Technical code extraction

technical challenges n 2 transaction demarcation abstraction6

Supports

JTS

Mandatory

JTS

Never

JTS

Required

JTS

Not Supported

JTS

Requires New

JTS

Supports

OTS

Mandatory

OTS

Never

OTS

Required

OTS

Not Supported

OTS

Requires New

OTS

Technical Challenges n°2 :Transaction Demarcation Abstraction

OTDF

OTS

EJB Platform

Supports

Never

JTS

Not Supported

Mandatory

CCM Platform

Required

JOTM

Requires New

Technical code extraction

technical challenges n 2 transaction demarcation abstraction7

Supports

Supports

Mandatory

Mandatory

Never

Never

Required

Required

Not Supported

Not Supported

Requires New

Requires New

Technical Challenges n°2 :Transaction Demarcation Abstraction

OTDF

OTS

EJB Platform

JTS

OTS

JTS

OTS

JTS

JTS

OTS

JTS

OTS

CCM Platform

JTS

OTS

JOTM

JTS

OTS

Technical code extraction

technical challenges n 2 transaction demarcation abstraction8

Supports

Supports

Mandatory

Mandatory

Never

Never

Required

Required

Not Supported

Not Supported

Requires New

Requires New

Technical Challenges n°2 :Transaction Demarcation Abstraction

Same demarcation type

OTDF

OTS

EJB Platform

OTS

?

JTS

JTS

CCM Platform

JOTM

Only demarcation code

technical challenges n 3 adding new td policies

Requires New

Requires New

Technical Challenges n°3 :Adding new TD policies

OTDF

OTS

EJB Platform

OTS

JTS

Requires New

JTS

CCM Platform

JOTM

JOTM

Using actual demarcation type

technical challenges n 3 adding new td policies1

Requires New

Requires New

Technical Challenges n°3 :Adding new TD policies

OTDF

OTS

EJB Platform

OTS

JTS

Requires New

JTS

CCM Platform

No dependance

JOTM

JOTM

Using actual demarcation type

technical challenges n 3 adding new td policies2

Supports

Supports

Requires New Sub

Requires New Sub

Requires New

Requires New

Technical Challenges n°3 :Adding new TD policies

OTDF

OTS

EJB Platform

OTS

JTS

JTS

CCM Platform

JOTM

Defining new demarcation type

technical challenges n 3 adding new td policies3

Supports

Supports

Requires New Sub

Requires New Sub

Requires New

Requires New

Technical Challenges n°3 :Adding new TD policies

OTDF

OTS

EJB Platform

OTS

JTS

No dependance

JTS

CCM Platform

JOTM

Defining new demarcation type

technical challenges n 3 adding new td policies4

Not Supported

Not Supported

Required

Required

Coordinator

Technical Challenges n°3 :Adding new TD policies

OTDF

OTS

EJB Platform

OTS

Supports

Mandatory

Never

JTS

JTS

CCM Platform

JOTM

Composing existing policies

technical challenges n 3 adding new td policies5

Not Supported

Not Supported

Required

Required

Coordinator

Technical Challenges n°3 :Adding new TD policies

OTDF

OTS

EJB Platform

OTS

Supports

Mandatory

Never

JTS

JTS

CCM Platform

JOTM

Composing existing policies

technical challenges n 4 independence between td and tm

Supports

Mandatory

Never

Required

Not Supported

Requires New

Technical Challenges n°4 :Independence between TD and TM

OTDF

EJB Platform

OTS

OTS

JTS

?

JTS

CCM Platform

JOTM

JOTM

Only demarcation code

technical challenges n 4 independence between td and tm1

Supports

TM

TM

TM

Mandatory

Never

Required

Not Supported

Requires New

Technical Challenges n°4 :Independence between TD and TM

OTDF

EJB Platform

OTS

OTS

JTS

Independence

JTS

JOTM

CCM Platform

JOTM

Abstraction

technical challenges n 2 transaction demarcation abstraction9

TM

Technical Challenges n°2 :Transaction Demarcation Abstraction

public interface UserTransaction

{

public int get_status ();

public void begin ();

public void commit ();

public void rollback ();

public void set_rollback_only ();

public void set_transaction_timeout (int seconds);

}

public interface TransactionManager

extends UserTransaction

{

public Transaction get_transaction ();

public Transaction suspend ();

public void resume (Transaction tx);

}

OTS

<<interface>>

UserTransaction

<<interface>>

TransactionManager

technical challenges n 4 independence between td and tm2

Supports

Supports

TM

TM

TM

Mandatory

Mandatory

Never

Never

Required

Required

Not Supported

Not Supported

Requires New

Requires New

Technical Challenges n°4 :Independence between TD and TM

OTDF

CCM Platform

OTS

OTS

JTS

JTS

JOTM

EJB Platform

JOTM

Instance

new technical challenge organisation of the td

Supports

TM

TM

TM

Mandatory

Never

Required

Not Supported

Requires New

New Technical Challenge :Organisation of the TD

OTDF

OTS

OTS

Organization ?

JTS

JTS

JOTM

JOTM

How to structure the policies ?

new technical challenge organization of the td

Supports

Mandatory

Never

Required

Not Supported

Requires New

New Technical Challenge :Organization of the TD

Interrogation

Interruption

Activation

  • No hierarchy/organization in the policies !
  • Observing policies to define a structure
  • Mapping between policies and the structure
new technical challenge organization of the td1

TM

TM

TM

New Technical Challenge :Organization of the TD

OTDF

Supports

OTS

Domain

OTS

?

Mandatory

Interrogation

Never

Interrogation

JTS

JTS

Activation

Required

Interruption

Not Supported

JOTM

JOTM

Requires New

Activation

Interruption

new technical challenge organization of the td2
New Technical Challenge :Organization of the TD

<<interface>>

DomainProtocol

public interface DomainInterrogation

extends DomainProtocol

{

public int get_status(RequestCallContext ctx) ;

}

public interface DomainActivation

extends TransactionStatus

{

public void begin(RequestCallContext ctx) ;

public void commit(RequestCallContext ctx) ;

}

public interface DomainInterruption

extends TransactionStatus

{

public void suspend(RequestCallContext ctx) ;

public void resume(RequestCallContext ctx) ;

}

<<interface>>

DomainInterrogation

<<interface>>

DomainActivation

<<interface>>

DomainInterruption

new technical challenges organization of the td

TM

TM

TM

New Technical Challenges :Organization of the TD

OTDF

TD

Domains

TM

Supports

OTS

OTS

Domain

Mandatory

Interrogation

Never

JTS

JTS

Activation

Required

Interruption

Requires New

JOTM

JOTM

Not Supported

new technical challenges organization of the td1
New Technical Challenges :Organization of the TD

ActivationPolicy

public class RequiredPolicyImpl

extends AbstractActivationPolicy

implements RequiredPolicy

{

public RequiredPolicyImpl(TransactionActivation ta) {

super(ta);

}

public void preinvoke(RequestCallContext ctx) {

if (ta.get_status(ctx)==Status.STATUS_NO_TRANSACTION)

ta.begin(ctx);

}

public void postinvoke(RequestCallContext ctx) {

ta.commit(ctx);

}

}

<<abstract>>

ActivationPolicyImpl

<<interface>>

RequiredPolicy

RequiredPolicyImpl

the odtf framework

Supports

TM

TM

TM

Mandatory

Mandatory

Mandatory

Organisation

Requires New

Requires New

Requires New

Never

Never

Never

Adaptability

Configuration

Required

Required

Required

Not Supported

Not Supported

Not Supported

Extensions

The ODTF Framework

OTDF

Domain

Interrogation

OTS

Activation

Interruption

Domain

Multi-Transaction Manager

Multi-plateform

Interrogation

JTS

Activation

Interruption

Domain

Interrogation

JOTM

Activation

Interruption

class evaluation
Class Evaluation
  • Before (without ODTF)
    • Nb Classes = Nb TD x Nb TM
    • E.g. = 6 TD x 3 TM = 18 Classes
  • After (with ODTF)
    • Nb Classes = Nb TD + Nb Domaines + Nb TM
    • E.g. : 6 TD + 3 Domains + 3 TM = 12 Classes
context of the experimentation
Context of the experimentation
  • Specifications :
    • Computer :
      • Type : DELL Optiflex GX240
      • CPU : Intel Pentium 4 2.00GHz
      • RAM : 1024 Mo
      • Bogomips : 3971.48
      • OS : Linux Debian
      • Kernel : 2.4.19-686
    • JDK:
      • Version : 1.4.1_01
    • JOnAS :
      • Version : 2.5.3 (from CVS)
    • JOTDF :
      • Using Fractal : no
      • Framework Level : 2
context of the experimentation1
Context of the experimentation
  • Experimentation :
    • JOnAS example : sb
    • Invocation : method buy()
    • Type :
      • 1000 invocations inside a transaction
      • 1000 invocations outside a transaction
    • Measure :
      • global execution time
      • number :
        • 10 on JOnAS platform
        • 10 on JOnAS platform with JOTDF
slide47

Supports

Mandatory

Requires New

Never

Required

Not Supported

The JOnAS’s JODTF Framework

JOTDF

JTS

JOnAS (EJB) Platform

JTS

Interrogation

Activation

Interruption

conclusion
Conclusion
  • We could abstract transaction demarcation in middleware platforms for components with high added values
    • Modular and extensible
    • Aspect- and component-oriented
    • Better memory and CPU predictability
    • No performance degradation
  • The framework and its code base are available
    • UML diagrams
    • Java interfaces and classes
    • Fractal components
  • Seamless JOnAS integration done
    • By removing transactional code in JOnAS ;-)
    • By adding adaptation code for our framework ;-(
    • Better integration = Think JOnAS containers as clients of our framework
return to the future
Return to The Future
  • Apply our approach to some other extra functionalities dealt by containers
    • Distributed logging?
    • Security access control?
    • Others?
  • Need for a generic and common way for integration/interposition in “containers”
    • Fractal and ASM bytecode generation?
    • Java Aspect Components (JAC)?
    • Meta Object Protocol (MOP)?
    • Interaction service from I3S?
    • Or other adaptation techniques?