caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] [ANN] capnp-ocaml 1.0.0
@ 2014-07-07 13:46 Paul Pelzl
  2014-07-07 15:10 ` Peter Zotov
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Pelzl @ 2014-07-07 13:46 UTC (permalink / raw)
  To: OCaml Mailing List

[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]

I'm pleased to announce the first release of capnp-ocaml:
https://github.com/pelzlpj/capnp-ocaml

Cap'n Proto is a multi-language serialization framework which uses code
generation techniques in a manner similar to Protocol Buffers. Its
distinguishing feature is that there is no explicit parsing/serialization
step: the on-the-wire message format is also designed to serve as an
efficient in-memory data structure representation.

The capnp-ocaml code generator plugin emits pure OCaml code which is
functorized over the underlying message format. At present, a 'bytes'-based
message format is provided for ease of use with file and socket I/O. In the
future, a Bigarray message format could be easily provided; this would lend
itself to a straightforward method for sending and receiving messages via
an mmap'd shared memory region.

Q: Why would I want to use this over sexplib/bin-prot?
A: These projects provide superior language-level integration, but
capnp-ocaml is a better choice if you care about language portability.

Q: Why would I want to use this over Protocol Buffers?
A: Cap'n Proto has the clear advantage of first-class sum types, which are
mapped to OCaml variants in a straightforward fashion. You also find
yourself intrigued by the potential for better performance and
zero-overhead shared-memory message passing.

capnp-ocaml is available on OPAM as package "capnp".

Paul

[-- Attachment #2: Type: text/html, Size: 1711 bytes --]

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

* Re: [Caml-list] [ANN] capnp-ocaml 1.0.0
  2014-07-07 13:46 [Caml-list] [ANN] capnp-ocaml 1.0.0 Paul Pelzl
@ 2014-07-07 15:10 ` Peter Zotov
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Zotov @ 2014-07-07 15:10 UTC (permalink / raw)
  To: caml-list

On 2014-07-07 17:46, Paul Pelzl wrote:
> Q: Why would I want to use this over Protocol Buffers?
> 
> A: Cap'n Proto has the clear advantage of first-class sum types, which
> are mapped to OCaml variants in a straightforward fashion. You also
> find yourself intrigued by the potential for better performance and
> zero-overhead shared-memory message passing.

I want to note that ppx_protobuf provides an efficient mapping for
OCaml's sum types, which would map to most well-designed protocols
naturally.

   https://github.com/whitequark/ppx_protobuf#variants

-- 
Peter Zotov
sip:whitequark@sipnet.ru


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

end of thread, other threads:[~2014-07-07 15:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-07 13:46 [Caml-list] [ANN] capnp-ocaml 1.0.0 Paul Pelzl
2014-07-07 15:10 ` Peter Zotov

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).