Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nats Jetstream extension #22

Open
gedw99 opened this issue May 12, 2024 · 4 comments
Open

Nats Jetstream extension #22

gedw99 opened this issue May 12, 2024 · 4 comments

Comments

@gedw99
Copy link

gedw99 commented May 12, 2024

Basically like https://github.com/Renerick/htmx-signalr but for nats jetstream .

just putting it out there to see if there is much interest

https://github.com/synadia-io/rethink_connectivity If you don’t know hat NATS Jetstream is. Its basically a Message Queue that can react to changes and push updates to clients.

@nickchomey
Copy link

This would be great

@Telroshan Telroshan added the enhancement New feature or request label Jul 10, 2024
@XChikuX
Copy link

XChikuX commented Jan 24, 2025

YES!

@Telroshan Telroshan added new extension and removed enhancement New feature or request labels Jan 25, 2025
@gedw99
Copy link
Author

gedw99 commented Jan 28, 2025

For now I use Datastar .

It’s has a nats leaf node integrated so that each server can be told of events and then push the html changes to users over SSE.

I think it’s a decent solution as SSE is so simple as a notification mechanism …

@nickchomey
Copy link

nickchomey commented Jan 28, 2025

To clarify, datastar doesn't have any nats stuff built in. It's just a js library, like htmx. But it does operate on receiving SSE messages, and has a bunch of language-specific SDKs for easily sending them.

Their website code is open source and runs on golang, and happens to have a nats server (not leaf node) embedded for triggering updates to be sent via sse to the browser, where the Datastar library handles them.

To use any of that in a real application would require considerable customization. And, again, there's no requirement to use NATS with datastar - it just wants SSE messages, and is agnostic to how they were created.

But, yes, Datastar seems to be a much better solution overall for this sort of stuff than HTMX, due to native SSE, OOB swap (via idiomorph by default), and also has reactivity via signals (no need for alpinejs etc). And it is much smaller than htmx and alpine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants