From: David MENTRE <dmentre@linux-france.org>
To: caml-list@inria.fr
Subject: Persistent storage and stability of Marshal?
Date: Tue, 27 Dec 2005 09:34:58 +0100 [thread overview]
Message-ID: <87wthruedp.fsf@linux-france.org> (raw)
Hello,
I need to implement some kind of persistent storage in my application
(demexp web proxy part and demexp server part), so I'm looking at the
different possible alternatives.
Roughly, I've found:
- Dbm standard module of OCaml: file storage, no external dependency,
safe?
- Berkeley DB 4.x interface[1]: file storage, seems safe;
- SQL database[2]: real database, complicated to setup, safe.
Right now, I don't have big needs: few tables of moderate size (below
100,000 records) so I'm in favor of simple solutions: Dbm or Berkeley DB
(no need to setup an external SQL server). I need to lookup values
through known keys. The key and stored data are simple records of
strings and integers. In the future, I might need to lookup rows
according to certain field value.
Looking at code using Berkeley DB, I noticed that stored key and data is
made using the Marshal module. However, Marshal doc says that
marshalling is "compatible across all machines for a given version of
Objective Caml", so there might be issues when changing OCaml version.
So my questions:
1. Is the Marshal module that much unstable? I have the feeling that
marhsaled values are compatible between OCaml releases. True or
false?
2. Any advice on implementing persistent storage? I know about Persil
library[3] but I don't see much advantage of using it (does it
implement its own marshaling, more stable than Marshal?).
Best wishes,
d.
Footnotes:
[1] http://www.eecs.harvard.edu/~stein/ocamlbdb-4.3.21.tar.gz
[2] OCamlDBI: http://caml.inria.fr/cgi-bin/hump.fr.cgi?contrib=381
[3] http://cristal.inria.fr/~starynke/persil/
--
pub 1024D/A3AD7A2A 2004-10-03 David MENTRE <dmentre@linux-france.org>
5996 CC46 4612 9CA4 3562 D7AC 6C67 9E96 A3AD 7A2A
next reply other threads:[~2005-12-27 8:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-27 8:34 David MENTRE [this message]
2005-12-27 10:17 ` [Caml-list] " Xavier Leroy
2005-12-29 15:30 ` N. Owen Gunden
2005-12-27 20:35 ` Florian Weimer
2005-12-28 9:00 ` David MENTRE
2005-12-28 9:03 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wthruedp.fsf@linux-france.org \
--to=dmentre@linux-france.org \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox