How do you manage concurrent access to forms?

前端 未结 8 1322
离开以前
离开以前 2020-12-17 15:27

We\'ve got a set of forms in our web application that is managed by multiple staff members. The forms are common for all staff members. Right now, we\'ve implemented a locki

8条回答
  •  执笔经年
    2020-12-17 16:09

    Why do you need to look for session timeout? Just synchronize access to your data (forms or whatever) and that's it.
    UPDATE: If you mean you have "long transactions" where form is locked as soon as user opens editor (or whatever) and remains locked until user commits changes, then:

    • either use optimistic locking, implement it by versioning of forms data table
    • optimistic locking can cause loss of work, if user have been away for a long time, then tried to commit his changes and discovered that someone else already updated a form. In this case you may want to implement explicit "locking" of form, where user "locks" form as soon as he starts work on it. Other user will notice that form is "locked" and either communicate with lock owner to resolve issue, or he can "relock" form for himself, loosing all updates of first user in process.

提交回复
热议问题