From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id GAA21561; Mon, 21 Jun 2004 06:47:14 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id GAA21723 for ; Mon, 21 Jun 2004 06:47:13 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i5L4lCSH011709 for ; Mon, 21 Jun 2004 06:47:12 +0200 Received: from bourg.inria.fr (bourg.inria.fr [128.93.11.100]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id GAA18101 for ; Mon, 21 Jun 2004 06:47:12 +0200 (MET DST) Received: from basile by bourg.inria.fr with local (Exim 4.34) id 1BcGhe-0007NK-G1 for caml-list@inria.fr; Mon, 21 Jun 2004 06:46:42 +0200 Date: Mon, 21 Jun 2004 06:46:42 +0200 To: caml-list@inria.fr Subject: Re: [Caml-list] mod_caml's bytecode restriction due to Apache or just CGI dyn'linking? Message-ID: <20040621044642.GA28285@bourg.inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040523i From: "Basile Starynkevitch [local]" X-Miltered: at concorde with ID 40D66850.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 caml's:01 basile:01 basile:01 2004:99 caml's:01 read-only:01 hash:01 perfomance:01 shameless:01 ocamlrun:01 libcamlrun:01 fork:01 tenths:01 cristal:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sun, Jun 20, 2004 at 11:38:32PM +0200, James Leifer wrote: > I had a question about mod_caml's design. I understand from the web > page that confining CGIs to bytecode isn't particularly onereous. [...] > > Yet for some applications, native would be useful. For example, for > read-only data that changes only a few times a day, one can pack it in > Ocaml hash tables and get high perfomance queries right in Ocaml. In > such a setup where Ocaml handles both the page layout *and* the > functionality of a db, native code looks a lot more attractive. > > So... Is the limitation to use bytecode due to the desire to support > *dynamic* linking of CGIs or for other reasons? [...] Sorry for the shameless plug - but I think that ocamljit can be used to accelerate a bit such Ocaml propulsed web pages. The GNUmakefile of ocamljit not only build the ocamljitrun executable (a replacement for ocamlrun), but also a libcamljitrun.a which should be a replacement for libcamlrun.a and hence might be useable (at least on x86/linux) with mod_caml. I suppose that mod_caml don't fork a process for every HTTP request (in contrast to a pure CGI approach). This is particularily appropriate for ocamljit since the overhead of bytecode to native machine code translation is much less relevant here. (On pure CGI short runs with ocamljitrun the translation time might be significant - a few tenths of seconds for a "big" bytecode file). Feel free to ask me about any practical problems of using ocamljit with mod_caml (I didn't try, but believe it should be trivial). Ocamljit is available on http://cristal.inria.fr/~starynke/ocamljit.html and requires a recent (ie CVS or future 3.08) ocaml system (source tree with built stuff) Regards. -- Basile STARYNKEVITCH -- basile dot starynkevitch at inria dot fr Project cristal.inria.fr - (temporarily) http://cristal.inria.fr/~starynke --- all opinions are only mine ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners