* [Caml-list] Protobuf for ocaml @ 2018-02-10 18:05 picflo_2 2018-02-10 18:56 ` Kenneth Adam Miller ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: picflo_2 @ 2018-02-10 18:05 UTC (permalink / raw) To: caml-list Hi, I want to use protobuf for an microservice environment where some Services are weiten in ocaml. Looking at the different available solutions, I was wondering whether there is a single one considered the most mature and stable? Thanks a lot, Florian ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] Protobuf for ocaml 2018-02-10 18:05 [Caml-list] Protobuf for ocaml picflo_2 @ 2018-02-10 18:56 ` Kenneth Adam Miller 2018-02-11 0:43 ` Louis Roché 2018-02-10 18:59 ` Daniil Baturin 2018-02-11 12:16 ` SP 2 siblings, 1 reply; 11+ messages in thread From: Kenneth Adam Miller @ 2018-02-10 18:56 UTC (permalink / raw) To: picflo_2; +Cc: caml users [-- Attachment #1: Type: text/plain, Size: 765 bytes --] I think it's probably the one that is a type annotation using [@@deriving ] on your type declaration. You get functions derived by the compiler for you. **Dont use piqi!** It's really terrible code. On Sat, Feb 10, 2018 at 1:05 PM, <picflo_2@web.de> wrote: > Hi, > > I want to use protobuf for an microservice environment where some Services > are weiten in ocaml. > Looking at the different available solutions, I was wondering whether > there is a single one considered the most mature and stable? > > Thanks a lot, > Florian > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > [-- Attachment #2: Type: text/html, Size: 1452 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] Protobuf for ocaml 2018-02-10 18:56 ` Kenneth Adam Miller @ 2018-02-11 0:43 ` Louis Roché 2018-02-11 1:09 ` Kenneth Adam Miller 0 siblings, 1 reply; 11+ messages in thread From: Louis Roché @ 2018-02-11 0:43 UTC (permalink / raw) To: Kenneth Adam Miller; +Cc: picflo_2, caml users Can you give more details please ? > On 11 Feb 2018, at 04:56, Kenneth Adam Miller <kennethadammiller@gmail.com> wrote: > > **Dont use piqi!** It's really terrible code. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] Protobuf for ocaml 2018-02-11 0:43 ` Louis Roché @ 2018-02-11 1:09 ` Kenneth Adam Miller 2018-02-11 2:15 ` Maxime Ransan 0 siblings, 1 reply; 11+ messages in thread From: Kenneth Adam Miller @ 2018-02-11 1:09 UTC (permalink / raw) To: Louis Roché; +Cc: picflo_2, caml users [-- Attachment #1: Type: text/plain, Size: 1223 bytes --] The space complexity is ridiculous (at least X^2, possibly 2^n), it isn't as convenient as any of the others in allowing you to derive your own specs, it's horribly written code that uses ref and doesn't conform to OCaml conventions, it caused a lot of crashing on our end, only works for a particular compile target until I went to update it, the Makefile is an awful unmaintainable and unreadable mess, the language it defines is unnecessary and it's hard to get anything to change. We (me and some team mates) had this forced on us for the features we required, which was to be able to get data in and out of ocaml to other languages, and wanted to use it for a large project. It ended up causing a lot of unnecessary and unwanted slow down in development, both for our cases and for CMU's BAP. They had the same problems, and everyone that has touched it had to do unwanted work trying to get it to reliably do what it advertises. On Sat, Feb 10, 2018 at 7:43 PM, Louis Roché <mail@louisroche.net> wrote: > Can you give more details please ? > > > On 11 Feb 2018, at 04:56, Kenneth Adam Miller < > kennethadammiller@gmail.com> wrote: > > > > **Dont use piqi!** It's really terrible code. > [-- Attachment #2: Type: text/html, Size: 1647 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] Protobuf for ocaml 2018-02-11 1:09 ` Kenneth Adam Miller @ 2018-02-11 2:15 ` Maxime Ransan 2018-02-11 14:15 ` Aw: " picflo_2 0 siblings, 1 reply; 11+ messages in thread From: Maxime Ransan @ 2018-02-11 2:15 UTC (permalink / raw) To: Kenneth Adam Miller; +Cc: Louis Roché, picflo_2, caml users [-- Attachment #1: Type: text/plain, Size: 1789 bytes --] The difference between ppx_deriving_protobuf and ocaml-protoc is that the former generates a protobuf schema from an OCaml type while the later generates the OCaml type from a protobuf schema. They are both using the same runtime library for the binary encoding. Although I have written ocaml-protoc as a personal project, it has been used successfully in a professional context to interface with apache mesos. On Sat, Feb 10, 2018 at 8:10 PM Kenneth Adam Miller < kennethadammiller@gmail.com> wrote: > The space complexity is ridiculous (at least X^2, possibly 2^n), it isn't > as convenient as any of the others in allowing you to derive your own > specs, it's horribly written code that uses ref and doesn't conform to > OCaml conventions, it caused a lot of crashing on our end, only works for a > particular compile target until I went to update it, the Makefile is an > awful unmaintainable and unreadable mess, the language it defines is > unnecessary and it's hard to get anything to change. > > We (me and some team mates) had this forced on us for the features we > required, which was to be able to get data in and out of ocaml to other > languages, and wanted to use it for a large project. It ended up causing a > lot of unnecessary and unwanted slow down in development, both for our > cases and for CMU's BAP. They had the same problems, and everyone that has > touched it had to do unwanted work trying to get it to reliably do what it > advertises. > > On Sat, Feb 10, 2018 at 7:43 PM, Louis Roché <mail@louisroche.net> wrote: > >> Can you give more details please ? > > >> >> > On 11 Feb 2018, at 04:56, Kenneth Adam Miller < >> kennethadammiller@gmail.com> wrote: >> > >> > **Dont use piqi!** It's really terrible code. >> > [-- Attachment #2: Type: text/html, Size: 2684 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Aw: [Caml-list] Protobuf for ocaml 2018-02-11 2:15 ` Maxime Ransan @ 2018-02-11 14:15 ` picflo_2 2018-02-11 15:00 ` Daniil Baturin 2018-02-11 15:01 ` Maxime Ransan 0 siblings, 2 replies; 11+ messages in thread From: picflo_2 @ 2018-02-11 14:15 UTC (permalink / raw) To: Maxime Ransan; +Cc: Kenneth Adam Miller, "Louis Roché", caml users [-- Attachment #1: Type: text/html, Size: 4285 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] Protobuf for ocaml 2018-02-11 14:15 ` Aw: " picflo_2 @ 2018-02-11 15:00 ` Daniil Baturin 2018-02-11 15:01 ` Maxime Ransan 1 sibling, 0 replies; 11+ messages in thread From: Daniil Baturin @ 2018-02-11 15:00 UTC (permalink / raw) To: caml-list [-- Attachment #1.1: Type: text/plain, Size: 889 bytes --] Hi Florian, It took me some time to get over the fact that Protobuf is just a payload encoding protocol: no less, but no more. You can think of it as OSI layer 6 (presentation). Everything else, including reliable (or unreliable) delivery (layer 4), message routing (layer 3), or even the wire protocol are separate concerns. You may want to look into existing message transport solutions such as ZMQ if the situation is more complicated than point to point stateless communication. On 02/11/2018 09:15 PM, picflo_2@web.de wrote: > Hi, > > thanks for all the answers, I will look deeper into ocaml-protoc. > > As a kind of follow-up question. Do you add some kind of unique > identifier to every message to allow resending the message in case > some service goes down? > > Thanks again for the help here I highly appreciate it, > Florian > > [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 862 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] Protobuf for ocaml 2018-02-11 14:15 ` Aw: " picflo_2 2018-02-11 15:00 ` Daniil Baturin @ 2018-02-11 15:01 ` Maxime Ransan 2018-02-11 15:14 ` Aw: " picflo_2 1 sibling, 1 reply; 11+ messages in thread From: Maxime Ransan @ 2018-02-11 15:01 UTC (permalink / raw) To: picflo_2; +Cc: Kenneth Adam Miller, "Louis Roché", caml users [-- Attachment #1: Type: text/plain, Size: 2746 bytes --] Both solution focuses purely on data serialization. The protocol part (choice of transport protocol, service discovery, retries, async vs async..) are expected to be done outside on those library. On Sun, Feb 11, 2018 at 9:15 AM <picflo_2@web.de> wrote: > Hi, > > thanks for all the answers, I will look deeper into ocaml-protoc. > > As a kind of follow-up question. Do you add some kind of unique identifier > to every message to allow resending the message in case some service goes > down? > > Thanks again for the help here I highly appreciate it, > Florian > > > *Gesendet:* Sonntag, 11. Februar 2018 um 03:15 Uhr > *Von:* "Maxime Ransan" <maxime.ransan@gmail.com> > *An:* "Kenneth Adam Miller" <kennethadammiller@gmail.com> > *Cc:* "Louis Roché" <mail@louisroche.net>, picflo_2@web.de, "caml users" < > caml-list@inria.fr> > *Betreff:* Re: [Caml-list] Protobuf for ocaml > The difference between ppx_deriving_protobuf and ocaml-protoc is that the > former generates a protobuf schema from an OCaml type while the later > generates the OCaml type from a protobuf schema. They are both using the > same runtime library for the binary encoding. > > Although I have written ocaml-protoc as a personal project, it has been > used successfully in a professional context to interface with apache mesos. > > > On Sat, Feb 10, 2018 at 8:10 PM Kenneth Adam Miller < > kennethadammiller@gmail.com> wrote: > >> The space complexity is ridiculous (at least X^2, possibly 2^n), it isn't >> as convenient as any of the others in allowing you to derive your own >> specs, it's horribly written code that uses ref and doesn't conform to >> OCaml conventions, it caused a lot of crashing on our end, only works for a >> particular compile target until I went to update it, the Makefile is an >> awful unmaintainable and unreadable mess, the language it defines is >> unnecessary and it's hard to get anything to change. >> >> We (me and some team mates) had this forced on us for the features we >> required, which was to be able to get data in and out of ocaml to other >> languages, and wanted to use it for a large project. It ended up causing a >> lot of unnecessary and unwanted slow down in development, both for our >> cases and for CMU's BAP. They had the same problems, and everyone that has >> touched it had to do unwanted work trying to get it to reliably do what it >> advertises. >> >> On Sat, Feb 10, 2018 at 7:43 PM, Louis Roché <mail@louisroche.net> >> wrote: >>> >>> Can you give more details please ? >> >> >>> >>> > On 11 Feb 2018, at 04:56, Kenneth Adam Miller < >>> kennethadammiller@gmail.com> wrote: >>> > >>> > **Dont use piqi!** It's really terrible code. >>> >> [-- Attachment #2: Type: text/html, Size: 5006 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Aw: [Caml-list] Protobuf for ocaml 2018-02-11 15:01 ` Maxime Ransan @ 2018-02-11 15:14 ` picflo_2 0 siblings, 0 replies; 11+ messages in thread From: picflo_2 @ 2018-02-11 15:14 UTC (permalink / raw) To: Maxime Ransan; +Cc: Kenneth Adam Miller, "Louis Roché", caml users [-- Attachment #1: Type: text/html, Size: 6825 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] Protobuf for ocaml 2018-02-10 18:05 [Caml-list] Protobuf for ocaml picflo_2 2018-02-10 18:56 ` Kenneth Adam Miller @ 2018-02-10 18:59 ` Daniil Baturin 2018-02-11 12:16 ` SP 2 siblings, 0 replies; 11+ messages in thread From: Daniil Baturin @ 2018-02-10 18:59 UTC (permalink / raw) To: caml-list [-- Attachment #1.1: Type: text/plain, Size: 543 bytes --] I'm using https://opam.ocaml.org/packages/ocaml-protoc/ The schema is intentionally handwritten, but ppx_deriving_protobuf can produce input files for protoc if you want to start from that point instead. On 02/11/2018 01:05 AM, picflo_2@web.de wrote: > Hi, > > I want to use protobuf for an microservice environment where some Services are weiten in ocaml. > Looking at the different available solutions, I was wondering whether there is a single one considered the most mature and stable? > > Thanks a lot, > Florian > [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 862 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] Protobuf for ocaml 2018-02-10 18:05 [Caml-list] Protobuf for ocaml picflo_2 2018-02-10 18:56 ` Kenneth Adam Miller 2018-02-10 18:59 ` Daniil Baturin @ 2018-02-11 12:16 ` SP 2 siblings, 0 replies; 11+ messages in thread From: SP @ 2018-02-11 12:16 UTC (permalink / raw) To: picflo_2; +Cc: caml-list Just on the odd chance that protobuf isn't a requirement, you may want to consider MessagePack (with https://github.com/vbmithr/ocaml-msgpck). Used it in production and worked well for us. Ignore this message if this of no interest. -- SP ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2018-02-12 18:42 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-02-10 18:05 [Caml-list] Protobuf for ocaml picflo_2 2018-02-10 18:56 ` Kenneth Adam Miller 2018-02-11 0:43 ` Louis Roché 2018-02-11 1:09 ` Kenneth Adam Miller 2018-02-11 2:15 ` Maxime Ransan 2018-02-11 14:15 ` Aw: " picflo_2 2018-02-11 15:00 ` Daniil Baturin 2018-02-11 15:01 ` Maxime Ransan 2018-02-11 15:14 ` Aw: " picflo_2 2018-02-10 18:59 ` Daniil Baturin 2018-02-11 12:16 ` SP
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox