Transactional Workflow Chapter 9. © Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, 1999 2 What Is the Problem.

Slides:



Advertisements
Similar presentations
Consensus on Transaction Commit
Advertisements

Universität Karlsruhe (TH) © 2006 Univ,Karlsruhe, IPD, Prof. Lockemann/Prof. BöhmTAV 1 Chapter 1 Transactions and transactional properties.
© 2005 by Prentice Hall Appendix 3 Object-Oriented Analysis and Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George.
Requirements Engineering Process
Distributed Systems Architectures
Requirements Engineering Process
Chapter 1 The Study of Body Function Image PowerPoint
Document #07-12G 1 RXQ Customer Enrollment Using a Registration Agent Process Flow Diagram (Switch) Customer Supplier Customer authorizes Enrollment.
Document #07-12G 1 RXQ Customer Enrollment Using a Registration Agent Process Flow Diagram (Switch) Customer Supplier Customer authorizes Enrollment.
Relational Database and Data Modeling
1 Hyades Command Routing Message flow and data translation.
© 2010 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Chapter 11: Structure and Union Types Problem Solving & Program Design.
Universität Innsbruck Leopold Franzens Copyright 2006 DERI Innsbruck LarCK Workshop, ISWC/ASWC Busan, Korea 16-Feb-14 Towards Scalable.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Data recovery 1. 2 Recovery - introduction recovery restoring a system, after an error or failure, to a state that was previously known as correct have.
1 Term 2, 2004, Lecture 6, TransactionsMarian Ursu, Department of Computing, Goldsmiths College Transactions 3.
Week 2 The Object-Oriented Approach to Requirements
Configuration management
Software change management
OOAD – Dr. A. Alghamdi Mastering Object-Oriented Analysis and Design with UML Module 3: Requirements Overview Module 3 - Requirements Overview.
Testing Workflow Purpose
© 2011 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary. Towards a Model-Based Characterization of Data and Services Integration Paul.
Service Level Agreement
Data Structures Using C++
ABC Technology Project
Legacy Systems Older software systems that remain vital to an organisation.
1 Undirected Breadth First Search F A BCG DE H 2 F A BCG DE H Queue: A get Undiscovered Fringe Finished Active 0 distance from A visit(A)
Distributed DBMS© M. T. Özsu & P. Valduriez Ch.10/1 Outline Introduction Background Distributed Database Design Database Integration Semantic Data Control.
VOORBLAD.
1 Breadth First Search s s Undiscovered Discovered Finished Queue: s Top of queue 2 1 Shortest path from s.
BIOLOGY AUGUST 2013 OPENING ASSIGNMENTS. AUGUST 7, 2013  Question goes here!
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Lecture plan Transaction processing Concurrency control
© 2012 National Heart Foundation of Australia. Slide 2.
Lecture plan Outline of DB design process Entity-relationship model
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Software processes 2.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
Executional Architecture
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 14: Simulations 1.
Chapter 5 Test Review Sections 5-1 through 5-4.
Functional Dependencies and Normalization for Relational Databases
Towards Corrective Assurance in Adaptive Service-Based Applications Raman Kazhamiakin 1, Andreas Metzger 2, Marco Pistore 1 FBK-Irst, Trento, Italy SSE,
25 seconds left…...
Januar MDMDFSSMDMDFSSS
Chapter 10: The Traditional Approach to Design
Systems Analysis and Design in a Changing World, Fifth Edition
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Database Administration
PSSA Preparation.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 13 Slide 1 Application architectures.
Chapter 16: Recovery System
Chapter 24 Replication and Mobile Databases Transparencies © Pearson Education Limited 1995, 2005.
Modeling Main issues: What do we want to build How do we write this down.
From Model-based to Model-driven Design of User Interfaces.
© Copyright 2011 John Wiley & Sons, Inc.
1 Programming Languages (CS 550) Mini Language Interpreter Jeremy R. Johnson.
TRANSACTION PROCESSING SYSTEM ROHIT KHOKHER. TRANSACTION RECOVERY TRANSACTION RECOVERY TRANSACTION STATES SERIALIZABILITY CONFLICT SERIALIZABILITY VIEW.
Transaction Processing IS698 Min Song. 2 What is a Transaction?  When an event in the real world changes the state of the enterprise, a transaction is.
Transactional Web Services, WS-Transaction and WS-Coordination Based on “WS Transaction Specs,” by Laleci, Introducing WS-Transaction Part 1 & 2, by Little.
Transaction Services in Component Frameworks Bruce Kessler Comp250CBS March 2, 2004.
Transaction Management and Concurrency Control
Outline Introduction Background Distributed DBMS Architecture
Presentation transcript:

