I have recently come across a certain problem in programming my MMORPG: the synchronization of shared storage units.
With shared storage unit I intend something like a "chest" that can be accessed by multiple users. Any user can take items from it or put items in it or even move items around and merge items stacks in the chest. To get the idea, think about the guild chest in WoW.
At the moment my approach with non-shared storage is to apply any transaction on the client (move/split/merge they take place instantly on the client) and then communicate to the server the change which also does validation and stuff. This works just fine: it's rather impossible that one client issues a transaction that would conflict with another of its transactions as he always sees an updated state of the storage (because he/she is the only one issuing transactions on that storage).
How do you keep a storage synchronized among its co-owners when they share a storage unit and therefore can issue conflicting transactions? For example: two players issue at the same time a move transaction of the same item.
An approach I was thinking about is scratching client-side prediction for shared storage but that adds some overhead to my work as clients at the moment are not aware (code-wise) that a storage unit is shared. Is there a smarter way to do it?