Presentation is loading. Please wait.

Presentation is loading. Please wait.

Www.objectweb.org Abstraction of Transaction Demarcation in Component-Oriented Middleware Romain Rouvoy - Philippe Merle Jacquard INRIA Project LIFL –

Similar presentations


Presentation on theme: "Www.objectweb.org Abstraction of Transaction Demarcation in Component-Oriented Middleware Romain Rouvoy - Philippe Merle Jacquard INRIA Project LIFL –"— Presentation transcript:

1 www.objectweb.org 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

2 www.objectweb.org (JOTM) - D2 - 07/10/2002 Outline è Context è Challenges è Solution è Current experimentations è Conclusion

3 www.objectweb.org (JOTM) - D3 - 07/10/2002 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

4 www.objectweb.org (JOTM) - D4 - 07/10/2002 EJB Transaction Demarcation EJB Container Java Transaction Service (JTA) 6 TD policies: - SUPPORTS - NEVER - MANDATORY - REQUIRED - NOT SUPPORTED - REQUIRES NEW Integration already done by JOnAS and any other EJB platforms

5 www.objectweb.org (JOTM) - D5 - 07/10/2002 Technical Challenge n°1 EJB Platform 6 TD policies Object Transaction Service (OTS) Java Transaction Service (JTA) Next Best Things (e.g. JOTM) Not done by JOnAS, is it? Few EJB platforms could do this!

6 www.objectweb.org (JOTM) - D6 - 07/10/2002 Technical Challenge n°1 EJB Platform 6 TD policies Object Transaction Service (OTS) Java Transaction Service (JTA) Next Best Things (e.g. JOTM) Requires abstraction of the TM integration!

7 www.objectweb.org (JOTM) - D7 - 07/10/2002 Technical Challenge n°2 Java Open Transaction Manager (JOTM) CCM / OpenCCMEJB / JOnASNext Best Things 6 TD policies Who addresses this factorization?

8 www.objectweb.org (JOTM) - D8 - 07/10/2002 Technical Challenge n°2 Java Open Transaction Manager (JOTM) Requires abstraction of the 6 TD policies! CCM / OpenCCMEJB / JOnASNext Best Things

9 www.objectweb.org (JOTM) - D9 - 07/10/2002 Technical Challenge n°3 Java Open Transaction Manager (JOTM) Abstraction of the 6 TD policies CCM / OpenCCMEJB / JOnASNext Best Things How adding new TD policies? e.g. requires new sub transaction

10 www.objectweb.org (JOTM) - D10 - 07/10/2002 Technical Challenge n°4 Java Open Transaction Manager (JOTM) Adding new TD policies e.g. requires new sub transaction CCM / OpenCCMEJB / JOnASNext Best Things Requires independence between TD and TM! Object Transaction Service (OTS) Next Best Things (e.g. JOTM)

11 www.objectweb.org (JOTM) - D11 - 07/10/2002 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)

12 www.objectweb.org (JOTM) - D12 - 07/10/2002 Framework Challenge CCM / OpenCCMEJB / JOnASNext Best Things Object Transaction Service (OTS) Java Transaction Service (JTA) Next Best Things (e.g. JOTM) Open Transaction Demarcation Framework (OTDF)

13 www.objectweb.org (JOTM) - D13 - 07/10/2002 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

14 www.objectweb.org (JOTM) - D14 - 07/10/2002 What is OTDF ? EJB Platform OTS JTS JOTM OTDF CCM Platform ?

15 www.objectweb.org (JOTM) - D15 - 07/10/2002 Technical Challenges n°1 : Transaction Manager Abstraction EJB Platform OTS JTS JOTM OTDF Factor Point Define a logical factorization

16 www.objectweb.org (JOTM) - D16 - 07/10/2002 Technical Challenges n°1 : Transaction Manager Abstraction EJB Platform OTS JTS JOTM OTDF Factor Point Need a common protocol

17 www.objectweb.org (JOTM) - D17 - 07/10/2002 Technical Challenges n°1 : Transaction Manager Abstraction EJB Platform OTS JTS JOTM OTDF Factor Point Wrapper Provide a TM abstraction ? ? ? What is this abstraction ?

18 www.objectweb.org (JOTM) - D18 - 07/10/2002 Technical Challenges n°2 : Transaction Demarcation Abstraction EJB Platform OTS JTS JOTM OTDF Extract the policies CCM Platform 6 TD policies

19 www.objectweb.org (JOTM) - D19 - 07/10/2002 Technical Challenges n°2 : Transaction Demarcation Abstraction Switch(td) { case Supports : … case Required : … case NotSupported : … case RequiresNew : … case Mandatory : … case Never : … } > TransactionPolicy SupportsRequired NotSupportedRequiresNew MandatoryNever JOnASOTDF Command Design Pattern

20 www.objectweb.org (JOTM) - D20 - 07/10/2002 Technical Challenges n°2 : Transaction Demarcation Abstraction EJB Platform OTS JTS JOTM OTDF Provide interfaces CCM Platform 6 TD policies

21 www.objectweb.org (JOTM) - D21 - 07/10/2002 Required OTS Not Supported OTS Never OTS Mandatory OTS Supports OTS Requires New OTS Required JTS Not Supported JTS Never JTS Mandatory JTS Supports JTS Requires New JTS 6 TD Policies : - SUPPORTS - NEVER - MANDATORY - REQUIRED - NOT SUPPORTED - REQUIRES NEW Technical Challenges n°2 : Transaction Demarcation Abstraction EJB Platform OTS JTS JOTM OTDF Technical code extraction CCM Platform 6 TD Policies : - SUPPORTS - NEVER - MANDATORY - REQUIRED - NOT SUPPORTED - REQUIRES NEW

22 www.objectweb.org (JOTM) - D22 - 07/10/2002 Technical Challenges n°2 : Transaction Demarcation Abstraction EJB Platform OTS JTS JOTM OTDF Technical code extraction CCM Platform Required OTS Not Supported OTS Never OTS Mandatory OTS Supports OTS Requires New OTS Required JTS Not Supported JTS Never JTS Mandatory JTS Supports JTS Requires New JTS Not SupportedJTS Requires NewJTS RequiredJTS NeverJTS MandatoryJTS SupportsJTS Not SupportedOTS Requires NewOTS RequiredOTS NeverOTS MandatoryOTS SupportsOTS

23 www.objectweb.org (JOTM) - D23 - 07/10/2002 Technical Challenges n°2 : Transaction Demarcation Abstraction EJB Platform OTS JTS JOTM OTDF Technical code extraction CCM Platform Not SupportedJTSRequires NewJTSRequiredJTSNeverJTSMandatoryJTSSupportsJTSNot SupportedOTSRequires NewOTSRequiredOTSNeverOTSMandatoryOTSSupportsOTS

24 www.objectweb.org (JOTM) - D24 - 07/10/2002 Technical Challenges n°2 : Transaction Demarcation Abstraction EJB Platform OTS JTS JOTM OTDF Technical code extraction CCM Platform Not SupportedJTSRequires NewJTSRequiredJTSNeverJTSMandatoryJTSSupportsJTSNot SupportedOTSRequires NewOTSRequiredOTSNeverOTSMandatoryOTSSupportsOTS Requires New Required Mandatory Not Supported Never Supports

25 www.objectweb.org (JOTM) - D25 - 07/10/2002 Technical Challenges n°2 : Transaction Demarcation Abstraction EJB Platform OTS JTS JOTM OTDF Technical code extraction CCM Platform JTS Not Supported OTS Requires New OTS Required OTS Never OTS Mandatory OTS Supports OTS

26 www.objectweb.org (JOTM) - D26 - 07/10/2002 Technical Challenges n°2 : Transaction Demarcation Abstraction EJB Platform OTS JTS JOTM OTDF Only demarcation code CCM Platform JTS Not Supported Requires New Required Never Mandatory Supports OTS Same demarcation type ?

27 www.objectweb.org (JOTM) - D27 - 07/10/2002 Technical Challenges n°3 : Adding new TD policies EJB Platform OTS JTS JOTM OTDF CCM Platform JTS Requires New OTS Requires New JOTM Using actual demarcation type

28 www.objectweb.org (JOTM) - D28 - 07/10/2002 Technical Challenges n°3 : Adding new TD policies EJB Platform OTS JTS JOTM OTDF CCM Platform JTS Requires New OTS Requires New JOTM Using actual demarcation type No dependance

29 www.objectweb.org (JOTM) - D29 - 07/10/2002 Technical Challenges n°3 : Adding new TD policies EJB Platform OTS JTS JOTM OTDF Defining new demarcation type CCM Platform JTS Requires New Supports OTS Requires New Sub

30 www.objectweb.org (JOTM) - D30 - 07/10/2002 Technical Challenges n°3 : Adding new TD policies EJB Platform OTS JTS JOTM OTDF Defining new demarcation type CCM Platform JTS Requires New Supports OTS Requires New Sub No dependance

31 www.objectweb.org (JOTM) - D31 - 07/10/2002 OTDF Not Supported Technical Challenges n°3 : Adding new TD policies EJB Platform OTS JTS JOTM Composing existing policies CCM Platform JTS Required Supports Mandatory OTS Coordinator RequiredNot Supported Never

32 www.objectweb.org (JOTM) - D32 - 07/10/2002 OTDF Not Supported Technical Challenges n°3 : Adding new TD policies EJB Platform OTS JTS JOTM Composing existing policies CCM Platform JTS Required Supports Mandatory OTS Coordinator RequiredNot Supported Never

33 www.objectweb.org (JOTM) - D33 - 07/10/2002 OTDF Technical Challenges n°4 : Independence between TD and TM EJB Platform OTS JTS JOTM Only demarcation code CCM Platform JTS Not SupportedRequires NewRequiredNeverMandatorySupports OTS JOTM ?

34 www.objectweb.org (JOTM) - D34 - 07/10/2002 OTDF Technical Challenges n°4 : Independence between TD and TM EJB Platform OTS JTS JOTM Abstraction CCM Platform Not SupportedRequires NewRequiredNeverMandatorySupports TM OTS TM JTS JOTM Independence

