Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: A distributed design challenge

by cavac (Parson)
on Jun 29, 2012 at 20:49 UTC ( [id://979181]=note: print w/replies, xml ) Need Help??


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.

"You have reached the Monastery. All our helpdesk monks are busy at the moment. Please press "1" to instantly donate 10 currency units for a good cause or press "2" to hang up. Or you can dial "12" to get connected directly to second level support."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://979181]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-23 19:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found