6 ms·
> To me, the word "sync" means to update devices so that the data missing from the other device gets synced. But that's not what sync means. True sync has a so
by lutusp 12y ago
> To me, the word "sync" means to update devices so that the data missing from the other device gets synced.
But that's not what sync means. True sync has a source and a target, and the target's file collection is always made to match the source. If you confuse the source and the target and the "source" is empty, you get the outcome you describe -- the empty device's file collection is "duplicated" (i.e. erased) on the other device that's been mistakenly chosen as the target.
This is a surprisingly common outcome among people who don't fully understand the meaning of sync. If your interpretation were the default meaning, it would be impossible to delete any tracks from your music collection. If you deleted some tracks from the source device, the source would have those tracks restored from the target instead of being deleted from it -- but that's not what sync means.
EDIT: People, don't downvote posts just because you don't understand the topic under discussion. The above description is absolutely, incontrovertibly correct in every detail. Therefore, in a depressing trend, it's been downvoted because it's annoyingly, infuriatingly right.
- Maakuth 12y agoWhere does this meaning for "sync" come from? Rsync does work this way, but sync is abbreviated from synchronization and that doesn't - to my knowledge - imply any directionality in it, and dictionary definition [1] seems to agree. 1: http://www.merriam-webster.com/dictionary/synchronize http://www.merriam-webster.com/dictionary/synchronize
- lutusp 12y ago> Rsync does work this way ... Indeed it does, and that is the true meaning of sync. Consider this example: $ rsync -a --delete (A) (B) If (A) is empty, watch (B) become empty too. The point I'm making is that the use of the "--delete" option causes rsync to agree with the true technical meaning of "sync". Without it, the two directory trees (A) and (B) cannot be guaranteed identical at the end of the process (the real meaning of sync). > ... and that doesn't - to my knowledge - imply any directionality in it ... Of course it does. How else can you make two directory trees identical if your intention is to delete some files from both trees? > and dictionary definition [1] seems to agree. Never rely on a dictionary in a technical discussion. Contrary to popular belief, dictionaries do not list word definitions, they list what people think words mean. This is why "literally" and "figuratively" are listed as synonyms.
- Maakuth 12y agoIf you think about the parent's case, unidirectional syncing ended up causing empty dataset to be synced from the computer to the iPhone. That doesn't seem right. Compare this to Dropbox's model of syncing: intentional changes (yes, deletes as well) are synchronized and this is done multidirectionally between all the participating devices. This is what seems to me like a better definition of sync. Or consider your mobile device calendar. You add an appointment on your phone, it doesn't disappear when you sync with your PC (or with cloud, as is common today). I didn't mean to imply that dictionary defines the meaning, but it does seem to agree with what I mean with "sync". Where does this "true technical meaning of sync" come from?
- lutusp 12y ago> If you think about the parent's case, unidirectional syncing ended up causing empty dataset to be synced from the computer to the iPhone. Not if the user selected the new iPhone as the source. In fact, that's the only way the described outcome could happen -- assuming the desktop machine originally had a full collection of music and the iPhone was empty. > That doesn't seem right. True, it doesn't seem right. But the customer is always right. > Or consider your mobile device calendar. You add an appointment on your phone, it doesn't disappear when you sync with your PC (or with cloud, as is common today). A perfect example. What if your phone is the source of most of your appointments and contacts? Wouldn't it seem logical to make the phone the source for a sync transaction? Let's take the next step -- what if your phone is the source of your music collection? What if you add music to your phone while on the road and want to add those tracks to your desktop machine's archive? To do this, the sync program must accept your instructions about which device is the source and which the destination. So you must not get it wrong. In other words, in order to get the expected outcome, you must know how sync works. To repeat your earlier point: > Or consider your mobile device calendar. You add an appointment on your phone, it doesn't disappear when you sync with your PC (or with cloud, as is common today). Yes, that's right, but you're not taking that example to its logical conclusion -- the smaller, more peripheral device, the phone, is the source for the sync. If that device has no music on it, the desktop machine will have its music collection erased. > I didn't mean to imply that dictionary defines the meaning, but it does seem to agree with what I mean with "sync". Yes, true, which explains why I've been hearing so many accounts like yours -- people rely on dictionaries to define technical terms and end up erasing their music collections. > Where does this "true technical meaning of sync" come from? Logical thinking: 1. "Sync" means that two directory trees end up with the same content -- exactly the same number of files, same names, same everything. 2. For (1) to be true, the program performing the sync must sometimes delete files as well as add files. 3. For (2) to be true, the program must know which directory tree is the source. Therefore the user must know this too. But users, reliant on dictionaries, may not understand what sync actually means. Q.E.D.
- shalmanese 12y agoThat's nonsense. Sync has always meant merging semantic changes in state between two or more devices. If I buy an app on my desktop and take 4 photos on my phone, when I sync the two devices, I expect the new app on my phone and 4 new photos in my iPhoto. As version control has taught us, merging changesets can lead to a menagerie of pathological cases and there's no universally correct automatic merging tool. iTunes in the grandfather's case, chose to merge incorrectly and lose data.
- lutusp 12y ago> That's nonsense. You either need to read more carefully, or you do not understand what "sync" means. Please do not add to public confusion about this. 1. Synchronization means making two directory trees identical -- same files, same count, no more, no less. 2. If tree B (destination) has more files than tree A (source), sync deletes files from B so it agrees with A. 3. If tree B has fewer files than A, files are added to B so it agrees with A. 4. If tree B has the same number of files, but different contents or dates, the sync program replaces them with files from tree A. 5. THEREFORE, ERGO, the operator MUST say which is the source, and which is the destination. For the life of me I can't understand why people find this so confusing. > Sync has always meant merging semantic changes in state between two or more devices. YES, as clearly explained above. And that means if the user chooses the wrong source, for example a device with no music tracks, then the program will dutifully erase all the music tracks from the destination device. > iTunes in the grandfather's case, chose to merge incorrectly and lose data. Yes, but that outcome resulted, not from an error in iTunes, but from the user misidentifying the source device, and that, in turn, resulted from his not understanding sync, a misunderstanding that he revealed in his post by attempting to rely on an incorrect dictionary definition of the word. EDIT: consider this hypothetical example. 1. Directory tree A has 9 files. 2. Directory tree B has 10 files. 3. In your description, the user doesn't have to say which is the source -- no user intervention is required. 4. If so, without user intervention, how does the sync program know what to do? Does it add a file to tree A, or delete a file from tree B? Think before answering. EDIT: Readers, do not downvote posts simply because you're confused. Ignorance is not a justification to cast a downvote.
- 12y ago
- pjc50 12y agoBy this definition, "unison" isn't sync. It's also possible to handle not reinstantiating deleted items, although it takes more bookkeeping (usually "tombstone" records).
- dbecker 12y agoSo, if I start with two devices holding lists, and I place the union of those lists on each device, what is that called? Do you have a reference for the technical definition of sync that this fails to meet?
- lutusp 12y ago> So, if I start with two devices holding lists, and I place the union of those lists on each device, what is that called? Not enough information. Naive set theory isn't adequate to cover file operations. Files have sizes and dates, but members of sets don't normally have these properties. File synchronization isn't necessarily a simple and blind union of two sets. Some synchronization operations require that files be deleted, others require that files be restored or provided if absent. Which is true is left to the operator -- he must decide. Consider this example. Two directory trees, A and B, contain the same number of files, but some of the files have sizes different than the other. Does the synchronization operation copy files from B to A, or A to B? The answer is that the operator must decide. Rsync, a popular file synchronization utility, can delete files, or not, depending on what options the operator selects. It also much be told which is the source and which the destination. > Do you have a reference for the technical definition of sync that this fails to meet? http://en.wikipedia.org/wiki/File_synchronization http://en.wikipedia.org/wiki/File_synchronization A quote: "File synchronization (or syncing) in computing is the process of ensuring that computer files in two or more locations are updated via certain rules. In one-way file synchronization, also called mirroring, updated files are copied from a 'source' location to one or more 'target' locations, but no files are copied back to the source location. In two-way file synchronization, updated files are copied in both directions, usually with the purpose of keeping the two locations identical to each other." In the first case, algorithm must be told which is the source and which the destination. The operator must decide. In the second, the algorithm must know how to proceed -- are newer files overwritten, or are older files overwritten? The operator must decide. Most people don't understand this -- in all synchronization operations, the role of the operator is key to getting any desirable result. In answer to your question above, the online definition I quoted above doesn't allow for a simple union of two file trees, because there is no such thing -- the algorithm requires additional information, information provided by the operator. In a two-way synchronization, if the algorithm encounters a file that is (a) not present on both systems, or (b) one copy is larger, or (c) one copy has a newer date, the algorithm cannot proceed unless and until the operator expresses a preference -- establishes the rules. In short, there is no automatic file synchronization -- all examples require the conscious participation of a decision-maker. Let's say I have edited some files in a large, complex programming project. The outcome is successful. I want to synchronize two file trees to reflect the successful outcome, but with a minimum of file operations. Therefore I tell the synchronization program to copy newer and/or newly created files from B to A. Next example. I have edited and changed a complex software project, but the changes are a disaster and I want to recover the original state, but with a minimum of file operations. So I tell the sync program to restore older files from A to B, and delete new files from B not present on A. Neither of the above operations can proceed to a desirable outcome unless I give the sync program explicit rules. Conclusion: There is no such thing as a union of file systems that doesn't need to be told how to accomplish that end.