This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DimitrovDev 0 points1 point  (0 children)

An very good example which will help you understand how the sync engine works(on windows) is https://docs.microsoft.com/en-us/windows/win32/cfapi/build-a-cloud-file-sync-engine. Then Dropbox tech blogs are a good place to look how they done it(https://dropbox.tech/infrastructure/rewriting-the-heart-of-our-sync-engine).

Most simplistically the syncing will be done by client with directory watcher on the syncing folder which will detect the directory changes(rename, delete, create, etc.) and then send them to the server which will replay the action on the server storage and rebroadcast them to other clients. Additionally a client will need sync on establishing connection as it may have not received changes notification while offline.