English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
ocamlnet and kernel poll
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-09-11 (14:37)
From: Mattias Engdegå rd <mattias@v...>
Subject: Re: [Caml-list] ocamlnet and kernel poll
>Suppose I want to build a server that runs on top of ocamlnet and  
>handles 10k+ connections.
>ocamlnet seems to use select exclusively.
>Any suggestions on how to add kernel poll? Is this possible even?

There is an ocaml wrapper for libevent: http://www.xs4all.nl/~mmzeeman/ocaml/

With that many connections, you may actually benefit from multiple
processors, which in the OCaml world usually means multiple processes.

There's nothing wrong with serving myriads of connections from a
single process, especially when using a strongly typed language, but
parallelism can be useful. On the other hand, one process per
connection may be inefficient as well - a hybrid N:M solution is
probably best.