Optional and responsive locking in collaborative graphics editing systems By School of Computing and Information Technology Griffith University Brisbane,

Slides:



Advertisements
Similar presentations
Lock-Free Consistency Control for Web 2.0 Applications Jiang-Ming Yang, Hai-Xun Wang, Ning Gu, Yi-Ming Liu, Chun- Song Wang, Qi-Wei Zhang 25 April 2008.
Advertisements

Optimistic Methods for Concurrency Control By : H.T. Kung & John T. Robinson Presenters: Munawer Saeed.
Concurrency Control II
Copyright 1998 Chengzheng Sun1 Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements Chengzheng Sun Charence (Skip)
Database Systems, 8 th Edition Concurrency Control with Time Stamping Methods Assigns global unique time stamp to each transaction Produces explicit.
Ordering and Consistent Cuts Presented By Biswanath Panda.
GridFlow: Workflow Management for Grid Computing Kavita Shinde.
Distributed Systems 2006 Styles of Client/Server Computing.
©Silberschatz, Korth and Sudarshan16.1Database System Concepts 3 rd Edition Chapter 16: Concurrency Control Lock-Based Protocols Timestamp-Based Protocols.
Transaction Management and Concurrency Control
Manajemen Basis Data Pertemuan 10 Matakuliah: M0264/Manajemen Basis Data Tahun: 2008.
Real-Time Distributed Databases By: Chris Scardino CSC536 Monday, May 2, 2005.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 8-1 COS 346 Day 18.
Concurrency. Correctness Principle A transaction is atomic -- all or none property. If it executes partly, an invalid state is likely to result. A transaction,
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Transaction Management and Concurrency Control.
Transaction Management and Concurrency Control
Present by Napasakorn Sukjay Poom Samaharn
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
04/20/2005Yan Huang - CSCI5330 Database Implementation – Distributed Database Systems Distributed Database Systems.
Logical Clocks (2). Topics r Logical clocks r Totally-Ordered Multicasting r Vector timestamps.
1 Software Development Configuration management. \ 2 Software Configuration  Items that comprise all information produced as part of the software development.
Database Management System Module 5 DeSiaMorewww.desiamore.com/ifm1.
COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 10 Transaction Management.
Operating Systems Distributed Coordination. Topics –Event Ordering –Mutual Exclusion –Atomicity –Concurrency Control Topics –Event Ordering –Mutual Exclusion.
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
Concurrency Server accesses data on behalf of client – series of operations is a transaction – transactions are atomic Several clients may invoke transactions.
Logical Clocks. Topics Logical clocks Totally-Ordered Multicasting Vector timestamps.
Lamport’s Logical Clocks & Totally Ordered Multicasting.
M253 Team Work in Distributed Environments Week (3) By Dr. Dina Tbaishat.
Replication (1). Topics r Why Replication? r System Model r Consistency Models – How do we reason about the consistency of the “global state”? m Data-centric.
A Survey on Optimistic Concurrency Control CAI Yibo ZHENG Xin
Distributed File Systems
Transactions and Concurrency Control. Concurrent Accesses to an Object Multiple threads Atomic operations Thread communication Fairness.
Chap 7: Consistency and Replication
Logical Clocks. Topics Logical clocks Totally-Ordered Multicasting Vector timestamps.
1 Concurrency control lock-base protocols timestamp-based protocols validation-based protocols Ioan Despi.
Chapter 7: Consistency & Replication IV - REPLICATION MANAGEMENT By Jyothsna Natarajan Instructor: Prof. Yanqing Zhang Course: Advanced Operating Systems.
Introduction to Distributed Databases Yiwei Wu. Introduction A distributed database is a database in which portions of the database are stored on multiple.
1 Lecture 4: Transaction Serialization and Concurrency Control Advanced Databases CG096 Nick Rossiter [Emma-Jane Phillips-Tait]
Logical Clocks. Topics r Logical clocks r Totally-Ordered Multicasting.
9 1 Chapter 9_B Concurrency Control Database Systems: Design, Implementation, and Management, Rob and Coronel.
Multidatabase Transaction Management COP5711. Multidatabase Transaction Management Outline Review - Transaction Processing Multidatabase Transaction Management.
10 1 Chapter 10_B Concurrency Control Database Systems: Design, Implementation, and Management, Rob and Coronel.
©Bob Godfrey, 2002, 2005 Lecture 17: Transaction Integrity and Concurrency BSA206 Database Management Systems.
Consistency Control in Distributed Collaboration Tools CISMM: Computer Integrated Systems for Microscopy and Manipulation Project Leads: Diane Sonnenwald*
SHUJAZ IBRAHIM CHAYLASY GNOPHANXAY FIT, KMUTNB JANUARY 05, 2010 Distributed Database Systems | Dr.Nawaporn Wisitpongphan | KMUTNB Based on article by :
Jinze Liu. ACID Atomicity: TX’s are either completely done or not done at all Consistency: TX’s should leave the database in a consistent state Isolation:
CS3771 Today: Distributed Coordination  Previous class: Distributed File Systems Issues: Naming Strategies: Absolute Names, Mount Points (logical connection.
Prepared by: Mudra Patel (113) Pradhyuman Raol(114) Locking Scheduler & Managing Hierarchies of Database Elements.
Chapter 13 Managing Transactions and Concurrency Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
Distributed Databases – Advanced Concepts Chapter 25 in Textbook.
Section 18.6: Managing Hierarchies of Database Elements
Concurrency Control Managing Hierarchies of Database Elements (18.6)
Transaction Management and Concurrency Control
The University of Adelaide, School of Computer Science
The University of Adelaide, School of Computer Science
6.4 Data and File Replication
Outline Introduction Background Distributed DBMS Architecture
Database Processing: David M. Kroenke’s Chapter Nine: Part One
7.1. CONSISTENCY AND REPLICATION INTRODUCTION
Chapter 10 Transaction Management and Concurrency Control
Chapter 15 : Concurrency Control
Using Templates and Library Items
The University of Adelaide, School of Computer Science
Outline Review of Quiz #1 Distributed File Systems 4/20/2019 COP5611.
CONCURRENCY Concurrency is the tendency for different tasks to happen at the same time in a system ( mostly interacting with each other ) .   Parallel.
The University of Adelaide, School of Computer Science
Prepared by: Mudra Patel (113) Pradhyuman Raol(114)
Presentation transcript:

Optional and responsive locking in collaborative graphics editing systems By School of Computing and Information Technology Griffith University Brisbane, Queensland 4111 Australia David Chen Chengzheng Sun

Outline Object graphics collaborative editing systems Locking The GRACE system Locking in GRACE –Responsive operation generation –Intention preservation –Lock ownership Conclusion

Real-time object graphics collaborative editing systems These systems allow multiple users to edit the same document at the same time from different sites. An object graphics document is a collection of one or more graphical objects such as line, rectangle and circle, etc. A graphical object consists of attributes, such as type, position, size and color etc. Editing operations, such as create, move and fill etc, are used to modify the document. What is the use for locking?

Locking in existing systems First used to maintain consistency in database systems. It is also used to maintain consistency in many object graphics collaborative editing systems, e.g. Ensemble, GroupDraw, GroupGraphics and GroupKit. How does locking work: Before an operation can be generated to edit an object, a lock on that object has to be obtained. Locking prevents the generation of concurrent operations on the same object. Locking is compulsory. Disadvantages of locking: Pessimistic locking slows down the response time. Optimistic locking does not preserve the generation effects of all operations. The system decides which effect the users would see based on unrelated information.

The GRACE system GRACE (GRAphics Collaborative Editing) system. GRACE has a distributed replicated architecture. Each site maintains a copy of the shared document. When an operation is generated it is first applied to the local copy, then sent to all remote sites. The intention preservation property of GRACE ensures the generation effects of all operations are preserved. Object replication is used to maintain intention preservation.

The dependency relations are defined based on Lamport’s happen before relation: O b is dependent on O a, iff O a happened before O b denoted by O a  O b. E.g: OaOa ObOb O a and O b are independent, iff neither O a  O b, nor O b  O a, denoted by O a || O b  E.g: OaOa ObOb OaOa ObOb OcOc OaOa ObOb Intention of an operation The intention of an operation O is the editing effect which can be achieved by applying O on the document state from which O was generated. Intention preservation property For any operation O, the effects of executing O at all sites are the same as the intention of O, and the effect of executing O does not change the effects of independent operations.

Object replication scheme Definitions: Independent operations targeting the same object and changing the same attribute to different values are called conflicting operations. Operations not conflicting are compatible. Replication effect: For two conflicting operations O a and O b, targeting object G, replicates of G, G a and G b are made for the application of O a and O b respectively. For two independent compatible operations O a and O b targeting the same object, there must be at least one object/replica, which contains the effects of both O a and O b. Move left Move right replica

Locking in GRACE The role of locking in GRACE: Locking is used to reduce the generation of conflicting operations which cause object replication. Locking is not used to preserve intentions of operations, therefore, locking an object before applying operations is optional. What can be locked? Graphical objects. Regions. –A region is an area in the drawing space. –Locking a region can be used to obtain a private working space. A lockable item is either an object or a region. A locking operation specifies either one or more objects or a region to be locked.

What does a user get for locking an item? If a user locks an object G then the system guarantees s/he the editing right to G. If a user locks a region R then the system guarantees s/he the editing right to R and all objects within R. What if the user did not lock an item before editing? That user’s editing request will be rejected iff that item is locked by someone else.

Responsive operation generation How locking operations can be generated: Implicitly - generated by the system. Explicitly - generated by the users. With the introduction of locking, user generated editing/locking requests need to be validated. A user’s request is valid if the target item on the local document is unlocked or s/he owns the lock. Otherwise it is invalid, and is rejected right away and the user informed. This validation process relies only on the current local document state, therefore fast response time is ensured. For any each valid request, an operation is generated. User request Local validation Operation generation Local execution Remote execution Rejection

Intention Preservation Locking introduces new intention preservation problems: How to preserve the intention of an editing operation which targets an object locked by an independent locking operation? How to preserve the intentions of independent locking operations targeting the same object? Solution: allow these independent operations to be applied to the same object. Move(G)Lock(G) An unstable period of a lock is used to inform lock owners that the locked item may be edited or locked other by independent operations. An unstable period of a lock generated by locking operation L, is the period starting when L is applied on the item until all operations independent of L targeting that item have been applied.

If there are two or more independent locking operations targeting the same item, then all users who generated these locking operations will own the lock on that item. This item is locked by a shared lock. All owners of an item locked by shared lock can edit that item. After the unsafe period, if only one user owns the lock, then that user will have exclusive access to that item. This item is locked by an exclusive lock. After the unstable period, only the lock owner(s) can editing that item. Notations: Let Owner(I) denotes the a set of users who owns the lock on item I. Let |Owner(I)| denotes the number of users who owns the lock on I. A lock on an item I is exclusive if |Owner(I)| = 1. A lock on an item I is shared if |Owner(I)| > 1.

Shared lock ownership What should be the lock ownership for independent locking operations those target item is the same or overlaps? Let L 1 and L 2 be two independent locking operations generated by users U 1 and U 2. If L 1 and L 2 are object locking operations targeting the same graphical object G, then Owner(G) = {U 1, U 2 }. If L 1 and L 2 are region locking operations with overlapping region P and non-overlapping regions R 1 and R 2 for L 1 and L 2 then Owner(P) = {U 1, U 2 }, Owner(R 1 ) = {U 1 } and Owner(R 2 ) = {U 2 }. P R1R1 R2R2

If L 1 is an object lock targeting object G and L 2 is a region lock targeting region R, where G is within R, then what should be the lock ownership for G and R? G is inside R, therefore, Owner(R) should also be able to edit G, therefore, Owner(G) = {U 1, U 2 }. U 1 does not own a region lock on R, therefore, Owner(R) = {U 2 }. The resulting effect of G: U 1 can edit G, but cannot move G within R. U 2 can edit G and can move G within R. Both U 1 and U 2 can move G outside of R. If G is moved outside of R, then U 2 loses the ownership on G, i.e. Owner(G) = {U 1 }. R G

Reduce ownership for replicates For any graphical object G with lock that is shared or in the unstable period, conflicts may occur on G. What should be the lock ownership for replicates of G? Consider the following situation: Let O 1 and O 2 be the conflicting operations targeting G, such that O 1 and O 2 are generated by U 1 and U 2 where U 1, U 2  Owner(G). According to replication scheme, replicates G 1 and G 2 will be made for O 1 and O 2 respectively. Shared lock can be assigned to both replicas such that Owner(G 1 ) = Owner(G 2 ) = {U 1, U 2 }. Or exclusive locks can be assigned such that Owner(G 1 ) = {U 1 } and Owner(G 2 ) = {U 2 }. U 1, U 2 U1U1 U2U2 It is better to have exclusive locks than shared locks since conflict cannot occur on objects with an exclusive lock. or replication

Lock ownership for replicated objects Let S be a set of independent operations all targeting the locked object G, such that there is at least a pair of conflicting operations in S. For any user U such that U  Owner(G), then after replication: If U generated an operation O such that O  S, then for any replica G' of G which O is applied to, U  Owner(G'). If U did not generated any operation in S, then U will own the locks for all replicates of G. Consider U 3  Owner(G) generated operation O 3 to edit G. Let O 3 be independent and compatible with both O 1 and O 2. O 3 will be applied to both replicates G 1 and G 2. If U 3 is to own only one replica’s lock, then that replica cannot be consistently chosen at all sites until all independent operations have arrived. U 3 should own the lock on all objects O 3 is applied to. replication U 1, U 2, U 3 U 1, U 3 U 2, U 3

Summary and Future work An optional and responsive locking scheme to reduce conflicts being generated was presented. Highlights: The introduction of region locking. The lock ownership for independent overlapping region and object locks. The introduction of unsafe period for applying independent operations. Taking advantage of object replication to reduce lock ownership. Future work: A good user interface design is needed to display locked items and to allow users to generate locking requests. A new challenge is to provide instantaneous exclusive locking for both region and object locks.