tractordev / toolkit-go

MIT License
5 stars 3 forks source link

fs sync #4

Closed gedw99 closed 3 weeks ago

gedw99 commented 1 month ago

Is there a file sync system in place ?

Looking and playing with toolkit-go, makes me wonder if a CRDT ( master / master based ) FS sync is a good idea or not ...

https://github.com/3timeslazy/crdt-over-fs

its working over S3 and uses automerge.

can run in browser or server as its wasm. so works for wanix etc too.

https://pkg.go.dev/github.com/automerge/automerge-go?tab=importedby is the root code if you curious.

progrium commented 3 weeks ago

I've done a proof of concept using jazz for this, but I wouldn't call it production ready. In most cases, just delegating file operations with a network protocol like NFS or 9P is good enough. You'll probably see more support for that here before CRDTs. In general, CRDTs/syncing is more or less out of scope right now.

gedw99 commented 3 weeks ago

Thanks @progrium

I will have a look at jazz

progrium commented 3 weeks ago

Jazz can only be used in the browser right now so it's only an option when compiling to WASM to run in the browser, but WANIX has that proof of concept FS: https://github.com/tractordev/wanix/tree/main/kernel/jazz https://github.com/tractordev/wanix/tree/main/external/jazz