That sounds feasable, but depending on how your web application is used
you might also have to consider the possibility of multiple web users
accessing the same record.  You might need some unique user id key
included in the token that gets carried around by the web session.  I
think you would have to completely deny access to all but the first web
user because you only have stale data to give them at that point.  And
of course there's always the possibility someone's browser might crash
and cause them to lock themselves out of the application for the
pre-determined READU period.

-John

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Wednesday, July 13, 2011 10:28 AM
To: U2 Users List
Subject: Re: [U2] Record Locks - How long should they last for?
(Opinion)

> -----Original Message-----
> From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
> boun...@listserver.u2ug.org] On Behalf Of Rex Gozar
> Sent: Wednesday, July 13, 2011 1:08 PM
> To: U2 Users List
> Subject: Re: [U2] Record Locks - How long should they last for?
> (Opinion)
> 
> 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.
> 

I was thinking along similar lines as well as an option, instead of the
checksum token method, I was going to write the record to a holding file
with an ID that was a combination of file/record/transaction token

And do a comparison using the saved item to see if record changed, but 
only if the record lock had expired - I still wanted to keep the locks
since the system could be used by local users as well, which is easier
using the READU locally to test for locking.

> rex
> _______________________________________________
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to