caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: Mikkel Fahn?e J?rgensen <mikkel@dvide.com>
Cc: caml-list@inria.fr
Subject: [Caml-list] Re: mod_ocaml 0.6.0 feedback
Date: Tue, 19 Aug 2003 14:15:56 +0100	[thread overview]
Message-ID: <20030819131556.GB5227@redhat.com> (raw)
In-Reply-To: <004d01c3664c$0e33a880$738c0a0a@spss.com>

On Tue, Aug 19, 2003 at 02:18:52PM +0200, Mikkel Fahn?e J?rgensen wrote:
> Hi Rich,
> 
> I can see that you  have started on a manual for mod_ocaml 0.6.0
> 
> This looks exciting - here is some feedback:
> 
> I'm only starting to work with Apache and I for one do not want to invest
> time on Apache 1.3 when Apache 2.0 is out. Apache 2.0 is required by the
> 'subversion' source control system - for that reason alone I think that many
> will choose Apache 2.0. Apache 2.0 is also the only viable choice for
> Windows servers.
> 
> So I suggest you focus on 2.0. I know the 1.3 market is larger, but by the
> time mod_ocaml matures, Apache 2.x will probably be the standard.
> Initially I wouldn't worry so much about full API coverage as the ability to
> actually run under Apache 2.

The reason for not supporting Apache 2 is simply that I don't know
much about how to port Apache 1.x code to Apache 2. Also I'm a bit
worried about threading issues. (I've CC'd this to the caml-list -
can anyone comment?)

> Another thing:
> 
> Instead of registering 'run' you should register 'initialize', 'run' and
> 'shutdown'.
> You can probably get away without initialize as this is the main function
> running, but you do need a shutdown notification. Otherwise it isn't safe to
> cache handles.

Yup. Actually initialize isn't needed because you get that anyway when
you just put code at the top level of the module, but a shutdown or
on_unload function would be very useful.

> In the future you might want to add 'request_unload' and 'unload' so modules
> can be unloaded after sitting quiet for long periods of time where
> 'shutdown' is an unnegotiable termination of the module, such as a server
> termination.

Unfortunately Dynlink doesn't provide a way to unload modules (can
anyone on caml-list comment?).

If the concern is to free memory used by large structures, or to close
database handles, then the module could register some sort of timer
perhaps and do this themselves? The model I had in mind for database
handles would have a central Dbi module which would manage handing out
and reclaiming database handles, probably by handing out a temporary
value which represents the handle and reclaiming with a finaliser or
explicit "close" function.

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj
Merjis Ltd. http://www.merjis.com/ - all your business data are belong to you.
"My karma ran over your dogma"

-------------------
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


       reply	other threads:[~2003-08-19 13:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <004d01c3664c$0e33a880$738c0a0a@spss.com>
2003-08-19 13:15 ` Richard Jones [this message]
2003-08-19 14:39   ` Alexander V. Voinov
2003-08-21 14:50   ` Xavier Leroy
2003-08-21 15:52     ` Richard Jones

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=20030819131556.GB5227@redhat.com \
    --to=rich@annexia.org \
    --cc=caml-list@inria.fr \
    --cc=mikkel@dvide.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).