<div dir="ltr">The whole point of the poker server is to enable web based poker contests / gambling / etc, right?<br><br>if that's true, i think you can't afford to allow guessable game id's.<br>what stops someone from just sending in packets to all the games? since you are using an int (or even erlang pids as binaries) you basically are using sequential numbers for game identifiers.<br>
<br>for something where money is at stake, or even in a contest with prizes of some form. The temptation to hack or even just disrupt will be high.<br><br>or is this a closed network system where clients are controlled?<br>
<br><div class="gmail_quote">2008/10/8 Torben Hoffmann <span dir="ltr"><<a href="mailto:torben.lehoff@googlemail.com">torben.lehoff@googlemail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr"><div class="Ih2E3d"><br><br><div class="gmail_quote">On Wed, Oct 8, 2008 at 9:15 PM, Joel Reymont <span dir="ltr"><<a href="mailto:joelr1@gmail.com" target="_blank">joelr1@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><br>
On Oct 8, 2008, at 8:04 PM, Torben Hoffmann wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Could you try to step one step back and explain a bit about the scenario and the requirements you have for the routing of messages.<br>
</blockquote>
<br></div>
Players connect to a gateway which tells them the server to connect to.<br>
<br>
Once connected, they can request the list of games running. This is a list of _all_ games running across the poker cluster.<br>
<br>
Once players have the game summary, they can request the details, e.g. what seats are occupied, etc.<br>
<br>
I know the id and thus the pid of each player since everything from the client side goes to a matching player process. The issue is that messages are routed to a game by the player process and so the game id in the packet needs to be converted to a pid.</blockquote>
</div><br></div>For this I am almost 100% sure that IP multicast routing would work - the question is if IP multicast is allowed across the internet; I cannot read this from the entry about it in Wikipedia. The basic set-up would be to associate a multicast address with each game and then all that joins the multicast group will receive the messages sent on that address. You could let the gateway manage the multicast address pool and when a player wants to get a list of all games running you return the list of active multicast groups. Then the player can query the games for details... hmmm, this could lead to a lot of noise so it might be necessary to create a "control" layer that deals with queries and such and only use the multicast addresses for the in-game related messages which do need to go to every player at the table.<br>
<br>AMQP would support this as well, but I am not an expert on that protocol. It is based on TCP so there will be no problems with running it over the internet.<br><br>Another question: once a player has joined a table in your implementation couldn't he store the pid for the game once and for all and then route all messages to the game using the stored pid? <br>
<br>Cheers,<br>Torben<br> <br></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br></blockquote></div><br></div>