gofr-dev / gofr

An opinionated GoLang framework for accelerated microservice development. Built in support for databases and observability.
https://gofr.dev
Apache License 2.0
3.57k stars 233 forks source link

PUBSUB: nats jetsream #140

Closed gedw99 closed 10 months ago

gedw99 commented 10 months ago

Could def add a NATS Jetstream one.

https://docs.nats.io/nats-concepts/jetstream

it replaces Kafka and can also use Avro serialisation...

https://github.com/nats-io/nats-server is the server

https://github.com/nats-io/nats.go is the golang client

https://github.com/nats-io/nsc security setup

gedw99 commented 10 months ago

nats can an also replace Redis btw.

Go-coder-go commented 10 months ago

@gedw99 NATS and Kafka differ in their core architecture, supported patterns, scalability, protocols, and footprints. As far as I know, NATS is a great choice for transactional use cases, while Kafka is more suitable for analytical workloads where ingesting large amounts of data in real-time is required. Kafka’s robustness does come with a high price of a large footprint, and great management overhead. On the other hand, NATS is designed for transactional use cases where high performance and low latency are crucial. NATS is also fairly easy to operate but does require constant tunings to reach scale. As with every technology, it all depends on the use case. Out-of-the-box NATS will be a great choice for transactional use cases, and Kafka for more analytical use cases. Thanks for suggesting this though, we can consider integrating this in the framework to handle more use-cases.

gedw99 commented 10 months ago

That’s a decent summary of the differences.

Nats got a massive speed up about 2 months ago. They focussed on the state engine so that it is much faster.

anyways let me know if I can help

aryanmehrotra commented 10 months ago

Closing this issue, as there is no actionable item on it.