Process in the World as a Transaction

Slides:



Advertisements
Similar presentations
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Transaction Management Overview Chapter 16.
Advertisements

Crash Recovery John Ortiz. Lecture 22Crash Recovery2 Review: The ACID properties  Atomicity: All actions in the transaction happen, or none happens 
IDA / ADIT Lecture 10: Database recovery Jose M. Peña
TRANSACTION PROCESSING SYSTEM ROHIT KHOKHER. TRANSACTION RECOVERY TRANSACTION RECOVERY TRANSACTION STATES SERIALIZABILITY CONFLICT SERIALIZABILITY VIEW.
Chapter 15: Transactions Transaction Concept Transaction Concept Concurrent Executions Concurrent Executions Serializability Serializability Testing for.
1 What are Bit Strings? The View from Process Nick Rossiter Northumbria University.
CMPT 401 Summer 2007 Dr. Alexandra Fedorova Lecture X: Transactions.
CMPT Dr. Alexandra Fedorova Lecture X: Transactions.
Persistent State Service 1 Distributed Object Transactions  Transaction principles  Concurrency control  The two-phase commit protocol  Services for.
1 Transaction Management Overview Yanlei Diao UMass Amherst March 15, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
1 ACID Properties of Transactions Chapter Transactions Many enterprises use databases to store information about their state –e.g., Balances of.
Quick Review of Apr 24 material Sorting (Sections 13.4) Sort-merge Algorithm for external sorting Join Operation implementations (sect. 13.5) –Size estimation.
Transaction. A transaction is an event which occurs on the database. Generally a transaction reads a value from the database or writes a value to the.
Transactions and Recovery
Academic Year 2014 Spring. MODULE CC3005NI: Advanced Database Systems “DATABASE RECOVERY” (PART – 1) Academic Year 2014 Spring.
INTRODUCTION TO TRANSACTION PROCESSING CHAPTER 21 (6/E) CHAPTER 17 (5/E)
Distributed Deadlocks and Transaction Recovery.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Transaction Management Overview Chapter 16.
Advanced Database Technologies Lecture 6: Transactions and Database Recovery.
Introduction. 
Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke1 Transaction Management Overview Chapter 18.
1 Transactions BUAD/American University Transactions.
Transaction Management: Concurrency Control CS634 Class 16, Apr 2, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 10 Transaction Management.
Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke1 Transaction Management Overview Lecture 21 Ramakrishnan - Chapter 18.
Chapter 15 Recovery. Topics in this Chapter Transactions Transaction Recovery System Recovery Media Recovery Two-Phase Commit SQL Facilities.
Database Systems/COMP4910/Spring05/Melikyan1 Transaction Management Overview Unit 2 Chapter 16.
Ch 10: Transaction Management and Concurrent Control.
Introduction to Database Systems1. 2 Basic Definitions Mini-world Some part of the real world about which data is stored in a database. Data Known facts.
Chapter 15 Recovery. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.15-2 Topics in this Chapter Transactions Transaction Recovery System.
CSCI Recovery Control Techniques 1 RECOVERY CONTROL TECHNIQUES Dr. Awad Khalil Computer Science Department AUC.
Chapter 15: Transactions Loc Hoang CS 157B. Definition n A transaction is a discrete unit of work that must be completely processed or not processed at.
Database Systems Recovery & Concurrency Lecture # 20 1 st April, 2011.
1 Typing in Information Systems Nick Rossiter, Michael Heather Computer Science and Digital Technologies Northumbria University, Newcastle NE1 8ST, UK.
Transactions. Transaction: Informal Definition A transaction is a piece of code that accesses a shared database such that each transaction accesses shared.
Transactions.
1 Advanced Database Concepts Transaction Management and Concurrency Control.
Free and Open Systems Theory Nick Rossiter Michael Heather University of Northumbria
Data The fact and figures that can be recorded in system and that have some special meaning assigned to it. Eg- Data of a customer like name, telephone.
10 1 Chapter 10 - A Transaction Management Database Systems: Design, Implementation, and Management, Rob and Coronel.
The Natural Metaphysics of Computing Anticipatory Systems Michael Heather Nick Rossiter University of Northumbria
MULTIUSER DATABASES : Concurrency and Transaction Management.
WOSC 2008 Wroclaw1 Problems of Interoperability in Information Systems Nick Rossiter and Michael Heather CEIS, Northumbria University, UK
Database Recovery Techniques
Transactions.
Recovery in Distributed Systems:
On-Line Transaction Processing
DCL – Data Control Language
Chapter 1: Introduction
CS216: Data-Intensive Computing Systems
Transaction Management Overview
Introduction to Database Systems
Sections 17– database transactions and controlling User Access
ACID PROPERTIES.
Moving Applications to the Cloud
CS122B: Projects in Databases and Web Applications Winter 2018
Transaction Management Overview
Lecture 20: Intro to Transactions & Logging II
Transaction management
Database Recovery 1 Purpose of Database Recovery
Transaction Management
CPSC-608 Database Systems
SE305 Database System Technology
Transaction Management Overview
The Process Semantics of Time and Space as Anticipation
CS122B: Projects in Databases and Web Applications Winter 2019
CS122B: Projects in Databases and Web Applications Spring 2018
Transaction Communication
Transactions, Properties of Transactions
Presentation transcript:

