4 ms·
Stream Compression in NATS
- deleted 3y ago[deleted]
- alexfoo 3y agoDidn't know what NATS is, page doesn't explain it. Tried to click on the Docs link at the bottom of the page but that doesn't work. Stopped looking.
- jvdvegt 3y agoI felt the same but had more luck. I found this comparison in their docs[1]: 'NATS Comparison to Kafka, Rabbit, gRPC, and others'. 1: https://docs.nats.io/nats-concepts/overview/compare-nats https://docs.nats.io/nats-concepts/overview/compare-nats
- Finster 3y agoNot sure that it makes sense to compare NATS to gRPC. Maybe the thinking is because gRPC supports bi-directional streaming? The integrations are wildly different, though.
- paulgb 3y agoNATS is a server for streaming data. It can be used as a pub/sub service like Redis, but it also implements RAFT consensus so that it can be used for globally-ordered, durable streams (more like Kafka). The server itself is a lightweight Go binary and it's much nicer to manage than alternatives.
- lakomen 3y agoNATS is a message broker. It uses TCP or websocket, support "core" messaging aka simple fire and forget messaging, request/response, pub/sub. And then message queues, subscriptions, topics, consumers, memory and replay functionality. Also a MQTT compatible protocol.
- handelaar 3y agoI didn't stop looking and followed link to the version announcement, then went to the front page of nats.io from the top left of that page. And I also still have absolutely no fucking idea what any of this is.
- jjtheblunt 3y agoif you've got a bunch of programs running that want to send messages to one another, in various paradigms and various languages, nats.io may well help you.
- jjtheblunt 3y agohttps://nats.io/about/ https://nats.io/about/
- lakomen 3y agoHonestly, I'm more interested in auth callout, someone making a "how to use this stuff effectively" video and/or article, for dummies, ideally with keycloak. If you look at [0] how does this explain anything? Seems like I need to write a service utilizing NATS which talks to the OIDC server. NATS auth story is a complicated one, and now with auth callout it's even more complicated. What I also quite didn't succeed in were JS client Jetstream consumers, async polling or w/e. All the examples, async or sync would block execution. The regular request/response with microservices went well and straightforward. No issues at all. But writing middleware is also not very pretty, you have to have dedicated functions which you would call in the request handler (or microservice if you will) instead of being able to define a chain of middleware functions. Potejto potato but organization and structure and naming is half the code. And more now you can't rely on http error codes, even if you can use them. Then debugging is difficult, because messages are sent in binary format, and with no middleware to conditionally plug in, it's even more painful. Yeah you could write a dedicated service listening to >.* and printing deserialized JSON payloads but that's also extra work. However dropping the HTTP overhead leads to a lot more throughput. For now I'll stay with HTTP. The reason I experimented with it was there is a company which required NATS knowledge. [0] https://docs.nats.io/running-a-nats-service/configuration/securing_nats/auth_callout https://docs.nats.io/running-a-nats-service/configuration/se...
- wtatum 3y agoSame. I tried out some toy use-cases using nats.js over websocket a few months ago. The prospect of possibly being able to "directly" consume messaging or key/value store from the browser with only a thin gateway between was really interesting to me but I couldn't square up the NATS-internal JWT cookie thing with how you would handle auth in a traditional web-app (OAuth client on a gateway plus a session cookie). I found some threads saying auth callout in 2.10 would solve this and decided to table the project until 2.10 but it's really really unclear how to work through the details of converting a "traditional" OAuth access token into the NATS-specified access token required by the auth callout contract.
- bruth 3y agoAuth callout is post-NATS client authentication, so it would not solve the "auth web flow" for authentication. Instead, the resulting token from that would be set as a cookie that then would be passed into the nats.ws client connection. The auth callout service would use that token to map to the concrete NATS user. The mechanism of doing that is up to the implementation. One option is to manage NATS claims into the OIDC provider (for the user authenticating) and then the auth service would decode that source JWT and extract the NATS claims and generate the NATS user JWT in the response.
- zinclozenge 3y agoI was hoping the blog post would include a tentative roadmap for adding tiered storage.
- bruth 3y agoThis post is about a product for NATS. I presume you are talking about the roadmap after the 2.10 release?
- zinclozenge 3y agoYea, after reading the article I went and read the 2.10 release blog post and then came back and commented as if the article posted was the 2.10 post. That was my mistake.