[ANN] nsq-ocaml

Hi

I’ve just pushed an initial version of nsq-ocaml to GitHub, which is a client library for the NSQ messaging platform.

The code can be found here: https://github.com/ryanslade/nsq-ocaml

This is the first significant library I’ve written in OCaml so any advice on ways to improve it would be greatly appreciated. There are still quite a few features I’d like to add but the basics are working.

Pull requests and issues welcome!

Cheers
Ryan

8 Likes

Given the state of concurrency in Ocaml, I would break the API up into a pure one, which takes bytes and gives back a list of frames and one that takes frames and gives back bytes. That way a user can utilize whatever concurrency layer makes sens for them (perhaps no concurrency at all if they just are reading and writing a single socket. An example of this style can be seen in ocaml-tls Engine module. @dbuenzli also has several examples of how to do this which he makes use of in, for example, his Unicode libraries.

1 Like

Just thought I’d let everyone know that nsq-ocaml is now available on opam:

https://opam.ocaml.org/packages/nsq/

2 Likes