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 OAA26215; Fri, 27 Dec 2002 14:20:07 +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 OAA26214 for ; Fri, 27 Dec 2002 14:20:06 +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 gBRDJnH08859; Fri, 27 Dec 2002 14:19:49 +0100 (MET) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA25223; Fri, 27 Dec 2002 14:19:48 +0100 (MET) From: Pierre Weis Message-Id: <200212271319.OAA25223@pauillac.inria.fr> Subject: Re: [Caml-list] Cross-platform DBM equivalent? In-Reply-To: from Dmitry Bely at "Dec 26, 102 10:20:22 pm" To: dbely@mail.ru (Dmitry Bely) Date: Fri, 27 Dec 2002 14:19:48 +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 > Pierre Weis writes: > > >> > >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! > > Can marshalling functions output be different for different versions of > Ocaml? If I try to feed incompatible data (e.g. form the previous version) > to input_value, what I will have then - segfault? If so, they can hardly be > used for saving configuration data. > > - Dmitry Bely There is is no warranty from the language definition, nor from the implementor team, that the marshalling functions will never be modified: imagine we find a new way to get data files much more compact, then yes, sure, we will implement this new scheme as soon as possible! However, the modification of the output of marshalling functions is a dramatic event, and in case of dramatic events the Caml team very often provide translation programs fro the users. In the unlikely event that the implementors do not provide such a tool, I'm pretty sure that somebody in this list will rapidly contribute something useful to translate from the old to the new format :) All the best for the next year, Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/ ------------------- 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