OCaml client for the NATS messaging system.
Warning
In active development!
nats_ocaml
is an open-source project and contributions are very welcome! Let's make a greate ecosystem together! Please make sure to read contributing guide
OCaml client for NATS, the cloud native messaging system.
License: Apache License 2.0
OCaml client for the NATS messaging system.
Warning
In active development!
nats_ocaml
is an open-source project and contributions are very welcome! Let's make a greate ecosystem together! Please make sure to read contributing guide
Release tag/build
A subscription system needs to be designed. How it should look like and how it should work.
Ideas that come to mind
client#sub ~subject"FOO.*" (fun event -> ...)
client#listen (fun any_event -> ...)
A real-world example would be nice. And a list of tasks that need to be covered.
Some suggestions for improving library's API.
(* now *)
Client.connect host port
(* with labeled arguments *)
Client.connect ~host ~port ()
You can also set defaults for them
(* now *)
let connect host port = ...
(* with defaults *)
let connect ?(host = default_host) ?(port = default_port) () = ...
let conn = Client.connect (module struct
let host = ..
let port = ...
end)
Automatically close a resource
(* now *)
let conn = Client.connect ()
...
Client.close conn
(* with with_connect *)
Client.with_connect ... @@ fun conn ->
...
(* object *)
Client.with_connect ~host ~port (fun conn ->
conn#pub "FOO")
(* first-class module *)
Client.with_connect ~host ~port (fun (module Conn) ->
Conn.pub "FOO")
(* now *)
type 'a t = { sockaddr : sockaddr; socket : Lwt_unix.file_descr }
(* should be *)
type 'a t
Module signatures hide internal implementation.
In some cases you can use unsafe functions (read this)
(* now *)
let msg : bytes = Bytes.of_string message
(* better performance *)
let msg = Bytes.unsafe_of_string message
๐ต
Prefer monadic syntax let*
, let+
, or ppx_lwt
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.