| Here is how I handle this at my company. LibreS3 is a product written in pure OCaml [1], using as a backend a cluster running Skylable SX (written in C)[2]: - QA: unit tests written using oUnit, and integration tests by using linked Docker containers. - builds/releases: opam + packages written for Debian and Fedora based distributions. The packages provided on our website are built inside Docker just like all the other packages. Internal beta packages are uploaded to a separate volume/bucket and served via LibreS3 itself. - Pain points: building a package compliant with packaging policy is more complicated because I usually need newer versions, or OCaml libraries that are not yet packaged.
I planned to use opam to generate templates for LibreS3+dependencies but was waiting for the C backend to get packaged upstream first.
My slides from last year list a few more problems that I encountered during development but they aren't an issue currently [4]. The main advantages of OCaml for me are:
- the availability of high-level libraries that makes implementing HTTP APIs simpler (Ocsigen, Cryptokit, atdgen, etc.) - event-driven/non-blocking architecture to support large number of concurrent users (Lwt) - native binaries and static type system - not having to look for certain bugs in my code like uninitialized variables, NULL dereferences, memory leaks or memory corruption bugs; which (used to) take up a significant amount of time when developing applications in C (although tooling on C side have improved with valgrind, clang -fsanitize= and Coverity). That doesn't mean that code written in OCaml or the libraries that I use doesn't have bugs, I track them down
and provide patches just as I would for a C library.
Although perhaps writing code in OCaml has made me somewhat overconfident in my code, and I find bugs in other people's code more easier than in mine even if I'm not looking for them. [1] http://gitweb.skylable.com/gitweb/?p=libres3.git;a=summary http://www.skylable.com/products/libres3 [2] http://gitweb.skylable.com/gitweb/?p=libres3.git;a=tree;f=li... [3] http://www.skylable.com/products/sx [4] https://ocaml.org/meetings/ocaml/2014/ocaml2014_13_slides.pd... |
> Although perhaps writing code in OCaml has made me somewhat overconfident in my code
Many Ocamlers could be caught of overconfidence. It's hard to understate how ML typing help seeing the data flow.