Readers of DZone may already be quite familiar with NATS. Many excellent articles from developers using NATS for everything ranging from microservices messaging to IoT and cloud-native deployments have been published on Dzone.
Specific examples are very helpful, and Oren Golan published an excellent piece on his blog this past weekend sharing an example of how Micro and NATS are providing microservices for financial modeling and Bitcoin visualization in a project John Nguyen is working on. You can read Oren's post below -- I've also added a few useful links on Micro at the end:
Micro is a set of utilities and libraries that makes it easier to write and manage microservices. It was written and maintained by Asim Aslam, a developer from London who is getting help from an enthusiastic community.
A microservice written for Micro can be written in any language, but it's easier to write it in Go (until ports of Micro will be available in other languages). For non-Go microservices, there exists the Sidecar (an HTTP proxy into the microservice) to handle this situation.
Microservices often typically communicate with JSON but micro uses protobuf encoding by default. Protobufs offer solid serialization capabilities, static types, and can be used to also declare the API of a specific microservice.
By default, the messages are sent over HTTP, but a message broker (RabbitMQ, Kafka, NSQ, etc.) can allow improvements on top of this such as persistence, scalability, or reliability. In this case, we use NATS since it's very simple, fast, and lean. It also has enough functionality to act as transport, broker and registry (the latter due to its broadcast queries). More information can be found at Asim's blogpost.
John Nguyen, an Australian developer, uses Micro to collect and visualize financial instruments (Bitcoin and foreign exchange). I asked him to demo his setup and we recorded it in a 30-minute video: