Il 04/01/2012 16:03, Pavel Sanda ha scritto:
Tommaso Cucinotta wrote:
Back to the dark part of the feature, i.e., collisions: if 2 users try to
edit the same paragraph, what would you do ? (note that, as of now, you may
what about some locking for not-read-only lfuns?

I guess you mean "distributed locking". In order to avoid serious slow-down
of the editing actions, I'd see only one possibility:
-) before allowing to modify a part of the document, each client will submit
and try to acquire a write-lock on all the affected "parts" of the document, where a "part" may be a (nested) paragraph, a cell table, an Inset, etc.
    [I'd copy more or less the Cursor slices, in this regard]
-) if the server denies write-lock because someone else is holding that, then the client will see an error dialog and its attempted LFUN will be ignored.
-) we might have a "Lock" button that is needed to be pressed before being
    allowed to issue any modifying LFUN -- one issue might be how to allow
the user to lock at different granularities (e.g., current paragraph only, current subsection, section, whole buffer or whole multi-buffer document). -) when finished editing, a user may have an "Unlock" button to grant the lock to someone else, or we might have a write-idle-timeout that automatically
    releases the lock.
-) there might be the need for a graphical/visual feedback on the part(s) of the document that is(are) being locked locally, as well as remotely. I'd imagine a
    different background color would suffice.

My 2 cents,

    T.

Reply via email to