Process in the World as a Transaction Nick Rossiter, Michael Heather Northumbria University nick.rossiter@unn.ac.uk http://computing.unn.ac.uk/staff/cgnr1/

Classical (Database) Transactions Properties of ACID: Atomicity collection of operations viewed as single process Consistency rules of organisation obeyed Isolation no results released until end Durability results are guaranteed to persist

Closure is Difficult For instance in ATM withdrawal: mixture of physical and logical tasks once cash given to customer, cannot undo bank at risk unless results are immediately durable Notion of Transaction Log: save results to a number of different targets (disks) only complete when successfully write to last target disk

Recovery If bank information system crashes; transaction log can be run through from last known position (savepoint) to most recent successful transaction partial transactions are discarded So if disk crashes after customer paid £1,000,000 in a suitcase of notes system will re-run the transaction and customer will have account debited

But some risk remains Strategy A to favour bank: If ATM crashes before money paid out and after last transaction log entry made: customer’s account is debited but customer has no cash Strategy B to favour customer: If transaction log entry fails after cash paid to customer: customer has the cash and no debit to account

In practice A bank would probably not adopt strategy B as it could lose money Strategy A is workable if: ATM downtimes are accurately recorded Enables customer accounts to be corrected Corrections could be made semi-automatically with supervisory control Recourse to higher level

Problem of Physical/Logical Mix Example of the principle of Landauer Information cannot exist except in the physical form All transactions ultimately involve physical objects need to handle together physical entities logic of the information system

Parallel processing Transactions involve a sequence of operations But often the operations should be in parallel Sequence is used because of: von Neumann architecture locality of view sequence of operations between fixed cells

Theory of Transactions Need constructions to: represent changes between states as dynamic relationships indicate desired change in state indicate rules controlling change in state measure changes in state that occur

Satisfying Theory - Category Theory Need constructions to: represent changes between states as dynamic relationships adjunctions indicate desired change in state free functor (F) indicate rules controlling change in state underlying functor (G) measure changes in state that occur unit and counit of adjunction (, )  from left-adjoint perspective  from right-adjoint perspective

Adjunction Example: Mapping Universe to Information System

Initial State Blue = category/object; red = functor; green = natural transformation

One cycle -- to right (F) and left (G) -- no change

One cycle -- to right (GF) and left (FG) -- change by  in S and  in A Adjoint if triangles commute If  is or  is , then equivalence relation

Two cycles -- to right (GFGF) and left (FGFG) -- change by  in S and  in A Gives symmetry in treatment of S and A Dynamical relationship Perhaps one cycle enforces rules, second cycle commits

Abstract View of Effect of GF

Textbook representation of adjunction -- triangle only

Transactions are Non-local This banking transaction is typical of any transaction as a non-local process. The log provides a parallel information system: looking forward to the sequence looking back to check that what was expected was achieved.

Possible Approaches to Banking ATM Transaction Security Bank Customer Funds-check Grant Cash Simple commutative requirement Grant = Funds-check o Security Does not show state changes or rules

 -| f* -|  Adjointness between Customer and Bank Bank Customer Pin number  String match f* Customer Bank Access   -| f* -|  Better, shows relationships as adjunctions Does not show state changes

One cycle -- to right (FG) and left (GF) -- change by  in S (Customer) and  in A (Bank) F Funds request (free functor), G Status check (underlying functor applying rules) If  is or  is ,then no change to categories so back to initial state - transaction is aborted

Two cycles -- to right (GFGF) and left (FGFG) -- change by  in S and  in A Second cycle acts from banking perspective Introduces g in bank category Commits and releases cash Should be brief in execution for safety

Achievement of ACID A, I are natural, achieved through closure in adjointness C is natural, achieved through underlying functor in adjointness D is natural, represented by back and forward components log file is not represented directly but such a file is an artefact needed in a sequential system

Universe Transactions The universe carries out transactions all the time non-locally mediating between objects in time and space. nevertheless still has the forward and back components except that they are non-local.