Transactional Workflow Chapter 9

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, What Is the Problem ? A workflow management system is an active system that manages the flow of business processes performed by multiple persons in multiple steps. It gets the right data to the right people with the right tools at the right time. (This definition omits a umber of aspects: roles, events, errors, cooperation,...)

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, In More Technical Terms: What Is Workflow ? n WF is a long-lived execution involving a potentially large number of autonomous agents such as programs, databases, sensors, actors, humans. n Control flow and data flow are (partially) pre-defined and may evolve over time. n There are numerous interdependent consistency criteria. n A WF must be kept alive by the system under all circumstances.

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, Source Step case fork loop compensation step Components of a Workflow

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, Steps... n execute application logic of any kind, n can interact with human operators, n access shared data in databases, n depend on events and can create their own events, n have a short duration and (should) behave like classical transactions, n are invoked depending on the execution history.

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, The Script... n specifies the control flow and the workflow, n defines the event and data conditions under which a step is to be executed, n defines the synchronization criteria for accessing shared data, n maintains the local execution context of a workflow instance, n handles resource conflicts, in particular on shared data, n represents a persistent execution.

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, What Is Transactional Workflow ? There are different interpretations: n Extended transaction models adapted to the needs of workflow: Sagas, Flex transactions, etc. n Application of some transactional properties such as isolation and durability to workflows. n Using classical distributed transactions to implement the control flow machinery of a workflow system.

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, What Happens to the Transactional Properties ? A:Atomicity does not apply to an entire workflow C:Consistency must be redefined including the temporal dimension. I: Isolation must be limited in time; cooperation must be allowed. D:Rather than the effects of transaction, the execution itself must be durable.

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, Correctness n Transactional correctness guarantees a consistent overall state if each individual step is executed correctly (or not at all) and there was a consistent initial state. n In long-lived executions, this definition cannnot be used, because n strict isolation is not feasible and n rollback is not option at the workflow level.

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, Rollback vs. Compensation n Rollback is based on the assumption that an erroneous state can be reverted to the previous (correct) state without affecting anybody => Isolation. n Compensation tries to modify an erroneous state such that all the consistency constraints work as though the faulty operation was never executed => Formal definition of consistency.

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, Correctness For Long-Lived Activities n Transactions can be executed iff the possibility of rollback is maintained. n A step in a workflow can be executed iff n the individual step can be rolled back and n its commitment does not block any of the previously executed steps from being compensated if needed.

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, What Are Invariants For? n Compensation must be guaranteed for completed steps => n certain predicates on the shared and local state must be maintained. n The requirements for a state to be executable are formalized as combined event / state predicates called invariants. n Invariants are alos useful to describe correctness criteria for forward execution.

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, Types of Invariants n Entry invariants guard the execution of a step. n If an entry invariant is violated, there are different options: n give up (compensate), n negotiate, n resolve conflict. n Exit invariants formalize the new consistent state. Its protection can be n strict (must), n moderate (want), n lose (hope).

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, Invariants: Virtual Objects n Invariants may contain expressions like: n obj_1 + obj_2 rel_op value. n The objects are not necessarily managed by the same RM. n To support such invariants, they are established as virtual objects, which: n have a special name, n have a value method, n are stored at each participating RM, n are evaluated locally whenever possible.

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, Dynamic Aspects of Invariants p1 pa2 pa3pa4 pb2 pb3pb4 Individual invariants established by each step

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, p1 p1&pa2 p1&pa2&pa3p1&pa2&pa3&pa4 p1&pb2 p1&pb2&pb3p1&pb2&pb3&pb4 Accumulated invariants for a case of control flow Dynamic Aspects of Invariants

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, Dynamic Aspects of Invariants n Invariants can be deleted if the step with the corresponding entry invariant will never be executed. This implies: n All invariants become obsolete at the end of a workflow. n Dead code must be detected dynamically. n We need special loop invariants. n If a step´s compensation step is dynamically modified, this may cause problems.

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, Supporting Invariants n In order to support invariants, database systems must give up some their autonomy. In particular, they have to: n provide notification about lock conflicts, n implement recoverable locks, n implement semantic locks (e.g. escrow), n implement existence locks at the tuple and at the schema level.

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, Using Transactions in a Workflow- System Application-level transactions for grouping multiple steps Transaction 1 Transaction 2

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, BC System-level transactions for transferring control from one step to the next Using Transactions in a Workflow-System

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, BC System-level transactions for transferring control from one step to the next Using Transactions in a Workflow-System

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, C System-level transactions for transferring control from one step to the next B CM transfer control receive request notify CM notify CM System transaction A Using Transactions in a Workflow-System

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, B C Input queue commit local processing post Version 1: Synchronous transfer Workflow and Transactional Queues

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, B C Input queue commit local processing Version 2: Asynchronous transfer output queue Commit- Post-Transaction Transfer Transaction Workflow and Transactional Queues

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, C Input queue Output queue Local code 1. dequeue 2. local execution 3. post Complete local transaction incl. transfer of control Queue-Driven Step Processing

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, C Normal processing dequeue local processing Transaction abort local rollback post Queues And Rollback

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, Problems Related to Rollback n Why did the local transaction fail (system abort or application-initiated rollback?) n In which cases should the TA be re-posted (and how often)? n Who gets notified about an abort (source or CM)? n Who gets notified about the eventual failure to restart a transaction? n Should application-level TAs be treated as distributed or nested transactions at the system level? n Which programming level should handle these issues (step or script)?

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, Summing It Up - 1 n Transactional concepts can be carried over to workflow management in multiple ways and at differet levels. n The most obvious application of transaction technology is at the level of the workflow engine, where transactions provide persistent execution of a script, local recovery in case of partial failures, reliable state transitions, recoverable events, and consistent context.

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, Summing It Up - 2 n Transactions at the system level need a number of extensions: nesting, chaining, leave-resume, transfer. n Participating resource managers need to be able to support an open distributed two-phase- commit protocol. n Persistent storage managers need a number of functional extensions such as recoverable locks.

© Jim Gray, Andreas Reuter Transaction Processing - Concepts and Techniques WICS August 2 - 6, Summing It Up - 3 n At the step level, transactions provide atomicity for short-term related computations. n The TM must be able to support dependen-cies among transcations. n At the script level, the concepts of atomicity and consistency have to be translated into more abstract notions (compensation, invariants).