nats jetstream sync provider #483
Unanswered
joeblew999
asked this question in
Q&A
Replies: 1 comment
-
|
Very cool! Curious to see where you land with this! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I threw together a super basic test on the web-linearlite demo in 5 minutes to use NATS Jetstream.
It's a total hack to just explore.
if you want it to work with nats js as the reciever of the events based on CQRS, and off you go.
You can install the nats cli, to test it of course too, from https://github.com/nats-io/natscli, so that oyu can see everything going on and test mutations being fed in.
I guess it might make sense to add it as as a https://docs.livestore.dev/reference/syncing/sync-provider/custom/
My use case was to have mutations go to NATS, and then using its security system, forward it to the server backends for each workspace.
Then bun does its thing, and updates the Browser.
In the Browser, I imagine the smartest pattern for the mutation happening here, is to send it into the local browser, and to the NATS Server, so it can propagate it to all the bun servers. I do not know if LiveStore, however, does deduplication yet.
would be happy to help and sponsor too.
I think my pipeline pattern might not be what everyone wants of course. I am a newbie to LiveStore, so let me know what pipeline patterns I missed too :)
In terms of Schema Evolution, I presume the events from LiveStore are version tagged ? I asked because then NATS and everything else can inspect the Tag and do whatever is right for LiveStore and the Schema versions and evolution. I presume that a User Store on the backend / frontend is the "Origin", and so other collaborators MUST be on that same Schema Version.
Beta Was this translation helpful? Give feedback.
All reactions