From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: David MENTRE <dmentre@linux-france.org>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Persistent storage and stability of Marshal?
Date: Tue, 27 Dec 2005 11:17:13 +0100 [thread overview]
Message-ID: <43B114A9.3080301@inria.fr> (raw)
In-Reply-To: <87wthruedp.fsf@linux-france.org>
> 1. Is the Marshal module that much unstable? I have the feeling that
> marhsaled values are compatible between OCaml releases. True or
> false?
True in practice: the last incompatible change was done in 1996...
Still, the Marshal module is not intended for long-term storage of
data that you cannot easily reconstruct from other sources. In
particular, the data format is compressed enough that it is not
possible to salvage data using, say, a text editor. At the very
least, it is prudent to build into your software functions to dump and
restore marshaled data to/from a simpler, textual format. (That's
what I did for SpamOracle's database, which is a marshaled hash table.)
> 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?).
There are two independent questions:
1- How to encode your data into character strings?
2- How to store these strings in persistent storage?
For 2-, you have many options, ranging from flat files (the
traditional Unix way) to full-fledged databases.
For 1-, in addition to the Marshal module, you can also use textual
formats: key-value pairs, XML, Lisp S-expressions, etc. Other
options are XDR or ASN1 encodings.
- Xavier Leroy
next prev parent reply other threads:[~2005-12-27 10:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-27 8:34 David MENTRE
2005-12-27 10:17 ` Xavier Leroy [this message]
2005-12-29 15:30 ` [Caml-list] " 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=43B114A9.3080301@inria.fr \
--to=xavier.leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=dmentre@linux-france.org \
/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