What is the development strategy for implementing record locking for web apps in Valence?
Here's where I'm seeing a problem. You have a department of users updating...let's say a part file. In a stateful environment (ie. green screen), you can tap into the native record lock features to prevent 2 users updating a part record: you would purposefully lock a record via chain when it has been selected from a subfile. However, in a stateless environment (let's say a user selects a part from a grid of records), how will you know if another user requested that same record for update?
Off the top of my head, the only way I would know to do this is to use a file (or possibly a data queue) as the locking mechanism. When a web app that updates a file sends a request to view the details of a record, you could create a record in a "record locking" file/dtaq with the record's key information, file name, and user's session id (or token or whatever it's called in Valence). Prior to creating the record, you would check the record locking file/dtaq to see if a record with the same "key/file" information exists. If it does, then the record is locked and no updates are allowed to that record, UNLESS you are the same user. (hopefully that idea makes sense).
I just wanted to make sure that there wasn't some other way to handle record locking to preserve data integrity over multiple users changing contents in a file.
Here's where I'm seeing a problem. You have a department of users updating...let's say a part file. In a stateful environment (ie. green screen), you can tap into the native record lock features to prevent 2 users updating a part record: you would purposefully lock a record via chain when it has been selected from a subfile. However, in a stateless environment (let's say a user selects a part from a grid of records), how will you know if another user requested that same record for update?
Off the top of my head, the only way I would know to do this is to use a file (or possibly a data queue) as the locking mechanism. When a web app that updates a file sends a request to view the details of a record, you could create a record in a "record locking" file/dtaq with the record's key information, file name, and user's session id (or token or whatever it's called in Valence). Prior to creating the record, you would check the record locking file/dtaq to see if a record with the same "key/file" information exists. If it does, then the record is locked and no updates are allowed to that record, UNLESS you are the same user. (hopefully that idea makes sense).
I just wanted to make sure that there wasn't some other way to handle record locking to preserve data integrity over multiple users changing contents in a file.
Comment