Optimistic locking strategy
When a user gets an optimistic locking exception, his usual behavior is to confirm the changes he made overwriting the existing ones.
This behavior seems to imply that a 'last wins' approach is better, because what will really happen is that the last one will win.
This could be true if not for the fact that there are some fields in the database that have redundant information, for example a Customer balance. In this case, if two users read the current balance, increment it, and perform an update a 'last wins' approach will make one of the users to lose the changes and the balance will be inconsistent.
We are thinking on provide a better alternative. In DeKlarit you write the logic that updates the balance with declarative rules, something similar to:
CustomerBalance = CustomerBalance + Amount if insert;
CustomerBalance = CustomerBalance - Amount if Delete;
CustomerBalance = CustomerBalance - Amount.PreviousValue() + Amount if Update;
This means we know which fields have redundant information. If we agree that the user will always overwrite the changes, what we need to do is to overwrite all the fields but the CustomerBalance, and for the CustomerBalance, read the current value and apply the business rules.
This also solves a common scenario where the CustomerBalance is updated very frequently, and using a pure optimistic locking strategy will imply that you'll have a big chance of getting a conflict each time you try to update (i.e., the Coke inventory in Wal-Mart).
I'm not saying this would apply to all cases, but it's seems to be a much better approach than the usual optimistic locking (and of course than the 'last wins' approach) in a lot of situations.