Merge pull request #327 from untitaker/rewrite-when-docs

Rewrite 'When' page
This commit is contained in:
Markus Unterwaditzer 2016-02-02 16:15:28 +01:00
commit 5c769fd63d

View file

@ -2,24 +2,15 @@
When do I need Vdirsyncer? When do I need Vdirsyncer?
========================== ==========================
Why vdir? Why not Dropbox + todo.txt?
========= ---------------------------
:doc:`vdir` is a compromise to maintain some compatibility with the CalDAV and
CardDAV protocols, which are supported by :ref:`ownCloud <owncloud_setup>`,
:ref:`Exchange <davmail_setup>`, :ref:`iCloud <icloud_setup>` and many other
services.
If you don't care about that, you don't need vdirsyncer. However, consider the
following before writing everything into a single text file:
Why not a simple text file? (todo.txt)
--------------------------------------
Projects like `todo.txt <http://todotxt.com/>`_ criticize the complexity of Projects like `todo.txt <http://todotxt.com/>`_ criticize the complexity of
modern productivity apps, and that rightfully. However, when they're faced with modern productivity apps, and that rightfully. So they set out to create a new,
the question how to synchronize that data across multiple devices, they seemed super-simple, human-readable format, such that vim suffices for viewing the raw
to have reached the dead end with their novel idea: "Let's just use Dropbox". data. However, when they're faced with the question how to synchronize that
data across multiple devices, they seemed to have reached the dead end with
their novel idea: "Let's just use Dropbox".
What does file sync software do if both files have changed since the last sync? What does file sync software do if both files have changed since the last sync?
The answer is to ignore the question, just sync as often as possible, and hope The answer is to ignore the question, just sync as often as possible, and hope
@ -30,61 +21,36 @@ Merging the two task lists is left to the user.
A better idea would've been to use ``git`` to synchronize the ``todo.txt`` A better idea would've been to use ``git`` to synchronize the ``todo.txt``
file, which is at least able to resolve some basic conflicts. file, which is at least able to resolve some basic conflicts.
Why vdirsyncer? Why not file sync (Dropbox, git, ...) + vdir?
=============== ---------------------------------------------
Why not Dropbox? Since :doc:`vdirs <vdir>` are just a bunch of files, it is obvious to try *file
---------------- synchronization* for synchronizing your data between multiple computers, such
as:
Since :doc:`vdirs <vdir>` are just a bunch of files, it is obvious to try
*file synchronization* for synchronizing your data between multiple computers,
such as:
* `Syncthing <https://syncthing.net/>`_ * `Syncthing <https://syncthing.net/>`_
* `Dropbox <https://dropbox.com/>`_ or one of the gajillion services like it * `Dropbox <https://dropbox.com/>`_ or one of the gajillion services like it
* `unison <https://www.cis.upenn.edu/~bcpierce/unison/>`_ * `unison <https://www.cis.upenn.edu/~bcpierce/unison/>`_
* Just ``git`` with a ``sshd``.
If you only need to synchronize things between several desktop machines (and The disadvantages of those solutions largely depend on the exact file sync
not e.g. smartphones), using any of those to sync your vdirs will probably fit program chosen:
your usecase.
Since each contact/task/event is contained in its own file, the * Like with ``todo.txt``, Dropbox and friends are obviously agnostic/unaware of
chance of sync conflicts is relatively small, but those still happen. the files' contents. If a file has changed on both sides, Dropbox just copies
Vdirsyncer doesn't do anything smart if two items have conflicting changes both versions to both sides.
either, but it could in the future.
Why not git? This is a good idea if the user is directly interfacing with the file system
------------ and is able to resolve conflicts themselves. Here it might lead to
errorneous behavior with e.g. ``khal``, since there are now two events with
the same UID.
If file synchronization software and vdirsyncer are so dumb about sync This point doesn't apply to git: It has very good merging capabilities,
conflicts, why not use git then? Why not put your vdirs into a repo, and just better than what vdirsyncer currently has.
``git commit``, ``git push`` and ``git pull``? It has **many advantages over
both Vdirsyncer and Dropbox**:
* **Full change history:** If some stupid software deletes all your data, just * Such a setup doesn't work at all with smartphones. Vdirsyncer, on the other
revert the commit! hand, synchronizes with CardDAV/CalDAV servers, which can be accessed with
e.g. DAVDroid_ or the apps by dmfs_.
* **Better at merging in-file conflicts (sometimes):** If you changed the .. _DAVDroid: http://davdroid.bitfire.at/
summary of a task on one computer and the due date on another one, git might .. _dmfs: https://dmfs.org/
be able to merge these two files to have the new summary *and* the new due
date.
Vdirsyncer is currently relatively stupid about this (see
:ref:`conflict_resolution`), but in practice, I didn't find its stupidity to
be problematic.
* **Superior server options:** ``sshd`` is vastly easier to set up and faster
than any DAV-server I've ever seen. Passwordless authentication is also a
huge win, although there are DAV-servers which provide that too.
* `Something about data integrity
<https://stackoverflow.com/questions/27440322/data-integrity-in-git>`_.
You'll quickly notice if your hardware is loosing your files, because git
creates checksums of everything.
Many other CLI programs that need to sync data are based on git, for example
pass_ or ppl_. Those usually hide git behind a convenient CLI interface that at
least autocommits.
.. _pass: http://passwordstore.org/
.. _ppl: http://ppladdressbook.org/