CORBA Object Transaction Service

Similar documents
5. Distributed Transactions. Distributed Systems Prof. Dr. Alexander Schill

Middleware and Distributed Systems. Transactions. Martin v. Löwis

Using XA with Rdb (DECdtm XA Gateway)

Software Architectural Modeling of the CORBA Object Transaction Service

Outline. Chapter 5 Application Server Middleware WS 2010/11 1. Types of application server middleware

Outline. Chapter 5 Application Server Middleware. Types of application server middleware. TP monitors CORBA Server-side components and EJB Summary

Chapter 4 Remote Procedure Calls and Distributed Transactions

Communication and Distributed Processing

Chapter 2 Distributed Information Systems Architecture

OrbixOTS Programmer s and Administrator s Guide

Lecture 3: Synchronous Interaction Patterns Traditional Middleware

TRANSACTION PROCESSING MONITOR OVERVIEW OF TPM FOR DISTRIBUTED TRANSACTION PROCESSING

Communication and Distributed Processing

Outline. Chapter 5 Application Server Middleware. Types of application server middleware. TP monitors CORBA Server-side components and EJB Summary

VisiBroker VisiTransact Guide

Distributed Systems Engineering. Related content. Recent citations. To cite this article: J Liang et al 1997 Distrib. Syst. Engng.

What are Transactions? Transaction Management: Introduction (Chap. 16) Major Example: the web app. Concurrent Execution. Web app in execution (CS636)

Part 6: Distributed Objects and EJB. 2003, Karl Aberer, EPFL-SSC, Laboratoire de systèmes d'informations rèpartis Part 5-1

Transaction Management: Introduction (Chap. 16)

OBJECT-RELATIONAL COMPONENT APPROACHES: A COMPARISON

Distributed Database Management Systems. Data and computation are distributed over different machines Different levels of complexity

Outline. Chapter 4 Remote Procedure Calls and Distributed Transactions. Remote Procedure Call. Distributed Transaction Processing.

Overview. Distributed Systems. Distributed Software Architecture Using Middleware. Components of a system are not always held on the same host

Middleware Mediated Transactions & Conditional Messaging

Appendix A - Glossary(of OO software term s)

Chapter 1: Distributed Information Systems

1.264 Lecture 16. Legacy Middleware

management systems Elena Baralis, Silvia Chiusano Politecnico di Torino Pag. 1 Distributed architectures Distributed Database Management Systems

Orbix CORBA OTS Guide: C++

Artix ESB. Transactions Guide, Java. Version 5.5, December 2008

Today: Distributed Middleware. Middleware

DISTRIBUTED TRANSACTION PROCESSING STANDARDS AND THEIR APPLICATIONS

Conception of Information Systems Part 5: Transaction Monitors

Agent and Object Technology Lab Dipartimento di Ingegneria dell Informazione Università degli Studi di Parma. Distributed and Agent Systems

Distributed KIDS Labs 1

CHAPTER 2. Introduction to Middleware Technologies

Chapter Outline. Chapter 2 Distributed Information Systems Architecture. Distributed transactions (quick refresh) Layers of an information system

Fault tolerance with transactions: past, present and future. Dr Mark Little Technical Development Manager, Red Hat

Gustavo Alonso, ETH Zürich. Web services: Concepts, Architectures and Applications - Chapter 1 2

Advances in Data Management Distributed and Heterogeneous Databases - 2

Middleware: Challenges and Evolution from Procedural to Service Orientation

Distributed Object-Based Systems The WWW Architecture Web Services Handout 11 Part(a) EECS 591 Farnam Jahanian University of Michigan.

MTAT Enterprise System Integration. Lecture 11: Integrity Aspects in Enterprise System Integration

Today: Distributed Objects. Distributed Objects

JOTM: Overview and Perspectives

[MS-TPSOD]: Transaction Processing Services Protocols Overview. Intellectual Property Rights Notice for Open Specifications Documentation

System types. Distributed systems

CORBA (Common Object Request Broker Architecture)

Borland AppServer. Borland

CORBA OTS Guide Java. Version 6.1, December 2003

Verteilte Systeme (Distributed Systems)

10. Business Process Management

USING OPEN TRANSACTION INTEGRATOR IN THE WINDOWS ENVIRONMENT. White Paper

Oracle Tuxedo. CORBA Technical Articles 11g Release 1 ( ) March 2010

Topics. Advanced Java Programming. Transaction Definition. Background. Transaction basics. Transaction properties

Transactions. ACID Properties of Transactions. Atomicity - all or nothing property - Fully performed or not at all

Chapter Outline. Chapter 2 Distributed Information Systems Architecture. Layers of an information system. Design strategies.

CSE 530A ACID. Washington University Fall 2013

DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN. Chapter 1. Introduction

DCOM CORBA EJB DCOM CORBA CORBA EJB DCOM EJB

Distributed Transaction Management

Chapter 16. Layering a computing infrastructure

Intro to Transactions

Interstage Application Server V7.0 OLTP Server User s Guide

Orbix CORBA OTS Guide: Java

Intro to Transaction Management

QuickSpecs. Compaq NonStop Transaction Server for Java Solution. Models. Introduction. Creating a state-of-the-art transactional Java environment

What is CORBA? CORBA (Common Object Request Broker Architecture) is a distributed object-oriented client/server platform.

Enterprise JavaBeans Technology

Conception of Information Systems Lecture 6: Transaction Monitors

Distributed Object-based Systems CORBA

Chapter 3. Database Architecture and the Web

Client/Server-Architecture

Bipul Sinha, Amit Ganesh, Lilian Hobbs, Oracle Corp. Dingbo Zhou, Basavaraj Hubli, Manohar Malayanur, Fannie Mae

Lessons Learned from Implementing WS-Coordination and WS-AtomicTransaction

Data Modeling and Databases Ch 14: Data Replication. Gustavo Alonso, Ce Zhang Systems Group Department of Computer Science ETH Zürich

3C03 Concurrency: Distributed Transactions

Introduction to Distributed Systems (DS)

Outline. Definition of a Distributed System Goals of a Distributed System Types of Distributed Systems

DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN. Chapter 1. Introduction

Introduction. Example Databases

Mobile and Heterogeneous databases Distributed Database System Transaction Management. A.R. Hurson Computer Science Missouri Science & Technology

Scott Meder Senior Regional Sales Manager

Distributed Computing

CSE 344 MARCH 21 ST TRANSACTIONS

Notes. Submit homework on Blackboard The first homework deadline is the end of Sunday, Feb 11 th. Final slides have 'Spring 2018' in chapter title

Recoverability. Kathleen Durant PhD CS3200

Software Paradigms (Lesson 10) Selected Topics in Software Architecture

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons)

Database Systems CSE 414

Transaction Management: Concurrency Control, part 2

Locking for B+ Trees. Transaction Management: Concurrency Control, part 2. Locking for B+ Trees (contd.) Locking vs. Latching

Introduction to Transaction Management

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI

Distributed Systems Principles and Paradigms. Chapter 01: Introduction

Database Replication in Tashkent. CSEP 545 Transaction Processing Sameh Elnikety

Database Systems CSE 414

Database Systems CSE 414

Web Services - Concepts, Architecture and Applications Part 3: Asynchronous middleware

Distributed Systems Principles and Paradigms. Chapter 01: Introduction. Contents. Distributed System: Definition.

Transcription:

CORBA Object Transaction Service Telcordia Contact: Paolo Missier paolo@research.telcordia.com +1 (973) 829 4644 March 29th, 1999 An SAIC Company Telcordia Technologies Proprietary Internal Use Only This document contains proprietary information that shall be distributed, routed or made available only within Telcordia Technologies, except with written permission of Telcordia Technologies. Transactional Support for Distributed Objects Goals of Distributed Transaction Processing in CORBA: Ensure data integrity across multiple heterogeneous sources Compatibility with existing CORBA services No extensions to the CORBA core (IDL, ORB) Interoperability with existing TP Monitors (CICS, Tuxedo, etc.) CORBA OTS 2 1

Basic ACID Transactional Model: quick review Atomicity Either all or none of the transaction s operations are performed If a transaction is interrupted by a failure, its partial results must be undone Consistency Consistent database state: integrity constraints are not violated Upon conclusion, transactions leave the database in a consistent state Consistency degrees are defined to specify the acceptable behavior of concurrent transactions Isolation Serializability: the effect of concurrent transaction execution must be the same as that of some serial order An incomplete transaction cannot reveal its partial results Durability CORBA OTS 3 The need for (Distributed) Transactions: Canonical example: transactional credit-debit application Other uses of DTP: keeping replicas synchronized alternative: use replica managers may use Corba to handle cached data with write-through propagation to the storage CORBA OTS 4 2

Resource Managers RMs provide ACID operations on a set of data any subsystem that implements transactional data can be a RM [Gray] Examples: DBMS, transactional file systems, transactional queue managers CORBA OTS 5 Transactional Applications Transaction execution spans several app servers and Resource Managers Application Servers Application Servers Application Resource Managers Resource Managers Transaction Manager CORBA OTS 6 3

The Transaction Manager Monitors the transaction progress Connects clients to servers Coordinates commit and rollback operations Manages failures (system recovery) CORBA OTS 7 The X/Open DTP Model Portable Interfaces: XA and TX TX defines the 2-Phase Commit Protocol Application TX Begin Commit Abort Requests Join Transaction Manager Resource Managers Prepare Commit Abort XA CORBA OTS 8 4

The 2-Phase Commit Protocol Prepare: Invoke each RMs involved in the transaction, asking for a vote Decide: if all RMs vote Yes: write the commit record in the transaction log Commit: send the commit decision to each RM Complete: When all the RMs acknowledge the commit message, write the endof-transaction record in the log, and deallocate the transaction. if at least one RM votes No: Abort: send the abort decision to each RM Complete: When all the RMs acknowledge the abort message, write the end-oftransaction record in the log, and deallocate the transaction. CORBA OTS 9 X/Open s DTP Reference Model for DTP - summary XA and TX: Protocols for Distributed Transactions Main entities involved in TP: The application (AP) The Resource Manager (RM) The Transaction Manager (TM) Procedural interfaces: XA between TM and RM TX between AP and TM Limitations: Interfaces are defined at the programming language level (C, COBOL) The model does not indicate how invocations are propagated across process/address spaces CORBA OTS 10 5

Transaction Processing Monitors Built as a Transactional layer on top of the Basic OS (TPOS) TRPC Enforce transactional properties of client/server interactions Provide load balancing, execution monitoring and control Intrusive (performance overhead) CORBA OTS 11 Known Limitations of TP Monitors Its presence is not transparent to applications and servers Not amenable to distributed object-oriented computing General lack of Java support Tuxedo provides a Java-based gateway (JOLT) Expensive, requires substantial management CORBA OTS 12 6

CORBA OTS = DTP + Distributed object computing CORBA OTS 13 Relation with the X/Open Ref. Model Two main improvements: The procedural XA and TX interfaces are replaced with a set of CORBA IDL interfaces Resource [10.3.7], Current [10.3.1] All inter-component communication (i.e., TM, RMs, AP) occur via CORBA calls on instances of implementations for these interfaces OTS is fully compatible with X/open-compliant software ttransactions can be imported from and exported to [10.4.11] XAcompliant RMs and TX-compliant TMs OTS defines [optional] support for Nested Transactions CORBA OTS 14 7

OTS Functional Goals Co-existence with legacy transactional environments Support for nested transactions (optional) Model Interoperability: interoperability with the X/Open DTP model Object access to existing Resource Managers Network interoperability: multiple TSs and/or multiple ORBs Support for TP Monitors clients, servers, and TSs may run in separate processes TS must be usable in a TP Monitor Environment CORBA OTS 15 OTS Design Goals Low implementation cost: Minimal impact on the existing ORB Reuse of existing Transaction Managers Low maintenance, simpler than typical TPM Portability Applications (across OTS implementations) OTS implementations (across ORBs) No impact on IDL for existing interfaces Implementation of the same IDL can be transactional or non-transactional CORBA OTS 16 8

OTS Performance Goals Achieve performance benchmarks similar to X/Open DTP for: number of network messages number of disk accesses amount of data logged Note that X/Open is procedural, not OO. Actual benchmarking of Inprise s ITS in progress in our group ITS performance for Oracle-based transactions against native Oracle distributed transaction facility CORBA OTS 17 Approaches to OTS implementation: Inprise s ITS Fully integrated with the ORB No need for a separate TS on each node Scalable together with the underlying ORB Entirely Java-based RMs can be Corba servers CORBA OTS 18 9

Approaches to OTS implementation: IONA s OTM The ORBs interfaces with a back-end TP Monitor TS provides interface to specific TPM => users locked into choice of TPM TS cannot be discovered dynamically => TPM required at each node Calls to TPM are not IIOP High maintenance CORBA OTS 19 Approaches to OTS implementation: BEA s M3 Existing TP Monitor (Tuxedo) + ORB The TP Framework provides: Object state management (activation, deactivation) and lifecycle Transaction management: interface with M3 transaction manager System events notification to clients Clear distinction among: Development: framework-based Deployment OTS, Security, LifeCycle Fault Management, Routing, Load Balancing Operations: management tools Advantage: tight integration with TPM. Useful framework Disadvantage: tight integration with TPM. Rigid framework CORBA OTS 20 10

OTS elements: Transaction Context Goal: to provide trasnaction synchronization across the elements of a distributed c/s application Originator: the client app that requests transaction initiation to the OTS Transaction Context (Scope): Created and managed by the OTS when originator requests transaction initiation; Shared by participants; Associated to the originator s thread; Propagated to objects that participate in the transaction (transactional objects) Propagation can be implicit (done by the OTS), or explicit (as a parameter in CORBA calls) CORBA OTS 21 OTS Elements: Transactional Objects An object whose behavior is affected by being invoked within the scope of a transaction Contains (a reference to) persistent data that is manipulated by the transaction Scope of the transaction context: a tr.obj. can decide which methods are within the context. Some methods may remain non-transactional The same interface can have both transactional and nontransactional implementations Transactional objects are used to implement two kind of application servers: Transactional Server Recoverable Server CORBA OTS 22 11

Recoverable and Resource Objects Recoverable objects are Transactional objects that participate in the recovery protocol (after a failure) Resources are server objects that implement the Resource interface (X/Open TX interface): prepare() rollback() commit() commit_one_phase() CORBA OTS 23 Basic scenario for OTS use 2a Originator Op 1 () Op 2 () 2b To 1 Begin() 1 Commit() 5 SQL 1 4a Register() Register() 4b SQL 2 3a 3b Res 1 Res 2 6a 6b Prepare() OTS Prepare() Commit() Commit() To 2 CORBA OTS 24 12

Interaction Diagram for Basic Scenario originator OTS To1 Res1 To2 Res2 1: begin() 2: op1() 3: register_resource() 6: return 4: SQL1 5: return 7: op2() 8: register_resource() 9: SQL2 11: return 10: return CORBA OTS 25 Interaction Diagram for Basic Scenario - 2PC originator OTS To1 Res1 To2 Res2 12: commit() 13: prepare() 14: yes 15: prepare() 16: yes 17: commit() 18: commit() 19: ack 20: ack CORBA OTS 26 13

Transaction Creation: Current interface Used to begin, end and query the status of a transaction Current defines operations for the management of associations between threads and transactions one transaction can be associated to more than one thread Simple to use. Typical idiom: org.omg.corba.orb orb = org.omg.corba.orb.init(); org.omg.corba.object initref = orb.resolve_initial_references("transactioncurrent"); current = CurrentHelper.narrow(initRef); current.begin(); CORBA OTS 27 Transaction Creation: TransactionFactory Idiom: CosTransaction::Control c; org.omg.corba.orb orb = org.omg.corba.orb.init(); TransactionFactory Tfactory = TransactionFactoryHelper.bind(orb); c = TFactory->create(timeout); More restrictive than Current. The Control object may be restricted for use in other environments. Can be used to import transactions that originates outside of the TS CORBA OTS 28 14

