ENTRY

[ESC]
1h•W:354

NATS

Im the kind of person who gets Brainworms.

An idea takes hold of me and its like the nuron responsible for encoding that idea is ocer active, inserting this concept into all my thoughts.

One such has been hypermedia of course, another has been the pub/sub framework NATS.

I leaened about it from the guy who wrote data-star. Data-star is his side project, his day job is working at the company that does NATS[1]. He said that most of his impressive demos are due to NATS.

Its a stuid acronym; Neural Autonomic Transport System, which I think they are embarrassed about because Its not in any of the actual documentation, I found it by reading the Wikipedia article.

Essentially its a server which implements a standardised set of protocols, which allows other programs to communicate by subscribing/publish to a subject, or to requiretr/reply on a subject.

A subject is a string that looks like: "something.bar.baz.boo"

A publisher doesn't care if there is a listeners or not, it publishes to a subject snd if no one is interested the server just drops it.

A subscribers calls the servers an regusters their interests, "foo.bar.baz" or with wild cards "foo.*.baz" or "foo.>"

Nats servers themselves can clister together and root messages from publishers to interested consumers. They do this by gossiping a datastructre called an interest grap.

NATS seevers can also export only a subset of its interest graph to creat a "leaf connection*

NATS is used in industrial settings, but its able to achieve form many robust distributed systems with this very basic set of primitives. so learning it feels like learning something much more fundamental then just one pub/sub framework.

it feels like learning about distributed systems in general. It also got me interested in funcitonsl reactive programming (frp) which allows for responsive information systems.

anyway talk to me about nats if ever you want.


footnotes**

  1. Its open source but this company is built around nats consultancy basically, and is the lead contributer. there was even a legal kerfuffle between them and the Cloud Native who stewards the NATS project.
0 replies

Join the conversation