Browse thread
[Caml-list] Cross-platform DBM equivalent?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | David Brown <caml-list@d...> |
| Subject: | Re: [Caml-list] Cross-platform DBM equivalent? |
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