The discussion so far, slightly edited (so blame me for typos, etc.) and with permission:
- vroom - what seems like the best scheme to handle unreleased
locks on nodes being edited??? (extra question marks for jcwren)
- tilly - Whoever gets in second, wins, editing may continue
until it has been edited and not re-edited within 30 minutes. Just keep
the original. When edits need to be made, I think virtually anyone would
agree on what edit needs to be made. I have no objection to someone else
erasing my hard work. I see no reason for complex logic.
- Corion - Well, as far as I know, the problem is a) Whether to
lock nodes at all (my opinion no) and b) how to implement breaking locks
if locking is implemented.
- jcwren - Lock breaking could be automatic to simplify it. If
it's in the editors list, a checkbox would be a request for the lock. You
click it, and submit. If you get the lock, it's yours to edit. If not,
you get a redirect to a "Node Is Being Edited" message. A cronjob
harvests expired locks, based on a timestamp expiring. I envision if you
need more time, you submit the update. The lock bit stays set for another
5 minutes. You can optionally clean the lock bit by hand, but only the
current editor may do that.
- tye - I envision tracking who (and when) is editting (and,
separately replying to) a node and reporting that in key places. The
"locking" just consist of telling me it is already being done and me not
trying to duplicate the work if I plow ahead (because the lock looks
stale to me), then there might be two edits close together. If that is a
big problem, do "optimistic locking" where, my final update checks if the
node has changed since I got my copy of if so, then I get told that my
edit is based on a stale copy and perhaps get an option to overwrite
anyway or reedit or merge (hah!)
- jcwren - tye, that seems to add an unnecessary level of
complexity. For logging purposes, it could append to a single node. Edit
History or something like that. To edit, you'd have to get the lock,
which means you'd see the freshest copy of the node. If you see it's
already been edited, you can let it time out, or release the lock.
- chipmunk - I think we should have a lock which allows only one
editor to edit a given node at a time, and the lock should expire after
30 minutes.
- tye - in my experience, the little details kill you unless you
do optimistic locking ): jcwren, the "merge" part was a joke (sorry) but
I don't understand the "add...level of complex..." complaint.
- jcwren - tye, complexity I was referring to was all the
post-checking. In my mind, if you can't get the lock, two people can't be
editing at the same time. Ever.
And my apologies to the monks whose comments I stripped before the idea of a node based on the discussion came up. I think most of them were just questions, though.
-
tye
(but my friends call me "Tye")