27,000 Concurrent Erlang Poker Games

In the past six weeks, Joel Reymont has rewritten a large part of his online poker software engine in Erlang, with some impressive results:

I have a PowerBook G4 1.25Ghz with 512Mb of memory. Running 27K games consumes about 600Mb of memory and takes around 15 minutes per 10K games due to heavy swapping. I gave “top” a cursory look so this is a probably reason. Each game runs in about 0.02 to 0.07 seconds, depending on the number of games running.

Erlang has long been on my list of languages to learn, but I don’t expect to get to it any time soon. SICP first, then CTM. If I haven’t died of old age by then (given my current pace, I’d put the odds around 50:50), I might just take up Concurrent Programming in ERLANG.

FYI, Joel’s engine was formerly programmed in Common Lisp. (via Chris Double)