[Haskell-cafe] Looking for architecture/infrastructure advice on coping with thousands of concurrent clients

Wojtek Narczyński wojtek at power.com.pl
Wed Jul 9 18:52:05 UTC 2014


On 09.07.2014 19:40, Isak Hansen wrote:

Thousands of connections, your smartphone wouldn't handle, not to 
mention a server.

> #1 - What's a good way to set up and maintain compressed and encrypted 
> connections from the clients to my cluster? I've been wanting to try 
> out websockets, think that'll do?
>

http://caniuse.com/websockets - WebSockets browser compatibility, caveat 
emptor

> #2 - I'm new to Haskell and would appreciate thoughts on how to store 
> and process game state. Imagine a plain application managing 1000 
> tables of poker, responding to player input (that magically appears) 
> and timer events (e.g. folding players that fail to take action). What 
> data structures and libraries should I be looking at here? Thoughts on 
> concurrency and how I organize program flow?
>

I would spawn a process for each game, and a process for each player.

> #3 - I'm thinking of ZMQ to wire components together. Would I be 
> better off basing my cluster on Cloud Haskell or some other library 
> for distributed work?
>
Erlang/OTP is great, but I have a feeling that something was 'lost in 
translation' to Haskell, and that thing is simplicity. For example, I do 
not understand why such a small cabal package has been split into 
multiple tiny cabal packages. This is the fuel that cabal hell fire 
burns on. Despite this, I would give Cloud Haskell a try. If you don't 
you, will have to rediscover things like supervision hierarchy, not to 
mention timeouts as the first line of defense againtst all kinds of 
concurrency problems. Erlang/OTP really does get certain things right.

-- 
Kind regards,
Wojtek N.


More information about the Haskell-Cafe mailing list