[erlang-questions] pid to integer and back

David Budworth dbudworth@REDACTED
Wed Oct 8 22:45:48 CEST 2008


The whole point of the poker server is to enable web based poker contests /
gambling / etc, right?

if that's true, i think you can't afford to allow guessable game id's.
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.

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.

or is this a closed network system where clients are controlled?

2008/10/8 Torben Hoffmann <torben.lehoff@REDACTED>

>
>
> On Wed, Oct 8, 2008 at 9:15 PM, Joel Reymont <joelr1@REDACTED> wrote:
>
>>
>> On Oct 8, 2008, at 8:04 PM, Torben Hoffmann wrote:
>>
>>  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.
>>>
>>
>> Players connect to a gateway which tells them the server to connect to.
>>
>> Once connected, they can request the list of games running. This is a list
>> of _all_ games running across the poker cluster.
>>
>> Once players have the game summary, they can request the details, e.g.
>> what seats are occupied, etc.
>>
>> 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.
>
>
> 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.
>
> 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.
>
> 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?
>
> Cheers,
> Torben
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081008/14826d13/attachment.htm>


More information about the erlang-questions mailing list