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 LAA27696; Thu, 26 Dec 2002 11:05:46 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA27533 for ; Thu, 26 Dec 2002 11:05:45 +0100 (MET) Received: from swordfish ([216.241.35.41]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gBQA5in22887 for ; Thu, 26 Dec 2002 11:05:44 +0100 (MET) Received: from matt by swordfish with local (Exim 3.35 #1 (Debian)) id 18RUtW-0000bu-00 for ; Thu, 26 Dec 2002 03:05:38 -0700 Date: Thu, 26 Dec 2002 03:05:38 -0700 From: Matt Gushee To: caml-list@inria.fr Subject: Re: [Caml-list] Cross-platform DBM equivalent? Message-ID: <20021226100537.GD1071@swordfish> Reply-To: Matt Gushee Mail-Followup-To: caml-list@inria.fr References: <20021226071747.GC1071@swordfish> <3E0AC045.3080307@baretta.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E0AC045.3080307@baretta.com> User-Agent: Mutt/1.3.27i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, Dec 26, 2002 at 09:39:33AM +0100, Alessandro Baretta wrote: > > >I am developing an application that needs fast access to persistent > >configuration data, and I thought that DBM might be a good way to > >provide that functionality ... > > Are you sure you need DBM to reed in a config file? Would > the Scanf module not serve your purpose? Am I sure? No, I'm not sure of much of anything at the moment; as I said, the project is at a very early stage. But I'm concerned about not so much reading a config file as *accessing configuration data at runtime*. Let me try to clarify this a little. As I said, this is a web application; its purpose is to generate on-the-fly graphs (bar graphs, line graphs, pie charts, etc.) of numerical data (which will probably come from a relational database in most cases). And I intend it eventually to be usable by not-very-technical people. The way this is supposed to work is that when a client requests a certain URL representing a generated image, my application obtains a mapping from the requested URL to the process that generates the image. Generally speaking, the process will consist of querying a data source and passing the results to a library function that generates a graphic. Anyway, the configuration data my question referred to is the mapping of URLs to processes. The URLs are defined by the user, and there is potentially a large set of them. But for each request, the HTTP handler needs to discover how to process one of those many URLs. So it's a matter of fast random access to the configuration data, and DBM seems to me a pretty good way to achieve that. (I should also note that at this prototype stage, I am planning to deploy the handler as a simple CGI program. I expect that for production releases it would be preferable to have a long-running process that talks to the web server through the JServ protocol or some such thing; in that case it would probably be best to read in the URL map at startup and just keep it in memory. But I'm trying to achieve visible results as soon as possible, so I'd rather keep the handler component simple for the moment). -- Matt Gushee When a nation follows the Way, Englewood, Colorado, USA Horses bear manure through mgushee@havenrock.com its fields; http://www.havenrock.com/ When a nation ignores the Way, Horses bear soldiers through its streets. --Lao Tzu (Peter Merel, trans.) ------------------- 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