Poker appliance

Joel Reymont <>
Fri Apr 1 19:39:24 CEST 2005


Dear Erlang experts,

After a lot of false starts /see my signature/ I think that Erlang is the
best choice for writing my poker backend. I was struggling to figure out
how to scale the server to 10k users and I think I should be thinking
hundreds of thousands now. Go Erlang! 

I like the fact that Erlang makes it easy to model and implement games
and tournaments and timed state machines. I truly lament not picking
Erlang earlier.

I sincerely hope to come up with a scalable "poker appliance", a
technology that will make me the next Bluetail, to be bought by the poker
version of Alteon :D. I harbor plans of world domination! I'm truly
enjoying the process and doing this both for technical chops as well as
the future money.

The poker client is a giveaway and I'll write it in Python and make the
source code available. After some poking around I found that I can use
Py_Interface but I still have some crucial design questions...

I think I'll leave the fault-tolerance, load balancing, etc. for after-
beta since it seems reasonably straightforward to implement if I start by
using gen_server and other necessary parts of OTP. My most pressing
questions are related to state machine and server implementation. 

Given that my remote nodes will be Python clients, what kind of behavior
should I choose for my server? Should I pick gen_server or gen_tcp? I
have yet to read through several years of mailing list archives as well
as all the documentation so please feel free to point me around and let
me know if I should just read the manual.

I see the poker game as a state machine that transitions from waiting for
at least X players to join, assigning button and blinds, gathering
blinds, dealing cards, etc. I have the whole engine implemented and
tested in Lisp using continuations (the Arnesi CPS transformer). 

All requests to clients are timed and if a player does not respond within
a given time then they are forced to take action (call a bet or fold).
Players themselves have state. They can be logged in or not
authenticated. They can be watching a game or playing. 

I read through the plain fsm thread and I'm not quite sure if I should go
with gen_fsm or plain fsm. I'll appreciate your advice here. 

Also, do I need gen_tcp in this case or should I use gen_server? Does it
even matter?

Last but not least, my communications should be encrypted. I read how I
can establish inter-node SSL connections but I'm somewhat at a loss
regarding how to connect the Python side.

    Thanks in advance, Joel

-- 
http://wagerlabs.com/tech





More information about the erlang-questions mailing list