Task synchronization
=======================================
Goals:
There should never be any invalid data shown to the user. Synchronization must be split in three seperate mechanisms to enable proper and clean seperation between task caches/data and task lists. Needed because multiple task lists per cache are possible.


1. Task data synchronizing
---------------------------------------
DataChangeEvents signify changes to task data itself, more specifically: Creation, Deletion or Editing of tasks.
This information should be used by the client to synchronize the cache to the new state. When edit happens, all task data must be reloaded from the server and the old replaced. Deletion must remove the data from cache, creation mustnt do anything because the cache is not required to hold all tasks. The cache should load tasks laziliy when requested by task list.

Notes:
- DataChangeEvents can hold sensitive information (user actions and user names) and should only be exposed to logged in users.
- These events can be used to implement notifications very easily, if they are simply stored even when a user is offline.
- In the future one could even think about not-lazy cache behaviour (the cache loads ALL data from the server at the beinning and always has the data, never needs to load more from the server. For that, the data volume must be evaluated, or maybe as option for user?)


2. Task list synchronizing
---------------------------------------
TaskListEvents signify changes specific to a single task list (and only that task list).
This information should be used to synchronize the tasklist to the new state. As such, taskListEvents only signify additions, removals or changes in position that depend on the state and behaviour of that list.
Specifically, task deletion should not emit remove events, because removal caused by task deletion is not specific to a single task list, but has the same affect for cache and all task lists and is thus handled by task cache to task list sync (see 3. below).


3. Task cache to task list synchronizing (inside client)
---------------------------------------
If the task data in the cache changes, the task lists must reflect those changes, if they are currently displaying those tasks whose data changed:

- If a task inside the cache gets deleted:
Remove task from any task list it is currently visible in. If the task is currently expanded show a message that it got deleted and therefore removed (only if not caused by this user).
- If a task inside the cache gets edited:
Replace all those tasks in all task lists (retain expanded/collapsed state). If a task is currently expanded show a message that it got edited and therefore re-expanded (may have interrupted a user interaction with that task, only if not caused by this user).
