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 RAA04337; Thu, 26 Dec 2002 17:50:33 +0100 (MET) 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 RAA03611 for ; Thu, 26 Dec 2002 17:50:32 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gBQGoQH07676; Thu, 26 Dec 2002 17:50:26 +0100 (MET) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA04279; Thu, 26 Dec 2002 17:50:26 +0100 (MET) From: Pierre Weis Message-Id: <200212261650.RAA04279@pauillac.inria.fr> Subject: Re: [Caml-list] Cross-platform DBM equivalent? In-Reply-To: <20021226100537.GD1071@swordfish> from Matt Gushee at "Dec 26, 102 03:05:38 am" To: mgushee@havenrock.com Date: Thu, 26 Dec 2002 17:50:26 +0100 (MET) Cc: caml-list@inria.fr X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 ... 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! Merry Christmas :) Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/ PS: Remember that input_value and output_value are not type safe. Be careful to use some cautious programming methodology, such as the trick I described once in this list, to define your own input and output functions in the same phrase, in order to ensure their provably correlated behaviour. ------------------- 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