in reply to A distributed design challenge
You should have a central server that works on the account balance. Make it use UDP or persistent TCP connections.
On the network side, it only has to support 3 actions, which namely are "reserve fund for bidding" (temporarly block that amount of money on the account), "bid has succeded" (remove the blocked amount from spending budget) and "bid has failed" (unblock money and release it for another bid request).
For speed, you could devise some kind of hashing algorithm on the client side to determine which server manages which accounts.
>Take a look at memcached. This is basically a similar system (just not specifically trimmed to your purpose). You might even be able to adapt it to your needs.
|
|---|