Locking: Implementation Considerations

One of the issues we've been talking about is what should happen if you MOVE
a resource into a locked collection.  What lock should be on the resource
after the MOVE?

I think the question is whether collection locks with Depth: infinity should
be inherited statically or dynamically.  Should a collection lock with
Depth: infinity affect just those resources that are in the collection at
the time the lock is created (static inheritance), or should the lock affect
whatever resources come into the collection while it is in force (and stop
applying to any resources that are removed from the collection) (dynamic
inheritance)?

Static inheritance suggests that the lock would be maintained on the
collection and also maintained on each resource in the collection to depth
infinity.  It would be painful to create this lock, and painful to remove
it, and while it is in force it would be necessary to keep track of the
MOVEs out of the collection in order to be able to remove the lock correctly
in the end.  However, if every lock is maintained on each resource it
affects, it is easy to tell whether a given resource is locked.

Dynamic inheritance suggests that the lock would be maintained only on the
collection.  It is easy to create and remove such a lock.  But it is
difficult to tell whether any given resource is locked when someone attempts
a PUT, MOVE, etc.  Especially once the BIND method is available, you would
have to trace from the resource in question upward through all the bindings
on all the collections in the hierarchy to find out whether the resource is
locked.

Currently, section 7.7 of RFC 2518 requires dynamic inheritance of locks.

-- Judy

Judith A. Slein
Xerox Corporation
jslein@crt.xerox.com
(716)422-5169
800 Phillips Road 105/50C
Webster, NY 14580

Received on Thursday, 5 August 1999 17:14:04 UTC