Automatic Background Synchronization

The Goal

The vast majority of users just want their notes to be where they expect them to be. To that end, after configuring Tomboy synchronization, a user should never have to take any action to synchronize their notes. Sync output should be kept to an ignorable minimum. Everything just "just work", no matter whether or not the user is online.

Current Plan

  • Tomboy syncs automatically in the background every X minutes. It's not enough to just sync when the user makes changes, because they could hypothetically have a second system up and running that is pushing changes to the server.
  • In most situations, this will eliminate most note conflicts, so conflict handling is an exceptional circumstance. The user should be able to defer conflict handling as long as possible, if they wish. There may be limits on what they can do in Tomboy before they resolve a conflict.
  • Besides conflict handling, sync output will be restricted to applet/tray icon changes and notification bubbles.
    • Bubbles are only absolutely needed in the case of a conflict or some other error (perhaps network errors).
    • Some users might appreciate bubbles whenever a sync brings in new notes, so that they can see what the new notes are. However, this might not make sense, since presumably the same user created the notes on another system at some point.
    • We can use the applet/tray icon to indicate the following statuses:
      • Idle (normal icon)
      • Connecting, looking for updates (normal icon overlaid with [animated?] connection image)
      • Pulling/pushing updates (would be cool: animation of current Tomboy icon with note pages being flipped away)
      • Error...not sure if this is necessary
      • Conflicts detected, will not sync until they are handled (something scary like the normal icon in red overlaid with a skull and crossbones...)
        • Idea: Merge the conflicting versions like CVS does (with ">>>>" marks), highlight the lines (e.g. light red background override), move caret to the position (scroll if needed) and adjust notes icon. The idea is the conflict should not be/look urgent, so that user can continue his work.

(I would think a comparison side window would be more "user friendly". The CVS marks are very non-user friendly. I would like to see two windows side by side and the user could drag the desired results together to resolve any conflicts. Trepidity)

  • If a user has a note open, and an update for it is pulled from the server, use a reload bar like in gedit, and do not allow the user to edit?


  • notify-sharp
    • Not "blessed" for GNOME, currently. If it is not blessed for GNOME 2.22, it will have to be optional. Since there is no other worthwhile way to do notification bubbles, I'm not sure what the alternate behavior would be. Dialog boxes might be OK if bubbles are only being used for conflict notification.
    • Works well with both widgets and status icons.
  • Would Network Manager be worth using to detect online/offline status, or is that overkill?
    • It wouldn't be very hard to implement and plus the engine would stop trying to sync, avoiding battery usage, until the connection was alive again - trepidity

Problems to Address

  • Editability of notes during sync.
    • For example, what happens if a sync is taking place, and I simultaneously edit a note that is receiving an update? I have just created a conflict. Should any notes be editable during sync?
  • Editability of notes involved in a conflict.
  • Editabliity of update notes in pre-reload state.

Unstructured Brainstorming

  • Backends can specify if they support background/auto sync? Any reason why a backend wouldn't support it?

[[Snowy]] (may be fine with other backends)

  • Check every 5 minutes to see if there's a new rev on server
    • If there is not a new rev, push any changes (will fail if a new rev happens during this process)
    • If there is a new rev, notify user with bubble so they can initiate a sync
      • If user ignores bubble, wait until they are idle, then disable all note windows and perform a full sync
  • No good idea what to do about conflicts with this scheme, but they would be rare occurrences
  • Everything here configurable

Apps/Tomboy/Synchronization/Background (last edited 2013-08-09 00:14:57 by WilliamJonMcCann)