Optional and responsive locking in collaborative graphics editing systems - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Optional and responsive locking in collaborative graphics editing systems

Description:

Let L1 and L2 be two independent locking operations generated by users U1 and U2. ... If G is moved outside of R, then U2 loses the ownership on G, i.e. Owner ... – PowerPoint PPT presentation

Number of Views:80
Avg rating:3.0/5.0
Slides: 19
Provided by: Chen101
Category:

less

Transcript and Presenter's Notes

Title: Optional and responsive locking in collaborative graphics editing systems


1
Optional and responsive locking in collaborative
graphics editing systems
  • By

David Chen D.Chen_at_cit.gu.edu.au
Chengzheng Sun C.Sun_at_cit.gu.edu.au
School of Computing and Information
Technology Griffith University Brisbane,
Queensland 4111 Australia
2
Outline
  • Object graphics collaborative editing systems
  • Locking
  • The GRACE system
  • Locking in GRACE
  • Responsive operation generation
  • Intention preservation
  • Lock ownership
  • Conclusion

3
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?

4
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.

5
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.

6
  • The dependency relations are defined based on
    Lamports happen before relation
  • Ob is dependent on Oa, iff Oa happened before Ob
    denoted by Oa Ob. E.g

Oa
Oa
Oa
Ob
Oc
Ob
Ob
  • Oa and Ob are independent, iff neither Oa Ob,
    nor Ob Oa, denoted by Oa Ob. E.g

Oa
Ob
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.
7
  • 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 Oa and Ob,
    targeting object G, replicates of G, Ga and Gb
    are made for the application of Oa and Ob
    respectively.

Move right
Move left
replica
replica
  • For two independent compatible operations Oa and
    Ob targeting the same object, there must be at
    least one object/replica, which contains the
    effects of both Oa and Ob.

8
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.

9
  • 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 users editing request will be rejected iff
    that item is locked by someone else.

To lock or not to lock,
that is the question.
10
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 users 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.

Operation generation
Local execution
Remote execution
User request
Local validation
Rejection
11
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)
Lock(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.
12
  • 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.

13
Shared lock ownership
  • What should be the lock ownership for independent
    locking operations those target item is the same
    or overlaps?
  • Let L1 and L2 be two independent locking
    operations generated by users U1 and U2.
  • If L1 and L2 are object locking operations
    targeting the same graphical object G, then
    Owner(G) U1, U2.
  • If L1 and L2 are region locking operations with
    overlapping region P and non-overlapping regions
    R1 and R2 for L1 and L2 then Owner(P) U1, U2,
    Owner(R1) U1 and Owner(R2) U2.

R1
P
R2
14
  • If L1 is an object lock targeting object G and L2
    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) U1, U2.
  • U1 does not own a region lock on R, therefore,
    Owner(R) U2.

R
  • The resulting effect of G
  • U1 can edit G, but cannot move G within R.
  • U2 can edit G and can move G within R.
  • Both U1 and U2 can move G outside of R.
  • If G is moved outside of R, then U2 loses the
    ownership on G, i.e. Owner(G) U1.

G
15
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?

U1, U2
  • Consider the following situation
  • Let O1 and O2 be the conflicting operations
    targeting G, such that O1 and O2 are generated by
    U1 and U2 where U1, U2 ? Owner(G).
  • According to replication scheme, replicates G1
    and G2 will be made for O1 and O2 respectively.
  • Shared lock can be assigned to both replicas such
    that Owner(G1) Owner(G2) U1, U2.
  • Or exclusive locks can be assigned such that
    Owner(G1) U1 and Owner(G2) U2.

replication
U1, U2
U1, U2
or
U1, U2
replication
U1
U2
It is better to have exclusive locks than shared
locks since conflict cannot occur on objects with
an exclusive lock.
16
  • Consider U3 ?Owner(G) generated operation O3 to
    edit G.
  • Let O3 be independent and compatible with both O1
    and O2. O3 will be applied to both replicates G1
    and G2.
  • If U3 is to own only one replicas lock, then
    that replica cannot be consistently chosen at all
    sites until all independent operations have
    arrived.
  • U3 should own the lock on all objects O3 is
    applied to.

U1, U2, U3
replication
U1, U3
U2, U3
  • 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.

17
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.

18
The End
Write a Comment
User Comments (0)
About PowerShow.com