Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  01 Apr 2025, Lukas Gerritzen, Suggestion, Sequencer ODBSET feature requests 
    Reply  01 Apr 2025, Lukas Gerritzen, Suggestion, Sequencer ODBSET feature requests 
       Reply  01 Apr 2025, Stefan Ritt, Suggestion, Sequencer ODBSET feature requests 
    Reply  01 Apr 2025, Stefan Ritt, Suggestion, Sequencer ODBSET feature requests 
    Reply  01 Apr 2025, Konstantin Olchanski, Suggestion, Sequencer ODBSET feature requests 
       Reply  01 Apr 2025, Pavel Murat, Suggestion, Sequencer ODBSET feature requests 
          Reply  02 Apr 2025, Konstantin Olchanski, Suggestion, Sequencer ODBSET feature requests 
             Reply  02 Apr 2025, Stefan Ritt, Suggestion, Sequencer ODBSET feature requests 
    Reply  07 Apr 2025, Zaher Salman, Suggestion, Sequencer ODBSET feature requests 
       Reply  07 Apr 2025, Stefan Ritt, Suggestion, Sequencer ODBSET feature requests 
Message ID: 3027     Entry time: 07 Apr 2025     In reply to: 3026
Author: Stefan Ritt 
Topic: Suggestion 
Subject: Sequencer ODBSET feature requests 
If people are simultaneously editing scripts this is indeed an issue, which probably never can be resolved by technical means. It need communication between the users.

For the main script some ODB locking might look like:

- First person clicks on "Edit", system checks that file is not locked and sequencer is not running, then goes into edit mode
- When entering edit mode, the editor puts a lock in to the ODB, like "Scrip lock = pc1234".
- When another person clicks on "Edit", the system replies "File current being edited on pc1234"
- When the first person saves the file or closes the web browser, the lock gets removed.
- Since a browser can crash without removing a lock, we need some automatic lock recovery, like if the lock is there, the next users gets a message "file currently locked. Click "override" to "steal" the lock and edit the file".

All that is not 100% perfect, but will probably cover 99% of the cases.

There is still the problem on all other scripts. In principle we would need a lock for each file which is not so simple to implement (would need arrays of files and host names).

Another issue will arise if a user opens a file twice for editing. The second attempt will fail, but I believe this is what we want.

A hostname for the lock is the easiest we can get. Would be better to also have a user name, but since the midas API does not require a log in, we won't have a user name handy. At it would be too tedious to ask "if you want to edit this file, enter your username".

Just some thoughts.

Stefan
ELOG V3.1.4-2e1708b5