goadesign / pulse

⚡Streamlined event streaming and distributed worker pools in Go⚡
MIT License
11 stars 2 forks source link

nats jetstream #3

Closed gedw99 closed 1 year ago

gedw99 commented 1 year ago

we could also use nats jetstream instead of redis Or offer both.

the replicated maps pattern looks like a really good match.

Nats can use expsoe web sokets just like the existing redis example: https://docs.nats.io/running-a-nats-service/configuration/websocket https://satish860.hashnode.dev/running-nats-as-websocket-server

here is a simple nats pub sub example: https://github.com/ConnectEverything/nats-by-example/blob/main/examples/messaging/pub-sub/go/main.go


You can embed the NATS server OR run it independently too.

Here is a good example of how Kine does it using nats: https://github.com/k3s-io/kine/tree/master/pkg/drivers/nats/server


NATS has contexts which can make running larger multi-tenant systems possible using the nsc nats tool.

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

raphael commented 1 year ago

That sounds interesting, would be happy to review a PR or more detailed proposal on how that would work for the various packages.