6.0.0-git
2024-04-20
Last Modified 2008-05-07 by Ben Klang

On this page I try to collect everything on Resource Locking.

The idea

Martin Lohmeier noticed that there is currently no way horde can tell you that anyone is already editing an item when you try to edit an item (notes, wiki, etc). Kevin Myer asked the same question a few weeks ago on the dev list, but no one was working on this. So he decided to solve this problem.

Two ways

There are (a least) two ways how this can be done:

Locking The easy one is to lock an item for a certain time when someone starts to edit it. If someone else trys to edit it Horde will deny this and tell him / her to wait. The disadvantage of this is that only one person can edit one item at one time (not very good for a groupware). However there is additionally the concept of a "shared" lock which may be useful with the next strategy.

Try to merge The better way would be that Horde trys to merge the changes, similar to cvs. If changes cannot be merged, Horde will tell the user. I think this is what I'll try.

New Work - May 2008

Since I needed a mechanism to lock resources for full WebDAV functionality I have written a Horde_Lock subsystem. The work to date has been committed to Horde CVS HEAD. This subsystem is capable of locking arbitrary resources identified by URI. The locks support timeouts and exclusive vs. shared semantics.

The API

The API has been published in the Horde API documentation. Anyone interested in this project is invited to review the following URL and provide feedback to the Horde Dev mailing list.

http://dev.horde.org/api/framework/Horde_Lock/Horde_Lock.html

TODO

  • Stabilize SQL driver
    • Implement all semantics required to be RFC-compliant for WebDAV locks, with an eye toward using these locks in other Horde applications.

Wishlist

These are potential uses for the Lock system that have been requested or proposed by others.
  • write Text_Patch to use diff's from Text_Diff
    • add Method to merge Data
    • do test implementaion in Wicked
    • Create admin UI to view current locks and manually remove them.

Timeline

  • June 6th, 2005 Idea for this project
    • June 24th, 2005 add TODO, start coding
    • May 5th, 2008 Project ownership moved to Ben Klang

Contact

Ben Klang <ben@alkaloid.net>