digitalroastery / weblounge

Web Content Management System
12 stars 4 forks source link

Resource locking: implicit vs. explicit, use case? #309

Open myniva opened 10 years ago

myniva commented 10 years ago

The only use case I can see for locking resources in the content repository is to prevent that a user accidentally overwrites the changes an other user made before.

To achieve this, locking a resource can be done explicit or implicit. Locking a resource explicitly means setting a flag on the resource, that it's locked. Before anyone can write again, the lock flag has to be removed. On the other hand, there's also the possibility of implicit resource locking. If a user tries to update a resource with a version not equal to the last version in the version graph, the update process should be stopped. This would ensure, that a user only updates a resource, if it had the most recent resource before.

Do you see any other use case than preventing overwrites? What lock strategy do you prefer, implicit or explicit?