caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Basile Starynkevitch [local]" <basile.starynkevitch@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] mod_caml's bytecode restriction due to Apache or just CGI dyn'linking?
Date: Mon, 21 Jun 2004 06:46:42 +0200	[thread overview]
Message-ID: <20040621044642.GA28285@bourg.inria.fr> (raw)
In-Reply-To: <r77zn6xewpz.fsf@muscadet.inria.fr>

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


  parent reply	other threads:[~2004-06-21  4:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-20 21:38 James Leifer
2004-06-20 23:07 ` Richard Jones
2004-06-21  7:18   ` James Leifer
2004-06-21  4:46 ` Basile Starynkevitch [local] [this message]
2004-06-21  7:33   ` James Leifer
2004-06-21  7:51     ` Basile Starynkevitch [local]

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=20040621044642.GA28285@bourg.inria.fr \
    --to=basile.starynkevitch@inria.fr \
    --cc=caml-list@inria.fr \
    /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).