caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Long-term storage of values
@ 2008-02-28 18:41 Dario Teixeira
  2008-02-28 20:01 ` [Caml-list] " David MENTRE
                   ` (6 more replies)
  0 siblings, 7 replies; 30+ messages in thread
From: Dario Teixeira @ 2008-02-28 18:41 UTC (permalink / raw)
  To: caml-list

Hi,

Suppose I have a value of type Story.t, fairly complex in its definition.
I wish to store this value in a DB (like Postgresql) for posterity.
At the moment, I am storing in the DB the marshalled representation
of the data; whenever I need to use it again in the Ocaml programme
I simply fetch it from the DB and unmarshal it.

This works fine; there is however one nagging problem: the marshalled
representation is brittle.  If Story.t changes even slightly, I will
no longer be able to retrieve values marshalled with the old version.

Note that changes to Story.t are likely to be small and will not
invalidate backwards compatibility (e.g., here or there another
variant might be added, but not removed or renamed).

I am therefore looking for an alternative to marshalling that a) does
not suffer from the brittleness problem, and b) is fast.  At the
moment, the best thing that occurs to me is to convert the data into
XML and to store it as such in the DB (the data is easily converted
into XML).

This strikes me as problem bound to be common.  How do you guys typically
solve this sort of situation?  In addition, if the XML route is indeed
the best one, what Ocaml tools would you recommend?  (Again, this is
for an application where speed is of the essence).

Thanks in advance for your input!
Cheers,
Dario Teixeira





      __________________________________________________________
Sent from Yahoo! Mail.
A Smarter Inbox. http://uk.docs.yahoo.com/nowyoucan.html


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2008-03-22 12:14 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-28 18:41 Long-term storage of values Dario Teixeira
2008-02-28 20:01 ` [Caml-list] " David MENTRE
2008-02-28 20:01 ` Thomas Fischbacher
2008-02-28 20:05 ` Mathias Kende
2008-02-28 22:09 ` Basile STARYNKEVITCH
2008-02-29 14:45   ` Martin Jambon
2008-02-29 19:09     ` Jake Donham
2008-02-28 23:42 ` Erik de Castro Lopo
2008-02-29  1:14 ` Brian Hurt
2008-02-29  7:40   ` Gabriel Kerneis
2008-02-29 10:19     ` Berke Durak
2008-02-29 18:05       ` Markus Mottl
2008-02-29 11:44     ` Richard Jones
2008-02-29 14:09       ` Brian Hurt
2008-03-01 14:15   ` Dario Teixeira
2008-03-20 21:03 ` Dario Teixeira
2008-03-20 21:32   ` Martin Jambon
2008-03-20 22:41     ` Dario Teixeira
2008-03-20 23:00       ` Martin Jambon
2008-03-21 14:01         ` Dario Teixeira
2008-03-21 14:28           ` Martin Jambon
2008-03-21 14:34             ` Martin Jambon
2008-03-20 21:42   ` Daniel Bünzli
2008-03-20 22:33     ` Dario Teixeira
2008-03-20 21:43   ` Gerd Stolpmann
2008-03-21 14:37     ` Dario Teixeira
2008-03-21 15:24       ` Richard Jones
2008-03-22 12:14         ` David MENTRE
2008-03-21 16:04       ` Gerd Stolpmann
2008-03-21 10:32   ` Berke Durak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).