We use "optimistic locking" with a version number in each record (in our case Cache' handles the versioning based on our specification of the files, but either versioning or checksums works). This is a solid approach for web apps instead of using pessimistic locking. --dawn
On Wed, Jul 13, 2011 at 12:07 PM, Rex Gozar <rgo...@gmail.com> wrote: > Based on your description, you are using a pessimistic locking > approach (similar to a telnet user) for a web application, so choosing > a timeout would be arbitrary. Your "heartbeat" idea could be tied in > to avoid having to manually release records. > > It seems like a bad idea to force a connectionless, stateless web > browser to act like a connected, stateful telnet session. > > Why not switch to an optimistic locking approach? Checksum the > original data (record) when it is passed to the browser. When > returned from the browser, lock the record and checksum it again. If > the checksums match proceed with the write; otherwise, send a message > back to the browser allowing the user to cancel or resubmit their > changes. This way, record locks should only last a few milliseconds. > > rex > _______________________________________________ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > -- Dawn M. Wolthuis Take and give some delight today _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users