T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 1 Towards a new approach to Document Collaboration.

Slides:



Advertisements
Similar presentations
XML: Extensible Markup Language
Advertisements

1 Lecture 11: Transactions: Concurrency. 2 Overview Transactions Concurrency Control Locking Transactions in SQL.
Transaction Management: Concurrency Control CS634 Class 17, Apr 7, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
Database System Principles 18.7 Tree Locking Protocol CS257 Section 1 Spring 2012 Dhruv Jalota ID: 115.
Concurrency Control II
Concurrency Control Amol Deshpande CMSC424. Approach, Assumptions etc.. Approach  Guarantee conflict-serializability by allowing certain types of concurrency.
Managing Hierarchies of Database Elements (18.6) 1 Presented by Sarat Dasika (114) February 16, 2012.
Concurrency Control II. General Overview Relational model - SQL  Formal & commercial query languages Functional Dependencies Normalization Physical Design.
Microsoft Excel 2003 Illustrated Complete Excel Files and Incorporating Web Information Sharing.
Managing Hierarchies of Database Elements (18.6) -Neha Saxena Class Id: 214.
Xyleme A Dynamic Warehouse for XML Data of the Web.
Granularity of Locks and Degrees of Consistency in a Shared Data Base John LaFontaine Haixuan Sun.
1 COS 425: Database and Information Management Systems XML and information exchange.
GRANULARITY OF LOCKS IN SHARED DATA BASE J.N. Gray, R.A. Lorie and G.R. Putzolu.
Representation of Web Data in a Web Warehouse Ragini A.S. & Shipra Dutta November 20 th, 2001.
XML –Query Languages, Extracting from Relational Databases ADVANCED DATABASES Khawaja Mohiuddin Assistant Professor Department of Computer Sciences Bahria.
XML Primer. 2 History: SGML vs. HTML vs. XML SGML (1960) XML(1996) HTML(1990) XHTML(2000)
18.7 The Tree Protocol Andy Yang. Outline Introduction Motivation Rules for Access to Tree-Structured Data Why the Tree Protocol Works.
Transaction Management and Concurrency Control
Exploring Microsoft® Office Grauer and Barber 1 Committed to Shaping the Next Generation of IT Experts. Robert Grauer and Maryann Barber Using.
Manohar – Why XML is Required Problem: We want to save the data and retrieve it further or to transfer over the network. This.
Overview of XPath Author: Dan McCreary Date: October, 2008 Version: 0.2 with TEI Examples M D.
HTML Comprehensive Concepts and Techniques Intro Project Introduction to HTML.
DHTML. What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more.
Lecture 6 of Advanced Databases XML Schema, Querying & Transformation Instructor: Mr.Ahmed Al Astal.
Querying Structured Text in an XML Database By Xuemei Luo.
ECA 228 Internet/Intranet Design I XSLT Example. ECA 228 Internet/Intranet Design I 2 CSS Limitations cannot modify content cannot insert additional text.
Department of Computer Science and Engineering, HKUST 1 More on Isolation.
P2Pedia A Distributed Wiki Network Management and Artificial Intelligence Laboratory Carleton University Presented by: Alexander Craig May 9 th, 2011.
R. Addie & S. Dekeyser XML for M&C / USQ ? What ? Why ? How ? When ?
I2RS draft-rfernando-yang-mods.txt I2RS Yang Extensions draft-rfernando-yang-data-mods R.Fernando, P.Chinnakannan, M.Madhayyan, A.Clemm.
1 Overview of XSL. 2 Outline We will use Roger Costello’s tutorial The purpose of this presentation is  To give a quick overview of XSL  To describe.
Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.
Transaction Management for XML Taro L. Saito Department of Information Science University of Tokyo
XML and Database.
CS 157B: Database Management Systems II February 11 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
1 SHAWEL Sharable and Interactive Web-Lexicon Greg Gulrajani - Max-Planck-Institute in collaboration with David Harrison & Peter Wittenburg Max Planck.
Transactions and Concurrency Control. Concurrent Accesses to an Object Multiple threads Atomic operations Thread communication Fairness.
XFormsDB An XForms - Based Framework for Simplifying Web Application Development Markku Laine Master’s Thesis Presentation March 9, 2010.
L.T.E :: Learning Through Experimenting Using google-svn for MtM Docs Development Denis Thibault Version 3.2 Mar 12 th, 2009.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
Computing & Information Sciences Kansas State University Friday, 20 Oct 2006CIS 560: Database System Concepts Lecture 24 of 42 Friday, 20 October 2006.
Write Conflicts in Optimistic Replication Problem: replicas may accept conflicting writes. How to detect/resolve the conflicts? client B client A replica.
Transaction Management Overview. Transactions Concurrent execution of user programs is essential for good DBMS performance. – Because disk accesses are.
Case Study on Redlining at the ISO Chandi Perera
Raluca Paiu1 Semantic Web Search By Raluca PAIU
Working with XML. Markup Languages Text-based languages based on SGML Text-based languages based on SGML SGML = Standard Generalized Markup Language SGML.
Evaluation Biztalk Table of Contents Introduction to XML. Anatomy of an XML document. What is an XML Schema? What is SOAP? XML Web Services overview.
Concurrency control in XML databases Ali Abbasi. Concurrency in XML Bases XML : standard format of data exchange on the internet XML docs is stored in.
Distributed DBMS, Query Processing and Optimization
Scheduling of Transactions on XML Documents Author: Stijin Dekeyser Jan Hidders Reviewed by Jason Chen, Glenn, Steven, Christian.
Ch 15 Data Sharing Myungchul Kim
XML Extensible Markup Language
Managing Hierarchies of Database Elements Section 18.6 CS257 Jack Price.
Introduction. Internet Worldwide collection of computers and computer networks that link people to businesses, governmental agencies, educational institutions,
Prepared by: Mudra Patel (113) Pradhyuman Raol(114) Locking Scheduler & Managing Hierarchies of Database Elements.
1 Concurrency Control. 2 Why Have Concurrent Processes? v Better transaction throughput, response time v Done via better utilization of resources: –While.
DHTML.
XML: Extensible Markup Language
Chapter 1 Introduction to HTML
Section 18.6: Managing Hierarchies of Database Elements
Concurrency Control Managing Hierarchies of Database Elements (18.6)
Extra slide #3.
XML in Web Technologies
Distributed Databases
Temple University – CIS Dept. CIS661 – Principles of Data Management
Transactions in Distributed Systems
Intro Project Introduction to HTML.
CONCURRENCY Concurrency is the tendency for different tasks to happen at the same time in a system ( mostly interacting with each other ) .   Parallel.
Prepared by: Mudra Patel (113) Pradhyuman Raol(114)
Presentation transcript:

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 1 Towards a new approach to Document Collaboration Stijn Dekeyser USQ, Australia Jan Hidders U. Antwerp, Belgium A Concurrency Control mechanism for XML databases

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 2 Contents Introduction: XMLIntroduction: XML Running ExampleRunning Example Classic CC methodsClassic CC methods Data ModelsData Models –User Data Model –Scheduler Data Model Path Lock SchemesPath Lock Schemes –Propagation (PL-PROP) –Satisfiability (PL-SAT) SchedulersSchedulers –Commit scheduler –Conflict scheduler Part II Part I Asynchronous collaborative workAsynchronous collaborative work –cvs, change tracking, cscw, ems Synchronous collaborative workSynchronous collaborative work A new approach: use cases and clientsA new approach: use cases and clients DiscussionDiscussion

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 3 Asynchronous collaborative work CVSCVS –Version repository + concurrency –Text, Line-based –Human intervention Change TrackingChange Tracking –MS Office, OOo et al –Human mgt + intervention Part I

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 4 Asynchronous collaborative work CSCW & EMSCSCW & EMS –Many different systems –Docs distributed wholly at all sites –Messages update docs –Human intervention needed

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 5 Synchronous collaborative work CSCW & EMSCSCW & EMS XML-enabled RDBMSXML-enabled RDBMS –Traditional table locking Native XML databasesNative XML databases –Document-based locking

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 6 A new approach: use cases Document AuthoringDocument Authoring –May move section while updating CMSCMS –XForms causes overwrite Design & artDesign & art –May update same parts! ProgrammingProgramming –Change function name globally

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 7 A new approach: servers –Implementation: Native or XML-enabled dbNative or XML-enabled db Use of Path Locks in transactionsUse of Path Locks in transactions Document collaboration protocol (dcp)Document collaboration protocol (dcp) –Type: Enhanced web server, e.g. in ApacheEnhanced web server, e.g. in Apache or P2P implementation, e.g. in Wordor P2P implementation, e.g. in Word –Extra features: Access Control (Elena Ferrari et al.)Access Control (Elena Ferrari et al.) –Elements contain user rights version management (Epic)version management (Epic) –Elements contain version information

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 8 A new approach: clients General purpose XML editorsGeneral purpose XML editors –E.g. Epic or XMLSpy Specific purpose XML editorsSpecific purpose XML editors –E.g. Autocad or Excel Issues:Issues: –Intelligently query section to be updated –Commit when possible –Refresh content

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 9 Discussion

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 10 Introduction: XML XML is evolution of document language technologyXML is evolution of document language technology –1969: GML (Generalized MarkUp L) –1974: SGML (Standard …), Goldfarb –1986: ISO standard –1989: HTML, Berners-Lee, Berglund, Cailliau at CERN XML much simpler than SGML (10% of spec)XML much simpler than SGML (10% of spec) Now: much more data stored as XMLNow: much more data stored as XML –Enter the XML-DBMS age… Part II

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 11 Running example (1/2) Peter Parklane 7 John Unistreet 1 swimming cycling David Parklane 7 Mary Parklane 7 painting

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 12 Running example (2/2) Queries: /document/person//hobby //child//hobby

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 13 Classic CC methods (1/3) Table locking How: On update, whole table is lockedHow: On update, whole table is locked Precludes phantomsPrecludes phantoms XML: parent-child relation in 1 (*) tableXML: parent-child relation in 1 (*) table Example:Example: –Query: //child//hobby –Update that should be allowed: change hobby element not occuring under child –Not possible when entire table is locked

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 14 Classic CC methods (2/3) Predicate locking HowHow –Locks in form of predicate: name=“person” –Predicate indicates what has been read Example:Example: –Query: /document/person//hobby –Update(ok): create person under root element –Update(~ok): create hobby under this person –Both are not possible since 1st predicate locks all person s under the root

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 15 Classic CC methods (3/3) Hierarchical locking HowHow –Lock granule  intention lock on ancestors –Change granule  exclusive lock on X Tree locking HowHow –Lock node  lock parent of node –Add node under X  exclusive lock on X And... query //A//B requires shared-locks on entire tree

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 16 User Data Model (1/2) Data Model (XPath-tree) Tree with labelled nodes(XPath-tree) Tree with labelled nodes –NB: we ignore ordering of children Path Expressions Sequence of tag names and wild-cards (*)Sequence of tag names and wild-cards (*) Separated by / (child) and // (descendants).Separated by / (child) and // (descendants). –person/child –*//person/child

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 17 User Data Model (2/2) Query Q(n,p): yields set of nodes which are reachable from n via path expression p.Q(n,p): yields set of nodes which are reachable from n via path expression p. –Q(n, *//hobby ) Addition A(n,a): add node with name a under nA(n,a): add node with name a under n –A(n, hobby ) –Fails if n is not there, yields new node. Deletion D(n): delete nD(n): delete n –Fails if n has children. Commit C(): end of transactionC(): end of transaction Node-correctness: Thou shalt only use nodes which you have obtained via an addition or via a query.

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 18 Scheduler’s Data Model (1/2) Instance GraphInstance Graph –Acyclic graph with labelled nodes –Nodes labelled with a delete set: Identifiers of transactions which deleted the node.Identifiers of transactions which deleted the node. Actual InstanceActual Instance –Subgraph of instance graph formed by the nodes with an empty delete set –Is always an XPath-tree

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 19 Scheduler’s Data Model (2/2) Query Q(n,p): yields a set of nodes which are -- in the actual instance – reachable from n via path expression p.Q(n,p): yields a set of nodes which are -- in the actual instance – reachable from n via path expression p.Addition A(n,a): adds node with name a under nA(n,a): adds node with name a under n –Empty delete set –Fails if n is not in the actual instance. Deletion D(n): add transaction to the delete set of nD(n): add transaction to the delete set of n –Fails if n has children in the actual instance. Commit C(): delete nodes with transaction in delete setC(): delete nodes with transaction in delete set

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 20 PL propagation scheme (1/3) Read Locks ● rl ( n, p ) ● e.g. rl ( n 12, //a//b) Required read locks: ● For Q(n,p) request rl(n,p) and do.... ● Read lock propagation: 1) rl(n, a/p) -> rl(n', p) if n' is an a-child of n 2) rl(n, */p) -> rl(n', p) if n' is a child of n 3) rl(n, a//p) -> rl(n', *//p) and rl(n', p) if n' is an a-child of n 4) rl(n, *//p) -> rl(n', *//p) and rl(n', p) if n' is a child of n ● Recomputing propagation on update is very easy (!)

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 21 PL propagation scheme (2/3) Example: Doc. root document person child addrnameage person agenameaddrhobby person agenameaddr agenameaddrhobby *//child//hobby child//hobby *//child//hobby child//hobby *//child//hobby child//hobby *//child//hobby child//hobby *//child//hobby child//hobby *//hobby hobby *//child//hobby

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 22 PL propagation scheme (3/3) Write Locks –wl( n, a ) or wl( n, * ) Required write locks: –For A(n,a) request: wl(n,a)wl(n,a) –For D(n) request: wl(n, *) if n existswl(n, *) if n exists wl(n', a) if n is an a-child of n'wl(n', a) if n is an a-child of n' Conflict rules: –wl(n, *) and wl(n, a) conflicts with rl(n, *) and rl(n, a) –All others do not. (... write-write conflicts?) Number of locks: updates: O(1) queries: O(|p|.|G|) Number of locks: updates: O(1) queries: O(|p|.|G|)

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 23 Path-lock satisfiability scheme Read locks ● rl( n, p ) (see PL-Prop) ● For Q ( n, p ) only rl( n, p ) is necessary Write locks ● wl(n,a) and wl(n,*) ● For A(n,a) and D(n) necessary as w. PL-Prop. Conflict rules ● wl(n,a) and wl(n,*) conflict with rl(n',p) if 1) there is a path from n' to n with label-list L and 2) L/a (or L/*) satisfies the path expression p Number of locks: updates: O(1) queries: O(1) Number of locks: updates: O(1) queries: O(1)

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 24 Commit scheduler Transactions make requests for operations:Transactions make requests for operations: –Query, Addition, Deletion, Commit, Roll-back Scheduler accepts request only ifScheduler accepts request only if 1) the operation does not fail, and 2) the required locks do not conflict with existing locks On Commit the locks disappear ofOn Commit the locks disappear of –the committing transaction, and –the nodes deleted by the transaction On Roll-back the locks disappear ofOn Roll-back the locks disappear of –the transaction being rolled-back

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 25 Conflict Scheduler Scheduler has a Dependency Graph (DG):Scheduler has a Dependency Graph (DG): –arrow t1 --> t2 if a lock of an operation of transaction t1 conflicts with a lock of a preceding operation of t2 Scheduler accepts request only ifScheduler accepts request only if 1) the operation does not fail, and 2) no cycles appear in the DG –A commit of t1 is not accepted if in the DG arrows depart from t1. –A roll-back of t1 leads to a roll-back of t2 if t2 --> t1 in the DG.

T h e U n i v e r s i t y o f S o u t h e r n Q u e e n s l a n d Stijn DekeyserGriffith U. Seminar, October ’04 26 Conclusion and Further Research Commit and conflict schedulers guarantee serialisabilityCommit and conflict schedulers guarantee serialisability Complexity is decided by the size of the document / instanceComplexity is decided by the size of the document / instance Is order of children a problem?Is order of children a problem? –simulation –write-write conflicts What with the relocation of subtrees?What with the relocation of subtrees? –Identity of nodes to be taken into account? No use / knowledge of (entire) instance?No use / knowledge of (entire) instance? –Use of DataGuide –Instance Independent CC for SSD