Locking records
2 posts by 2 authors in: Forums > CMS Builder
Last Post: October 13, 2009 (RSS)
I know that because HTML is stateless, it's not possibly to lock records as such, but have come across situations recently where two people have been editting the same record during the same period so that when they both save their changes, the second person to save overwrites the first person's changes.
Have you given any thought to this area?
The solutions I have thought of are setting a flag somewhere to say the record is 'locked' so that if somebody attempts to edit it, they are either not allowed, or at least get a warning showing them that 'userX' is currently editting this record so that they can then contact 'userX' to confirm. Every so often, say every hour, a process could check for dormant locks and unlock them based on a parameter. Or, there could be an AJAX process in the editor that updates the lock every minute or so and if the lock hasn't been updated within the last minute, then a second editor will assume that the lock is redundant.
It would be great to include this at some point in the future, but please let me know if I'm way off the mark.
Thanks, Paul.
Have you given any thought to this area?
The solutions I have thought of are setting a flag somewhere to say the record is 'locked' so that if somebody attempts to edit it, they are either not allowed, or at least get a warning showing them that 'userX' is currently editting this record so that they can then contact 'userX' to confirm. Every so often, say every hour, a process could check for dormant locks and unlock them based on a parameter. Or, there could be an AJAX process in the editor that updates the lock every minute or so and if the lock hasn't been updated within the last minute, then a second editor will assume that the lock is redundant.
It would be great to include this at some point in the future, but please let me know if I'm way off the mark.
Thanks, Paul.
Re: [pothompson] Locking records
By Dave - October 13, 2009
Hi Paul,
That's a great idea, I'll add it to the planned feature list.
What is the type of section that is being updated? A work-around for the time being might to have the users create their content using an external program and then copy and paste it in to update the record - thus reducing the window of time when a record is being modified. Although they'd still need to check if the record hadn't been updated since they copied it's content for editing.
That's a great idea, I'll add it to the planned feature list.
What is the type of section that is being updated? A work-around for the time being might to have the users create their content using an external program and then copy and paste it in to update the record - thus reducing the window of time when a record is being modified. Although they'd still need to check if the record hadn't been updated since they copied it's content for editing.
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com