[erlang-questions] Creating a fault tolerant poker service

Aleksandar Radulovic <>
Mon Mar 10 13:03:15 CET 2014


Hey,

You might want to check out riak_core [1] which looks like it will suit
your needs. With it, you can partition your users, games and whatnot and
distribute work between the nodes. It will also handle node memberships to
the "ring" for you, so you don't have to worry about nodes dropping out and
such. It's actually quite easy to integrate into an existing OTP
application.

[1] - https://github.com/basho/riak_core


Cheers,
alex


On Fri, Mar 7, 2014 at 3:09 AM, Cary Cherng <> wrote:

> What is the idiomatic way to create a fault tolerant poker service with
> Erlang?
>
> One could use a single server type, a bunch of machines for a
> fragmented mnesia table that stores the state of each game. This
> ensures that state is replicated to guard against machine failures.
>
>
> But it still leaves questions open:
>
> * How are games created so that they are load balanced across the
> servers so that cpu usage is relatively even? If game creation goes
> through some special server that also keeps track of where all games
> are so it knows loads on the backends, then that special server is a
> potential single failure point.
>
> * And a similar problem. If a user is disconnected, how does it find
> which games it is part of when it reconnects without some special
> server to track games.
>
>
> I am aware that others have made poker services with Erlang such as
> OpenPoker. But what would be the right idiomatic way of architecting a
> poker service to be resistant to machine failures assuming you were
> starting from scratch?
>
> The questions I asked above imply features that I would expect many
> distributed systems would need. That is a kind of abstract pattern.
> Are there maybe design patterns for these kinds of distributed
> systems?
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>



-- 
a lex 13 x
http://a13x.net | @a13xnet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140310/cbf3deb4/attachment.html>


More information about the erlang-questions mailing list