How would you do OCaml <=> Elixir/Erlang <=> OCaml communication?

Hi, I’m building an application with the following infrastructure:

  1. OCaml native as an erlang port
  2. Elixir/Phoenix for transport/orchestration layer
  3. OCaml on the frontend (probably a mix between js_of_ocaml and bucklescript)

I’m trying to decide on the easiest way to do this and currently my best guess is Apache Thrift, as it (in theory) supports things like Maps, Sets etc. which I heavily use

Obviously, I’d like to be able to transfer types information between the OCaml environments, but I’d also like to be able to do (light) modifications in Elixir

Special shoutout to @OvermindDL1 and @xvw (as I’ve read your writings on OCaml in other threads).

3 Likes

Sounds great is it open source?

Not the whole project, no. But maybe some libraries will be.

Why not just use the erlang term format? Thrift is awesome if a bit wordy at times though. :slight_smile:

1 Like

Yep for example this library: https://github.com/okeuday/erlang_ml

1 Like