[16.0] [ADD] web_concurrent_edit_global_warning#3457
[16.0] [ADD] web_concurrent_edit_global_warning#3457paradoxxxzero wants to merge 2 commits intoOCA:16.0from
Conversation
|
I love the module idea very much, but I have very strong doubts with regards to how it is implemented. |
b12fb14 to
91b3628
Compare
|
Thanks for your interest in this PR. For some context this is an evolution from an other unpublished module that was based on broadcast channels to detect cross tabs concurrent edit on the same record. It was then extended to support multiple browsers with the help of the builtin odoo websocket server. As for the signalling implementation, it is a simple stateless synchronization mechanism. A client asks other connected clients if they are currently editing the current record and then notifies them when it starts or stops editing. It is not meant to be perfect as false negatives are tolerable in this context (it is a warning after all) but the accent was put on implementation simplicity and performance (no server state to manage) as I had only a day or two to implement it. It is currently used in production. Now that I said all that, please don’t be dismissive. If you have "strong doubts" please state them, if you are interested in a better signalling mechanism and have time on your hands please be my guest. I just thought it was a nice base module to share and build upon. |
91b3628 to
ef894f5
Compare
|
The time you had to make the module is entirely irrelevant to whether it is a good architectural choice, so it's better left out of the discussion. With regards to conflicting changes, in the general case that other users have a changeset in one of their tabs is a worse approximation than the write_date being more recent. Moreover, it can be extended to be a less worse approximation -- having the list of dirty fields means we can check whether there is any actual conflicting diff. There is however something where your approach is great, and it's social signaling. Re-stated as social signaling (real-time collaboration, etc), I would have only one big concern: AFAICT, the way it relies on in-process memory means that this wouldn't work in non-trivial deployment setups, which make more sense the more users you have. So I think this would need to be slightly rewritten to work in such cases -- even if only through an extension mechanism, with the base module stating the limitation upfront. |
I think you missed the main purpose of this module: warning a user that another user is editing the current record. A concrete and real use case is when users are working on very big sale orders, the edit session can be quite long and if another user starts editing the same SO, the last user to save will override the changes of the first user silently which honnestly is quite bad. The purpose is to warn users as soon as possible that some data loss will happen if they continue editing.
Time is relevant as I would rather implement a full conflict resolution system but that does not mean this simpler solution is not useful. |
|
Ok, I see where you're coming from now, and why we're talking past each others. This does not really change my opinion with regards to how architecture would need to be reworked, nor does it address the technical points I've raised. As such, I'll leave it as that. |
|
Tested and working, LGTM This module effectively addresses a specific need: warning users when another user is editing the same record. From my humble opinion:
|
This module provides a mechanism to warn users about concurrent edits from
multiple users on the same record:
It also warns if the current open record has been saved by another user and therefore is not showing up to date values: