Orlando Andico wrote:
> You could use a cookie. Only one browser can have the cookie.
> Add a button to the HTML form "release cookie" The cookie can
> be implemented with HTML::Embperl in the %udat hash. Only the
> browser with the cookie can do updates.
> Your Perl backend checks for presence of the cookie before
> allowing updates. You probably also need a one-row table in
> MySQL which stores the current owner of the cookie. If there
> is nothing in that table, the browsers have a little race
> condition to grab the cookie (don't know how you'll implement
The main drawback with your idea [and table locking schemes]
is the classic "Get cookie before going to lunch" problem.
Also known as the "Get cookie and die" problem this can very
easily result in frustrated users being locked out of your
systems for extended periods.
The conditional update approach is far superior in every way
and, because it relies on nothing more complex than the values
originally read from the table, is easy tom implement and does
not suffer from any of these problems.
Hope this helps...
If it ain't opinionated, it ain't Rich Teer.