From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Dario Teixeira <darioteixeira@yahoo.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Long-term storage of values
Date: Fri, 21 Mar 2008 17:04:52 +0100 [thread overview]
Message-ID: <1206115492.8488.16.camel@flake.lan.gerd-stolpmann.de> (raw)
In-Reply-To: <905079.47901.qm@web54602.mail.re2.yahoo.com>
Am Freitag, den 21.03.2008, 14:37 +0000 schrieb Dario Teixeira:
> > No, there is a generator for that in Ocamlnet. ocamlrpcgen can be used
> > to generate these functions.
>
> Hi,
>
> If I remember correctly, the model with XDR+rpcgen is that the data type
> is defined in a special XDR notation, which ocamlrpcgen will then use to
> generate the Ocaml type and the (de)serialisation functions. Though XDR
> offers a fairly rich type set, it's not quite as versatile as Ocaml's.
No, but it's ok. There are products, sums, sequences, and options. What
you cannot do is to marshal cyclic data - this is a limitation XDR
shares with most other external representations. There's also no notion
of objects.
> I just wonder if this will lead to situations where one would rather
> write the (de)serialisation functions by hand instead of relying on
> the poorer expressiveness of the automatic generators.
This may be an issue. Currently, ocamlrpcgen understands only a few
annotations that modify the O'Caml type the XDR type is mapped to.
In the past months, I wrote Hydro, which is a library for another RPC
protocol called ICE. Hydro bases on my SunRPC efforts, and improves on a
number of its limitations. In Hydro, it is possible to annotate an ICE
type with an O'Caml function that converts it into a more pleasuring
representation. This allows to fix most shortcomings of the built-in
mapping to O'Caml types. Something similar could be done for XDR.
I wouldn't recommend Hydro for storing values, because its model is
OO-centric, and there is some impedance mismatch between the OO approach
and O'Caml's type system. Except you have cyclic values, because ICE can
represent that. (If you got curious: http://oss.wink.com)
> Btw, do you have any numbers concerning XDR performance? My guess
> is that this would be the fastest method after Marshalling.
I don't have numbers. The O'Caml implementation is definitely slower
than the C code generated by rpcgen. However, the company I'm currently
working for uses this implementation for a high-performance cluster of
servers, and we never even thought about the XDR speed. It never
mattered.
Gerd
--
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany
gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de
Phone: +49-6151-153855 Fax: +49-6151-997714
------------------------------------------------------------
next prev parent reply other threads:[~2008-03-21 16:04 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-28 18:41 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 [this message]
2008-03-21 10:32 ` Berke Durak
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=1206115492.8488.16.camel@flake.lan.gerd-stolpmann.de \
--to=info@gerd-stolpmann.de \
--cc=caml-list@yquem.inria.fr \
--cc=darioteixeira@yahoo.com \
/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