caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Joel Reymont <joelr1@gmail.com>
Cc: O'Caml Mailing List <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] ocamlnet and kernel poll
Date: Thu, 11 Sep 2008 15:42:12 +0200	[thread overview]
Message-ID: <1221140532.8762.15.camel@flake.lan.gerd-stolpmann.de> (raw)
In-Reply-To: <01677251-3A8D-4DCA-9E39-7D17FAC92645@gmail.com>


Am Donnerstag, den 11.09.2008, 13:43 +0100 schrieb Joel Reymont:
> Suppose I want to build a server that runs on top of ocamlnet and  
> handles 10k+ connections.
> 
> ocamlnet seems to use select exclusively.

There's also netplex in ocamlnet, which is a kind of fork framework. I
don't know which protocol you want to use. For instance, you can arrange
that netplex starts 100 processes and every process handles 100
connections.

> Any suggestions on how to add kernel poll? Is this possible even?

I'm in the middle of changing ocamlnet here, so we can have more
flexibility for choosing the kind of event polling. Look at the svn
version: https://godirepo.camlcity.org/svn/lib-ocamlnet2/trunk/code/

There's a lot of new stuff in the src/netsys directory. In the future,
all polling will be based on the pollset class type
(src/netsys/netsys_pollset.mli). There is currently an implementation
that uses the poll() syscall (src/netsys/netsys_pollset_posix.mli) and
another one for Win32 (src/netsys/netsys_pollset_win32.mli - limited to
sockets and named pipes for now).

As this is a class type you can also go ahead, and implement it for
every kernel mechanism you like, and just you your class instead of the
classes provided by ocamlnet. I'll add some more mechanisms later (any
help is welcome).

You can turn these pollsets into event_system by using
src/equeue/unixqueue2.mli. This is not very much tested, however, and
there is no support for multi-threading yet in this module. Many
ocamlnet modules allow to inject whatever event_system you like to have
(should be all modules in the future).

All this is experimental for now. I have tested it only with small
programs, not with large production systems. But maybe it's an option
for you to use the svn version.

Gerd



> 
> 	Thanks, Joel
> 
> --
> wagerlabs.com
> 
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
> 
-- 
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
Phone: +49-6151-153855                  Fax: +49-6151-997714
------------------------------------------------------------



  parent reply	other threads:[~2008-09-11 13:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-11 12:43 Joel Reymont
2008-09-11 12:51 ` Sylvain Le Gall
2008-09-11 13:42 ` Gerd Stolpmann [this message]
2008-09-11 14:04 ` [Caml-list] " Markus Mottl
2008-09-11 14:37 ` Mattias Engdegård
2008-09-11 15:32   ` Markus Mottl
2008-09-11 15:43     ` Joel Reymont
2008-09-11 15:50       ` Sylvain Le Gall
2008-09-11 16:31       ` [Caml-list] " Markus Mottl
2008-09-24 15:05         ` Rich Neswold
2008-09-24 15:43           ` Gabriel Kerneis
2008-09-26 15:53             ` Rich Neswold
2008-09-24 17:28           ` Markus Mottl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1221140532.8762.15.camel@flake.lan.gerd-stolpmann.de \
    --to=info@gerd-stolpmann.de \
    --cc=caml-list@yquem.inria.fr \
    --cc=joelr1@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).