Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Pierre Weis <pierre.weis@i...>
Subject: Re: [Caml-list] Cross-platform DBM equivalent?
> Pierre Weis <pierre.weis@inria.fr> 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