35 www.objectweb.org (JOTM) - D35 - 07/10/2002 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); } TM OTS > UserTransaction > TransactionManager

36 www.objectweb.org (JOTM) - D36 - 07/10/2002 OTDF Technical Challenges n°4 : Independence between TD and TM CCM Platform OTS JTS JOTM Instance EJB Platform Not SupportedRequires NewRequiredNeverMandatorySupports TM OTS TM JTS JOTM Not SupportedRequires NewRequiredNeverMandatorySupports

37 www.objectweb.org (JOTM) - D37 - 07/10/2002 OTDF New Technical Challenge : Organisation of the TD OTS JTS JOTM How to structure the policies ? Not SupportedRequires NewRequiredNeverMandatorySupports TM OTS TM JTS JOTM Organization ?

38 www.objectweb.org (JOTM) - D38 - 07/10/2002 Interruption Activation Interrogation New Technical Challenge : Organization of the TD Not SupportedRequiredNeverMandatorySupportsRequires New è No hierarchy/organization in the policies ! è Observing policies to define a structure è Mapping between policies and the structure

39 www.objectweb.org (JOTM) - D39 - 07/10/2002 Domain OTDF New Technical Challenge : Organization of the TD OTS JTS JOTM ? TM OTS TM JTS JOTM Supports Mandatory Never Required Not Supported Requires New Interrogation Activation Interruption Activation

40 www.objectweb.org (JOTM) - D40 - 07/10/2002 New Technical Challenge : Organization of the TD 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) ; } > DomainInterrogation > DomainProtocol > DomainActivation > DomainInterruption

41 www.objectweb.org (JOTM) - D41 - 07/10/2002 Domains TM TD Domain OTDF New Technical Challenges : Organization of the TD OTS JTS JOTM TM OTS TM JTS JOTM Interrogation Interruption Activation Supports Mandatory Never Required Not Supported Requires New

42 www.objectweb.org (JOTM) - D42 - 07/10/2002 New Technical Challenges : Organization of the TD 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); } > ActivationPolicyImpl ActivationPolicy > RequiredPolicy RequiredPolicyImpl

43 www.objectweb.org (JOTM) - D43 - 07/10/2002 The ODTF Framework OTDF TM OTS TM JTS JOTM Domain Not SupportedRequiredNeverMandatorySupportsNot SupportedRequiredNeverMandatoryRequiredNeverMandatory Requires New Not Supported Interrogation Activation Interruption Domain Interrogation Activation Interruption Domain Interrogation Activation Interruption Multi-plateform Multi-Transaction Manager Extensions Organisation AdaptabilityConfiguration

44 www.objectweb.org (JOTM) - D44 - 07/10/2002 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

45 www.objectweb.org (JOTM) - D45 - 07/10/2002 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

46 www.objectweb.org (JOTM) - D46 - 07/10/2002 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

47 www.objectweb.org (JOTM) - D47 - 07/10/2002 The JOnAS’s JODTF Framework JTS Not SupportedRequiredNeverMandatory Requires New JOnAS (EJB) Platform JTS Supports Interrogation Activation Interruption JOTDF

48 www.objectweb.org (JOTM) - D48 - 07/10/2002 Time Evaluation PoliciesJOnASJOnAS & JODTFVariation None --- Supports 7.681 sec5.871 sec76.43 % Required 8.552 sec7.598 sec88.84 % Not Supported 4.698 sec4.814 sec102.46 % Requires New 7.417 sec7.659 sec103.27 % Mandatory 5.125 sec5.357 sec104.53 % Never 0.94 sec1.001 sec106.50 % Average 97.005 %

49 www.objectweb.org (JOTM) - D49 - 07/10/2002 Time Evaluation Black Box PoliciesJOnASJOnAS & JODTFVariation None --- Supports 36.475 sec37.560 sec102.97 % Required 53.047 sec53.190 sec100.27 % Not Supported 27.994 sec28.563 sec102.03 % Requires New 56.590 sec57.563 sec101.02 % Mandatory 127.221 sec127.514 sec100.2 % Never 109.610 sec110.438 sec100.8 % Average 101.26 %

50 www.objectweb.org (JOTM) - D50 - 07/10/2002 Theoric Evaluation White Box Policies (Test or Invocation) JOnAS (Pre) + (Post) JOnAS & JODTF (Pre) + (Post) None -- Supports 5 + 31 + 1 Required 5 + 52 + 2 Not Supported 5 + 32 + 2 Requires New 5 + 42 + 2 Mandatory 3 + 02 + 0 Never 2 + 0 Average 4.16 + 2.51.83 + 1.16

51 www.objectweb.org (JOTM) - D51 - 07/10/2002 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

52 www.objectweb.org (JOTM) - D52 - 07/10/2002 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?

53 www.objectweb.org (JOTM) - D53 - 07/10/2002 Questions


Download ppt "Www.objectweb.org Abstraction of Transaction Demarcation in Component-Oriented Middleware Romain Rouvoy - Philippe Merle Jacquard INRIA Project LIFL –"

Similar presentations


Ads by Google