Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Computer A and Computer B are both syncing a given folder. You add a 2GB file to the folder on Computer A, naturally it gets pushed over the wire to Computer B, albeit slowly. If you then make changes to the 2GB file on computer A, what happens?

I figure the choices are really

a) it pushes the entire 2GB file to Computer B or b) it analyzes the differences between the two files, and sends only the changes over the wire. Computer B's mesh service then applies those changes.

But which is it?

Also, what happens if I move that 2GB file to a subfolder?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

If you then make changes to the 2GB file on computer A, what happens?

There are several ways of detecting the change.

  1. You could hash the file and see if the hash differs (costly). This is the method many MMO patchers use for file integrity checks, etc.

  2. The filesystem maintains a last modified field. So indexing the file by modification date is relatively cost effective. Then you simply have to poll the directory regularly and update things as needed.

  3. Many operating systems actually allow you to subscribe to a list of files/folders and be notified of when they change, new files are added, etc.

Then we need to send only the changes. Many protocols and algorithms support only sending the changes. Rsync is a well used protocol (and probably similar to what mesh does) that only translates the difference between machines with compression, so it is fairly bandwidth efficient. The issue with huge files is that one change may cause a huge chain of small changes that is fairly hard to diff efficiently.

I am pretty sure that mesh uses both differential and compression when transmitting between machines. But it is a closed source product and I couldn't find anything confirming that.

Also, what happens if I move that 2GB file to a subfolder?

In most cases you will need to re download the changes. For all intents and purposes the program will see that as a delete and then a new file being added in the new location.

Theoretically you could hash all the files and look to see if the new addition is already stored by comparing the hashes. This would be fairly costly (for instance if you are adding 1,000 small files).

share|improve this answer
5  
Wonderfully written. However, I think the question was more about what does the Windows Live Mesh product do. –  Chris_K May 28 '11 at 1:05
1  
I did some testing and you're right on both counts. Based on how quickly Mesh returned to "Up To Date" status, there is definitely some kind of differential sent between machines and not the entire file. Also, when moving files I confirmed that the originals were deleted and new files added to the new folder. –  Ken Pespisa May 28 '11 at 13:10
1  
One other fun fact. I moved around 150+ 100MB files from Computer A into a new folder, and after doing so noticed Mesh was slowly chugging through the list on Computer B, re-downloading them as if they were new (after having deleted the files from the original folder). I saved a lot of extra bandwidth drain by moving those files out of the recycle bin on Computer B and into the correct folder. Mesh intelligently detected the change, scanned the folder again, and then showed it as Up-To-Date. –  Ken Pespisa May 30 '11 at 0:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.