Discussion:
[Erp5-dev] guard agains concurrent edits
bartek
2008-06-30 11:30:16 UTC
Permalink
Hi,

Would it be feasible to implement a kind of a "guard" against concurrent
edits of the same object? I mean this: if I open a form to edit, and
while I'm typing another guy opens the same form, edits and saves, then
when I save the form the other guy's changes will be silently
overwritten, and nobody would be notified. In a multi-user environment
this can cause serious issues.

I see two ways to solve it: first is MoinMoin-like, the other would be
to store original data and load time in a form and upon submission
checking if modification date has been changed, and if so then it would
be possible to check if there are conflicts.

What do you think?

Bartek
--
"feelings affect productivity. (...) unhappy people write worse
software, and less of it."
Karl Fogel, "Producing Open Source Software"
Jean-Paul Smets
2008-06-30 12:25:53 UTC
Permalink
Hi,

The clean way to handle this is to define in a workflow who is
responsible of editing objects at a given time. This is the only way
which garantees everything.

It could be useful though to display warnings in certain cases (ie.
based on modification date as you suggested).

Regards,

JPS.
Post by bartek
Hi,
Would it be feasible to implement a kind of a "guard" against concurrent
edits of the same object? I mean this: if I open a form to edit, and
while I'm typing another guy opens the same form, edits and saves, then
when I save the form the other guy's changes will be silently
overwritten, and nobody would be notified. In a multi-user environment
this can cause serious issues.
I see two ways to solve it: first is MoinMoin-like, the other would be
to store original data and load time in a form and upon submission
checking if modification date has been changed, and if so then it would
be possible to check if there are conflicts.
What do you think?
Bartek
--
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
ERP5 Enterprise: Free / Open Source ERP for Critical Applications
http://www.erp5.com
ERP5 Express: Hosted Open Source ERP for small companies
http://www.myerp5.com
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
Boris Kocherov
2008-06-30 15:42:58 UTC
Permalink
Hi. Witam
Post by Jean-Paul Smets
Hi,
The clean way to handle this is to define in a workflow who is
responsible of editing objects at a given time. This is the only way
which garantees everything.
It could be useful though to display warnings in certain cases (ie.
based on modification date as you suggested).
Does it mean that user have run action for document edit? If so, How
should server know that user leaves edit mode or closes the browser window?
Post by Jean-Paul Smets
Regards,
JPS.
Post by bartek
Hi,
Would it be feasible to implement a kind of a "guard" against concurrent
edits of the same object? I mean this: if I open a form to edit, and
while I'm typing another guy opens the same form, edits and saves, then
when I save the form the other guy's changes will be silently
overwritten, and nobody would be notified. In a multi-user environment
this can cause serious issues.
I see two ways to solve it: first is MoinMoin-like, the other would be
to store original data and load time in a form and upon submission
checking if modification date has been changed, and if so then it would
be possible to check if there are conflicts.
What do you think?
On my opinion the MoinMoin version is better. As the document fields are
linked between each other only user should to decide which data would be
saved.

So the person who saved the document latter get the possibility to
resolve the collision. The user who saved the document before must get
the notification (i.e. by email) that the collision occurred and what
was the result.

Regards, Pozdrawiam

Boris Kocherov

Loading...