Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Cross-platform DBM equivalent?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-12-26 (16:50)
From: Pierre Weis <pierre.weis@i...>
Subject: Re: [Caml-list] Cross-platform DBM equivalent?
> 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,,

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 Archives:
Bug reports: FAQ:
Beginner's list: