mutagen-io / mutagen

Fast file synchronization and network forwarding for remote development
https://mutagen.io
Other
3.41k stars 151 forks source link

Nats Transport . Discussion / brainstorm #434

Closed gedw99 closed 1 year ago

gedw99 commented 1 year ago

It seems that the project uses local socket and ssh for transports.

Nats might be useful as another transport.

You get a publisher and subscriber to send file changes over .

With nats you can have many subscribers. So many users working off one source.

Also the subscribers will catchup over time. Say that the network failed or one of the subscribers closed their laptop.

Nats has advanced multi tenant security with highly granular control . The NATS nsc tool manages that .

Nats Object Store can be used as a stream for file blobs.

If you have not used nats before it might be a little confusing initially

if you configure a stream to be durable then you will get the catch up on subscribers. Think of it as an event store of data or blobs.

but you can also configure it as in memory.

nars is fast uses very little resources. Runs everywhere. Can be embedded easily .

Anyways I just wanted to raise this in case it’s interesting for the project.

links

https://docs.nats.io/using-nats/developer/develop_jetstream/object

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

gedw99 commented 1 year ago

You can do both local and remote sync with nats btw. So with nats you can do both.

It does not do names pipes or sock5 etc. Everything if over tcp or web sockets.

You can also create NATS leafs which is a NATS Server but on premise. It will join with the NATS servers that are remote. People use this for large on premise where you need everything working on premise even if the wan or lab goes down. Everything will catchup when the LAN or WAN comes back.

you can cluster nats for HA too. The nats client will round load balance between the servers in the cluster. You can easily then put each nats seer er in lamb duck mode and do a pressure upgrade of the nats Server with zero down time for the clients .

gedw99 commented 1 year ago

https://mutagen.io/documentation/synchronization/staging is very similar to what nats object Store is doing.

Nats Object Stores automatically Support sync in that client will get those changes files in order .

I have used it to sync 20 gb video files. It supports file chinking to allow unlimited size of files.

xenoscopic commented 1 year ago

I appreciate the links, but I'm not clear what this discussion is actually proposing, and thus not really sure how to respond. There's a lot of bullet points about NATS functionality, but not much in the way of concrete changes or improvements to Mutagen.

It also seems to address a bunch of different aspects of Mutagen without a particularly deep understanding of what Mutagen is, does, or how it works. For example, Mutagen's use of Unix domain sockets as a transport for communication with its daemon is totally unrelated to its use of SSH as a transport for synchronization.

Honestly, addressing every bullet point in this issue would take more time than I have, so I'm going to close this, but if you want to open specific proposals, for example adding an additional synchronization transport using NATS, I'm totally open to that, but something more concrete and organized is going to be necessary.