Context Management: the Control interface One Control object is associated with each transaction Control is obtained by: Current::get_control() Current::suspend() TransactionFactory::create() It contains a Coordinator and a Terminator Coordinator can be used by a transactional object to: register resources: Coordinator::register_resource(in Resource r); force a transaction to rollback: Coordinator::rollback_only(); Terminator is used by the originator to: commit: Terminator::commit(); rollback: Terminator::rollback(); CORBA OTS 29 Transaction Propagation A call on a transactional object may or may not be transactional. In the example scenario: Op 1 (), Op 2 () are transactional calls How is the transaction context passed to To 1, To 2? Explicit propagation: thecontrol object is passed as a parameter in the call, e.g. void To1.Op1(in CosTransaction::Control c, ) Implicit propagation: transactional objects inherit from a marker interface in the IDL: To : CosTransaction::TransactionalObject CORBA OTS 30 15

Resource Registration Manual registration: Res1 implements the CosTransactions::Resource interface To1 registers Res1 using the Coordinator Typically, resource registration is the first action in a transactional call Note: in some implementations, the Coordinator object is not directly available (i.e. in M3). In those cases, this method cannot be used. Automatic registration: Resource has native support from OTS, or it supports the XA/TX interface Registration is static and occurs before any request to the resource. OTS can reach the resource s XA interface CORBA OTS 31 Notes on XA and native support Inprise provides integrated XA Resource Directors for some XAcompliant resources. However, it is restricted to specific DBMS (e.g. Oracle) and specific versions Orbix only provides filters for registering XA resources Native support depends on specific arrangements among ORB- DBMS/TP Monitor vendors Orbix natively supports the Encina TP monitor by Transarc Inprise supports generic connection to a TP Monitor M3 is designed around the Tuxedo TP Monitor CORBA OTS 32 16

Transaction Termination Only the originator should terminate the transaction. Indirect termination: Use Current::commit(in boolean report_heuristics) Current::rollback() heuristics = True: call blocks until all resources are done heuristics = False: call returns after prepare phase (faster for client) Direct termination: Use Terminator::commit(in boolean report_heuristics) Terminator ::rollback() CORBA OTS 33 OTS interfaces summary CORBA OTS 34 17

Scenario II: Resources as Corba services 2a Originator Op 1 () Op 2 () 2b To 1 3a Begin() 1 Commit() 4 3b To 2 Rm 1 Rm 2 SQL 1 Res 1 5a 4a Prepare() Commit() Register() OTS Register() 5b Prepare() Commit() SQL 2 Res 2 CORBA OTS 35 Multithreaded transaction execution In Scenario I and II, there is a potential for concurrent execution of parts (a) and (b) However, transaction Control is associated with one thread in the originator Solution: in the originator, split the client into two threads in each thread, the same Control object ctrl is visible in each thread, the resume() method is called on ctrl CORBA OTS 36 18

Multi-tier Application Deployment Scenario OrderManager Server Client App IIOP presentation B.O. middle tier IIOP Data Wrapper IIOP IIOP Data Wrapper SQL O T S Wrappers DBMS TX TX/XA TPM Data Layer CORBA OTS 37 Multi-tier Scenario: ORB-centric view Client App OTS ORB Data Wrapper OrderManager Server Data Wrapper DBMS TPM CORBA OTS 38 19

Multi-tier deployement detail Client App presentation IIOP Account Manager Order Manager (originator) Inventory Manager B.O. middle tier IIOP IIOP IIOP Inventory Storage Manager Oracle client SQL TX O T S TX Account Storage Manager Oracle client SQL Wrappers Inventory DB Account DB Data Layer CORBA OTS 39 20