bagashiz / portfolio

Class-less personal portfolio & resume website built using Go, Templ, HTMX, and styled with Pico CSS.
https://bagashiz.xyz
MIT License
6 stars 0 forks source link

replace keyDB with NATS #11

Open gedw99 opened 3 months ago

gedw99 commented 3 months ago

you can fully replace keyDB with NATS Stream. https://github.com/nats-io

Its 100% golang and fully open. It can scale globally to multi data center in a multi master fashion.

The KV store is a close match to KeyDB https://docs.nats.io/nats-concepts/jetstream/key-value-store

server: https://github.com/nats-io/nats-server client: https://github.com/nats-io/nats.go

you can also embed the server easily so it starts uo with anything else.

examples at https://natsbyexample.com/

You can also use their hosted solution for free too https://www.synadia.com/cloud/

gedw99 commented 3 months ago

https://github.com/infogulch/xtemplate/tree/master/providers is a HTMX with NATS BTW

might be useful

bagashiz commented 3 months ago

Thanks for taking a look at my project! I really appreciate the suggestion for NATS Jetstream as a KV store alternative.

In my current setup, using KeyDB seems sufficient for rate limiting the 3rd party API and staying within their quota limits. Would there be any specific benefits to switching to NATS Jetstream in this scenario?

gedw99 commented 2 months ago

do you know nats at all ?

there are significant benefits and its really a long list to write here.

NATS Jetstream. can run anywhere. On Cloud or at Edge or embedded in any golang project. The NATS Jetstream KV is reactive. NATS hags full security model.

Best you look at their docs and code.

https://github.com/synadia-io/rethink_connectivity is a decent resource too.