Live data from Hacker News

Mysteries of Dropbox: Testing of a Distributed Sync Service (2016) [pdf]

cis.upenn.edu

21–28 of 28 posts

Re: Mysteries of Dropbox: Testing of a Distributed Sync Service (2016) [pdf]

#21
post #12

Earlier quoted context omitted.

Can you share which difficult and non-intuitive corner cases there are? I guess debouncing, etc.

Examples I've seen in similar systems: - Receiver tried to create a file before receiving attributes of the directory containing the file. Receiver author assumed it would always receive directory attributes first and create the directory, so it crashed. - Receiver created a file before receiving attributes of the directory containing the file. Parent directory was created automatically, but with default attributes s…

>Receiver tried to create a file before receiving attributes of the directory containing the file. Receiver author assumed it would always receive directory attributes first and create the directory, so it crashed.

This case, and a bunch of the others, are variations on failing to correctly implement dependency analysis. I'm not saying it's easy, it is far from easy, but this has been part of large systems design (anything that involves complex operations on trees of dependent objects) for years, especially in the networking space.

Indeed, your fourth bullet gets to some of the very ancient techniques (though STP isn't a great example) to address parts of the problem.

The last bullet is very hard. Honestly, I'd be happy if icloud and dropbox just got the basics right in the single-writer case and stopped fucking up my cloud-synced .sparsebundle directory trees. I run mtree on all of these and routinely find sync issues in Dropbox and iCloud drive, from minor (crazy timestamp changes that make no sense and are impossible, but the data still complete and intact) to serious (one December, Dropbox decided to revert about 1/3rd of the files to the previous October version).

The single writer case (no concurrency, large gaps in time between writers) _is_ easy and yet they continue to fuck it up. I check every week with mtree and see at least one significant error a year (and since I mirror these to my NAS and offline external storage, I am confident this is not a user error or measuring error).

Re: Mysteries of Dropbox: Testing of a Distributed Sync Service (2016) [pdf]

#22
post #16
post #14

Earlier quoted context omitted.

oh and the parent folder is on a shared NAS with some caching.

We had to add logic to block network and USB drives. (They were an ever-present source of customer issues.) The root cause of the problem is that in .net, there is a bug with File.Exists. If there is a filesystem / network error, instead of getting an exception, the error is swallowed and the call just returns false. I'm not sure if newer versions of .net fix it or not; I only learned about this when we were implemen…

You can just mount network drives as folders

Re: Mysteries of Dropbox: Testing of a Distributed Sync Service (2016) [pdf]

#23
post #16

Earlier quoted context omitted.

We had to add logic to block network and USB drives. (They were an ever-present source of customer issues.) The root cause of the problem is that in .net, there is a bug with File.Exists. If there is a filesystem / network error, instead of getting an exception, the error is swallowed and the call just returns false. I'm not sure if newer versions of .net fix it or not; I only learned about this when we were implemen…

You can just mount network drives as folders

Which we detected and blocked, due to phantom deletions. (I explain the .net bug higher in this thread.)

Re: Mysteries of Dropbox: Testing of a Distributed Sync Service (2016) [pdf]

#24
post #10

Earlier quoted context omitted.

Can you share which difficult and non-intuitive corner cases there are? I guess debouncing, etc.

The way I used to explain it: Imagine that you are on a plane, (and don't have an internet connection). You edit a file. At the same time, I edit that file. What should we do? We can't possibly know every file format out there, and implement operational transform for all of them. Now, imagine that we both edit the same file, at the same instant. One of us is going to submit the change first, and the other will submit…

IIRC we realized that automating "merge" past a certain point was kicking the human rectification can down the road (for our specific use case, etc). Being able to say "here's where you handle the diff or wipe the previous version" at a macro level saved time and sanity.

With documents in general there are common workflows from the paper era that just haven't aged gracefully.

Re: Mysteries of Dropbox: Testing of a Distributed Sync Service (2016) [pdf]

#25
post #23

Earlier quoted context omitted.

You can just mount network drives as folders

Which we detected and blocked, due to phantom deletions. (I explain the .net bug higher in this thread.)

You should also be able to detect if via RW latency.

Re: Mysteries of Dropbox: Testing of a Distributed Sync Service (2016) [pdf]

#26

Great paper! I’m glad I avoided OwnCloud after discovering how much of a hot PHP mess it is (and that it was about 10x slower for LAN sync than Seafile on a same machine). I would love to have all the file sync solutions tested with this suite.

ownCloud (and NextCloud today) aren't slow because it's PHP. Other PHP webdav solutions work at line speed just fine.

They're slow because they're poorly written. The mobile apps or the js webui are no different. It's jank from top to bottom. I try it once a year, because I want this product so bad. But I keep getting hurt by the speed, by the bugs, by the stability. I've even tried a hosted instance, just in case my hubris prevented me from seeing blatant issue in my server setup. But alas...

Yet they have a large userbase. So I'm forced to come to the conclusion that I must be doing something wrong... The speed issues are usually acknowledged by fellow nextcloud users but the bugs are brushed away, so my conclusion is that I must be having an unusual workflow that hits all the corner cases at once.

BTW ownCloud pivoted to Go almost 5 years ago, they call it ownCloud Infinite Scale.

Re: Mysteries of Dropbox: Testing of a Distributed Sync Service (2016) [pdf]

#27
post #26

Great paper! I’m glad I avoided OwnCloud after discovering how much of a hot PHP mess it is (and that it was about 10x slower for LAN sync than Seafile on a same machine). I would love to have all the file sync solutions tested with this suite.

ownCloud (and NextCloud today) aren't slow because it's PHP. Other PHP webdav solutions work at line speed just fine. They're slow because they're poorly written. The mobile apps or the js webui are no different. It's jank from top to bottom. I try it once a year, because I want this product so bad. But I keep getting hurt by the speed, by the bugs, by the stability. I've even tried a hosted instance, just in case my…

Thank you for enduring the pain and reporting, I will continue avoiding :).

Re: Mysteries of Dropbox: Testing of a Distributed Sync Service (2016) [pdf]

#28
post #13

Anything written by John Hughes is worth a read. He also also wrote quickcheck.

Seconded. All the Haskell people from Chalmers have produced very interesting work. Another example is Agda.

I had not heard of Agda before, I'll have to check that out. Thanks!
Post reply on HN