[tomboy-list] Note Synchronization
john.stowers.lists at gmail.com
Wed Nov 29 15:40:48 PST 2006
> Alp Toker (of the DBusSharp) project mentioned to me yesterday that
> he'd be willing to work with us to make synchronization/sharing work
> over DBus. We should definitely look into it.
> John Sowers, of the Conduit project, has also contacted me with
> thoughts about synchronizing Tomboy notes. I haven't had a chance to
> reply to him (sorry John) yet. Mostly, the ideas there have been to
> expose some helper functions in Tomboy using DBus to allow Conduit to
> participate in synchronization.
As far as the DBus methods that are exposed, my preference would be to
expose the same methods over DBus that are used in the basic sync
In conduit my current hackish tomboy interface involves reading the
note xml files. To have a complete DBus replacement for this I would
returns a list of note URIs
note_data = getNote(uri)
returns a note
result = putNote(uri, note_data, overwrite=False)
puts the note_data into the note identified by URI. Returns 0 for
success, and non-zero for a conflict
This would then make conflict resolution the job of the application
doing the syncing. In conduits case it could get the old note at URI,
compare them, and then make another put() with overwrite set to true.
In Tomboys case, when synchronizing with another tomboy instance It
would do the comparison, presenting a GUI as needed.
Im suggesting that by putting these 3 functions in the common code
path and by exposing them via dbus it really gives the most freedom, I
(conduit) could plug in easily, and i presume that similar functions
will be present internally anyway.
I know that there is an existing DBus interface of sorts, but get and
put are the key functions that are missing.
Regarding note_data. I am in favour of the simplest format. I suggest
sending the raw note XML and if images are accommodated in future then
just send the raw pixmap (base64 encoded).
If you wish to make sure that external apps like conduit will behave
the same as the internal sync/comparison you could also expose a
result = compare(note1URI, note2URI)
which would return OLDER, NEWER, UNKNOWN or similar
But if you send the whole raw note XML then its easy for me (conduit)
to look at the modification time or equivalent.
I discussed the conduit side DBus interface with Boyd in a previous
email. That would allow Tomboy to trivially be able to sync/export to
all things that Conduit supports (iPod, Backpackit.com, flat files,
email, and whatever I add in future). It will save each app
re-implementing export interfaces each time they want to export their
data somewhere. But I digress...
Anyway, I will send another email to this list and to Boyd when I have
the conduit DBus interface finished, and can write a simple plugin
that will allow tomboy users to export notes to whatever conduit
More information about the tomboy-list