Syncthing protocol reimplementations?

So to get an idea about the complexity of Syncthing I read through the protocol specification(s) and it contains somewhat the commands as expected, but actually it is smaller than I expected, only a few commands power this.

After searching a bit more, there does not seem to be an alternative implementation of the protocol. Why is that? A specification benefits if there are multiple independent implementations done, but there is only one and everyone seems to be happy with it. Thinking further, if the protocol is not that complex, but a lot of work has been poured over the years into the current reference implementation, where did these hours end up? In the nasty corner cases of syncing across multiple platforms and varying OS behaviours? In the UI? In performance tuning? In actually trying various ideas and then rewriting stuff for production? In all of above and the syncing of files and their contents is really just the smallest part in such a projects? :wink:

I’m just curious - if there is an article about this somewhere already please point me to it! Thanks :slight_smile:

Not everything in an application is about the protocol. To be honest, I think protocol is one of the easier parts of syncthing.

Also, we do to some extent bend over backwards to not break protocol compatibility, which makes the protocol stable artificially.

Dealing edge cases, bugs and adding optimisations is probably where a lot of time goes in, and this is down to the implementation logic, and very little todo with the protocol.

You can probably go through the release notes and see where the time was spent.

I had put some though on working on an implementation in a different language, but to be honest, most of the work would be outside of the protocol, and it would be alot.

1 Like

There are a couple of other implementations too, one in Java in Syncthing-lite and another in (I expect) swift in the now defunct and unfortunately closed source “fsync“.

But what Audrius says. The protocol is easy. The sync mechanism is tricky.

I found fsync, but did not find syncthing-lite. However syncthing-lite repo is also “Nobody is working on this project anymore.” - commit of 20 days ago…

Thank you for the insight, so getting it “right” cross-platform in all funny cases is the hard thing.

Thank you also for your hard work - according to the stats I was back then one of the first users on aarch64/Linux - and am still a happy user to this day! :slight_smile:

1 Like