[erlang-questions] pid to integer and back

Joel Reymont <>
Wed Oct 8 21:15:37 CEST 2008


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.

I'll go with term_to_binary for now and trade packet size for speed.

--
wagerlabs.com








More information about the erlang-questions mailing list