[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Demexp-dev] Re: ONC RPC and HTTP simultaneously in the same server?

From: Gerd Stolpmann
Subject: [Demexp-dev] Re: ONC RPC and HTTP simultaneously in the same server?
Date: Tue, 29 Aug 2006 14:33:03 +0200

Am Dienstag, den 29.08.2006, 13:19 +0200 schrieb David MENTRE:
> [ Could you please keep demexp-dev@ in Cc:, thanks. ]
> Hello Gerd,
> I'm looking at evaluating the complexity to implement *both* ONC RPC and
> HTTP support in my server (currently it uses your rpc package).
> Apparently, ocamlnet supports the HTTP protocol. But I'm wondering if it
> is possible to handle two sockets with different handler for each
> protocol with EQueue. 

Yes, it is. For an example how to use nethttpd with equeue, look into
the example in the ocamlnet distro.

The limitation is that there is no good support for handling large HTTP
requests, i.e. everything must be in memory, or you have to manage to
store such requests in temp files. Large HTTP replies should be no

> Should I use threads? Would you have any advice?

I have good experience using several handlers with the same equeue,
although I did not try yet the combination rpc+httpd.

You should also look into the upcoming ocamlnet2. It includes a flexible
server framework called netplex. Although its focus is multi-processing
you can also do multiplexing and multi-threading with it. The latest
version is here:

Includes already a lot of documentation.

Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
Phone: +49-6151-153855                  Fax: +49-6151-997714

reply via email to

[Prev in Thread] Current Thread [Next in Thread]