If you can, just store both alternatives and let the users (any user who thinks he knows best, not just one of the two having the conflict) resolve that with another edit. Software that uses the data should always take the last of the alternatives (if they are ordered by date)
But there is a worst case were you might have to store more than two alternatives, but you can manage this by allowing only a maximum number and after that drop the oldest alternative to make room for the newest
About the race condition issue. I don't know if this might be a problem with mod_perl, but if it is, you can use either file locking or a database engine. Both methods will make sure that you can't corrupt the data if two users try to write at the same time.
In reply to Re: How to deal with data race issues with Perl?
by jethro
in thread How to deal with data race issues with Perl?
by halfbaked
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |