Collaboration platform for small teams in OCaml?

Have we something in Ocaml (hence extensible in OCaml) able to replace something like Telegram/Signal/Whatsapp?

Something that is off the shelf or a framework with a few templates to quickly get started.

Discourse (used for ; programmed in Ruby) is more for a forum with dedicated topics and categories.

I need something with a main discussion thread with automatic hyperlinks and documents storing (pdf, audio, video + related players), and mini side threads to handle detailed discussions.

It can be full web (with just a browser a s client), or provides iOS/android/etc. clients.


1 Like

The closest I can think of is @Gopiandcode 's OCamllot ActivityPub server.

1 Like

I can read in GitHub - Gopiandcode/ocamlot: An Activitypub server in OCaml! :

As with most non-mainstream activitypub servers, it’s currently in very experimental status!

The usability is what it is. But the main risk is an outage that makes users very angry and reject the service, asking for some whatsapp/telegram/signal app.

Maybe the author can explain what we can do and not do in production with ocamlot, and what to care about?

I can see attached images but not displayed attached images. Is it possible ?
I can’t see an example of discussion as usual with Signal or whatever.

I’m having a look at ActivityPub to gain better understanding of this protocol.

Maybe Matrix?

I did say ‘the closest I can think of’ :slightly_smiling_face:

OCamlot is, as you saw, experimental software and anyone running it in production would basically be taking on all the risk and support burden themselves.

If you want a communication platform that should not ever go down, the only thing that can possibly deliver that is the BEAM platform i.e. Erlang/Elixir (used by WhatsApp backend): Pleroma / pleroma · GitLab

1 Like

It’s questionable why you want something in OCaml specifically? I’m not aware of any such system implemented in OCaml, and, furthermore, besides an ideological win of using OCaml in the backend, it’s not clear why these existing platforms wouldn’t work.

If your goal is extensibility in OCaml then it would probably be more practical to use the existing integration APIs, and write a bot or something (GitHub - nv-vn/TelegraML: OCaml implementation of the Telegram Bot API, GitHub - Leonidas-from-XIV/slacko: A neat interface for Slack).

Alternatively, if you want to self host, there are options like Zulip, Matrix, Mattermost etc which are battle-tested and used for several large communities. These are mostly written in Python, but using tools like pyml, you can easily write OCaml code that integrates with them.


Thanks for the mention @yawaramin !

Although, that being said, I wouldn’t recommend Activitypub as a protocol for @Luc_ML 's purposes. The key benefit of Activitypub is being able to interoperate with other servers — in this case, the features being requested (a main discussion thread, documents storing, side threads), are really orthogonal to the features provided by Activitypub, so it’s probably better to stick to a system dedicated to those features.


There are some XMPP libraries and projects in OCaml:

  • jackline: a TUI client by @hannes that supports OTR in pure OCaml.
  • xmppl: A cross-platform XMPP library that also works in the Web (via js_of_ocaml and WebSockets). I’ve used it for experiments towards a collaborative platform for complex data: GeoPub

I need something with a main discussion thread with automatic hyperlinks and documents storing (pdf, audio, video + related players), and mini side threads to handle detailed discussions.

From the protocol side, XMPP can support all this. See projects such as Movim, Libervia or openEngiadina.

XMPP has a bit of a bad reputation for being old and using XML. But imho, it works, it’s well specified and complexity seems to be order-of-magnitudes lower than modern and shiny things like Matrix.

It wouldn’t be so hard to implement a XMPP server in OCaml (in an Unikernel!), but you can also use production-ready and mature servers like ejabberd or prosody.


For completeness there is an OCaml Matrix implementation ocaml-matrix that works but is in-complete and could use more contributors. It uses Dream and Irmin not top of MirageOS.