<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div><span>Hi Sergej,</span></div><div><span><br></span></div><div><span>Thanks for the response. It sounds like use case 2 is easier than I thought.</span></div><div><span><br></span></div><div><span>As for Mnesia and use case 1, our thought was twofold:</span></div><div><span><br></span></div><div><span>1. We want ACID compliance. We need to ensure that were all 75 boxes to mysteriously crash, we could bring them back up and not worry about data integrity.</span></div><div><span>2. Our storage needs are likely to become more complex in the future. The daily and total capping amounts will eventually be broken down into a variety of different categories, along with synchronization of which machines bid on a request and if those individual machines won a request (something that we currently cannot do without offline
 aggregation of this data).</span></div><div> </div><div>When you say "<span style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; ">75 machines in a fully connected distributed erlang network is a bit much but it should work." </span><span style="font-size: 10pt; ">could you elaborate on that? It makes me a bit nervous to hear, particularly since we have no Erlang knowledge and just assumed that it was suited for this. Are we thinking about this the wrong way?</span></div><div><span style="font-size: 10pt; "><br></span></div><div><span style="font-size: 10pt; ">Cheers,</span></div><div><span style="font-size: 10pt; ">Ovid</span></div><div>--<br>Live and work overseas - http://www.overseas-exile.com/<br>Buy the book           - http://www.oreilly.com/catalog/perlhks/<br>Tech blog              - http://blogs.perl.org/users/ovid/<br>Twitter                - http://twitter.com/OvidPerl/<br><blockquote
 style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">  <div style="font-size: 10pt; font-family: 'Courier New', courier, monaco, monospace, sans-serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Rapsey <rapsey@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Ovid <curtis_ovid_poe@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> "erlang-questions@erlang.org" <erlang-questions@erlang.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, 18 May 2012, 11:40<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [erlang-questions] Erlang suitability<br> </font> </div> <br><meta http-equiv="x-dns-prefetch-control" content="off"><div id="yiv949386505"><div>75 machines in a
 fully connected distributed erlang network is a bit much but it should work.</div><div>use case 1: Why do you need to store to mnesia and all machines read from it? If you have 75 servers erlang connected, you can just send a simple erlang message to all of them.</div>
<div>use case 2: In a fully connected erlang network you always know which machines are offline/online. Every machine has a name.  If you simply sort all online machines by node name, that is the node you pick to do authentication. No real synchronization required and it will work even if that machine is lost. Or you can hardcode a sequence of machines which ones do the authenticating. First in list that is online is the one that does it.</div>
<div><br></div><div><br></div>Sergej<div><br><div class="yiv949386505gmail_quote">On Fri, May 18, 2012 at 11:00 AM, Ovid <span dir="ltr"><<a rel="nofollow" ymailto="mailto:curtis_ovid_poe@yahoo.com" target="_blank" href="mailto:curtis_ovid_poe@yahoo.com">curtis_ovid_poe@yahoo.com</a>></span> wrote:<br>
<blockquote class="yiv949386505gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-size: 10pt; font-family: 'Courier New', courier, monaco, monospace, sans-serif; "><div><span>Hi there,</span></div>
<div><span><br></span></div><div><span>We've a system that run across 75 servers and needs to be highly performant, fault-tolerant, scalable and shares persistent data across all 75 servers. We're investigating Erlang/Mnesia (which we don't know) because it sounds tailor-made for our situation.</span></div>
<div><span><br></span></div><div><span>We are not using Erlang for our first implementation, but are instead hacking together a solution from known technologies including Perl, MySQL and Redis. We're considering Erlang for our future work.</span></div>
<div><span><br></span></div><div><span>We have two primary needs: Each box can bid on an auction and potentially spend a tiny amount of money and each of the 75 boxes will receive notifications of a small amount of money spent if they
 win the auction (the auction notification will probably not be sent to the box bidding in the auction).</span></div><div><span><br></span></div><div><span>Use case 1: If the *total* of all of those small amounts exceeds a daily cap or an all-time cap, all 75 boxes must immediately stop spending bidding in auctions. It seems that each box can run a separate Erlang process and write out "winning bid" information to an Mnesia database and all boxes can read the total amount spent from that to determine if it should stop bidding.</span></div>
<div><span><br></span></div><div><span>This seems trivial to set up.</span></div><div><span><br></span></div><div><span>Use case 2: we periodically need to reauthenticate to the auction system. We MUST NOT have all 75 boxes trying to reauthenticate at the same time because we will be locked out of the system if we do this. Having a central box handling reauthentication is a single point of failure that we would like to
 avoid, but we don't know what design pattern Erlang would use to ensure that only one of the 75 Erlang instances would attempt to reauthenticate at any one time (all 75 boxes can share the same authentication token).</span></div>
<div><span><br></span></div><div>Use case 1 is clearly perfect for Erlang. Use case 2 is less clear to us. We're going to be spending a fair amount of time hacking together a non-Erlang solution, but the benefit is using known technologies that don't depend on the "one guy who knows the system".</div>
<div><br></div><div>At full scale, we anticipate billions of auctions per day.</div><div> </div><div>Does anyone care to comment about things we should look at? Particularly, is use case 2 not something appropriate for Erlang? A tiny amount of sample code would be lovely (note: I am somewhat comforable with Prolog, so Erlang looks fairly straightforward for me, aside from understanding the message
 passing).</div><div><br></div><div>Cheers,</div><div>Ovid</div><div>--<br>Live and work overseas - <a rel="nofollow" target="_blank" href="http://www.overseas-exile.com/">http://www.overseas-exile.com/</a><br>Buy the book           - <a rel="nofollow" target="_blank" href="http://www.oreilly.com/catalog/perlhks/">http://www.oreilly.com/catalog/perlhks/</a><br>
Tech blog              - <a rel="nofollow" target="_blank" href="http://blogs.perl.org/users/ovid/">http://blogs.perl.org/users/ovid/</a><br>Twitter                - <a rel="nofollow" target="_blank" href="http://twitter.com/OvidPerl/">http://twitter.com/OvidPerl/</a></div>
</div></div><br>_______________________________________________<br>
erlang-questions mailing list<br>
<a rel="nofollow" ymailto="mailto:erlang-questions@erlang.org" target="_blank" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a rel="nofollow" target="_blank" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>
</div><meta http-equiv="x-dns-prefetch-control" content="on"><br><br> </div> </div> </blockquote></div>   </div></body></html>