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 PAA05272; Tue, 19 Aug 2003 15:16:27 +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 PAA09388 for ; Tue, 19 Aug 2003 15:16:26 +0200 (MET DST) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h7JDGPf12683 for ; Tue, 19 Aug 2003 15:16:25 +0200 (MET DST) Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 19p6L6-0001Nc-00; Tue, 19 Aug 2003 14:15:56 +0100 Date: Tue, 19 Aug 2003 14:15:56 +0100 To: Mikkel Fahn?e J?rgensen Cc: caml-list@inria.fr Subject: [Caml-list] Re: mod_ocaml 0.6.0 feedback Message-ID: <20030819131556.GB5227@redhat.com> References: <004d01c3664c$0e33a880$738c0a0a@spss.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <004d01c3664c$0e33a880$738c0a0a@spss.com> User-Agent: Mutt/1.5.4i From: Richard Jones X-Loop: caml-list@inria.fr X-Spam: no; 0.00; 2.0.:01 api:01 threading:01 caml-list:01 unload:01 dynlink:01 model:01 dbi:99 freshmeat:01 ltd:98 ocaml:01 handles:01 0200,:01 modules:02 initialize:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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