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 SAA04212; Thu, 26 Dec 2002 18:08:57 +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 SAA05060 for ; Thu, 26 Dec 2002 18:08:56 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from opus.davidb.org (66-27-72-19.san.rr.com [66.27.72.19]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gBQH8sn29167 for ; Thu, 26 Dec 2002 18:08:55 +0100 (MET) Received: from davidb by opus.davidb.org with local (Exim 3.31 #1 (Debian)) id 18RbV7-0001o1-00 for ; Thu, 26 Dec 2002 09:08:53 -0800 Date: Thu, 26 Dec 2002 09:08:53 -0800 From: David Brown To: caml-list@inria.fr Subject: Re: [Caml-list] Cross-platform DBM equivalent? Message-ID: <20021226170853.GA6891@opus.davidb.org> References: <20021226100537.GD1071@swordfish> <200212261650.RAA04279@pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200212261650.RAA04279@pauillac.inria.fr> User-Agent: Mutt/1.4i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, Dec 26, 2002 at 05:50:26PM +0100, Pierre Weis wrote: > > 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 ... > > As far as I know the best (and simpler) way to do this for reasonable > number of URLs bindings (say thousands but not millions) is to create > a Hashtlbl.t or Map.t and dump it to file using output_value (then > read it back with input_value). In any case, I would start with this > solution, since it provides cross-platform persistency with 4 lines of > Caml code. A fast and easy way to obtain fast and good results! And, with another few lines of code, you can write the new data to a second backup file, and then Sys.rename it onto the first. Is Sys.rename reliable on Windows, though? Dave Brown ------------------- 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