Re: [Caml-list] mod_caml's bytecode restriction due to Apache or just CGI dyn'linking?

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