[tomboy-list] Some questions about synchronization

Pedro pedro100 at gmail.com
Tue Jan 6 13:34:53 PST 2009


I wrote a little library (assembly) that wraps dokuwiki XMLRPC
interface, at the momment I am in the process of polishing it.
I am already able to delete and save pages and to get a list of pages.
I'll add some more basic functionality that can be handy like append
content and such stuff. It's still a very raw thing.
Next step will be wrapping these functionality in what will be
dokuwiki syncserver.

The interface we need to implement looks like this:

	public interface SyncServer{
		bool BeginSyncTransaction ();
		bool CommitSyncTransaction ();
		bool CancelSyncTransaction ();
		IList<string> GetAllNoteUUIDs ();
		IDictionary<string, NoteUpdate> GetNoteUpdatesSince (int revision);
		void DeleteNotes (IList<string> deletedNoteUUIDs);
		void UploadNotes (IList<Note> notes);
		int LatestRevision { get;}
		SyncLockInfo CurrentSyncLock { get;}
		string Id { get;}
	}

I do have some questions, that I'll take the chance to ask:
What would the first three functions typically do?
What metadata will I need to store... NoteUUIDs, RevisionID, anything else?


On Tue, Jan 6, 2009 at 8:05 PM, Sandy Armstrong
<sanfordarmstrong at gmail.com> wrote:
> On 01/05/2009 09:45 PM, Douglas V. Johnston wrote:
>>
>> Before I settled on writing an seperate addin, I looked at the making
>> a TomboySyncClient, and while things looked fairly straight forward
>> for the FUSE based clients, writing a non-FUSE sync client seemed to
>> have some bits missing, or at least not as easily presented as they
>> could be. Are there any existing examples of a non-FUSE sync client
>> addin? Ideally, I think I'd like to go back to this at some point.
>
> None have been written.  You're looking at the wrong end, though.  You don't
> need to write a new client, you need to write a new server.  That means your
> web service probably needs some API to support Tomboy's SyncServer
> interface.  I'm interested in helping out with this when I have time; I
> understand it is not the prettiest or most well-documented API.
>
> This is what I had to say when Pedro asked:
>
>> Do I only need to extend SyncServiceAddin or do I need to
>> add/override functionality in other points? I haven't understand
>> where the actual sync code should go. For example,
>> Filesystemsycserver for example extends SyncServer instead.
>
> You do need to extend SyncServiceAddin.  In your case, you probably also
> need to provide an implementation of the SyncServer interface.
> FileSystemSyncServer is used by all of the FUSE-based sync add-ins
> because the server ends up getting mounted on the file system in the
> same way no matter how you connect to it.  I'm guessing you're not going
> to waste time writing a FUSE file system for dokuwiki, though.  :-)  So
> you'll need to implement a SyncServer that somehow works via the xml-rpc
> interface.  Then in your SyncServiceAddin, override CreateSyncServer and
> have it return your custom SyncServer implementation.
>
> Best,
> Sandy
> _______________________________________________
> Tomboy-list mailing list
> Tomboy-list at lists.beatniksoftware.com
> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>


More information about the Tomboy-list mailing list