[tomboy-list] Sync and local note deletion (again)

Cornelius Hald hald at icandy.de
Sun Jun 6 10:12:43 PDT 2010


Hi,

just a short follow up: I've implemented a simple solution yesterday and
it seems to work quite nicely. I'm using two files, one where I put all
IDs of locally deleted notes and one where I put all IDs of local notes
that have been synced to the server.

I'll give out a test version today, so I'll know soon whether or not
there are problems with this solution.

Oh and please feel free to ignore my previous brain dump :)

Cheers,
Conny


On Fri, 2010-06-04 at 19:21 +0200, Cornelius Hald wrote:
> Hi Sandy,
> 
> today I spent some more time on deleting local notes during sync. My
> original approach was this:
> 
> 1.) Pull new/updated notes from server
> 2.) Push new/updated notes to server
> 3.) Delete local notes that do not exist on the server
> 4.) Push local deletion to server (not yet implemented)
> 
> In this scenario a note that get deleted on the server and modified on
> the client will be pushed to the server again. So it will reappear.
> 
> I thought this is a good solution as otherwise changes that have been
> made on the client might be lost.
> 
> After some problems it turned out that U1 rejects updates to notes that
> have already been deleted. It seems like U1 is keeping a history of
> deleted notes. Do you know if this is by design? Is it in the spec
> and/or does Snowy do the same?
> 
> Anyways, I checked with Tomboy and it looks like Tomboy is doing the
> following:
> 
> 1.) Pull new/updated notes from server
> 2.) Delete local notes that do not exist on the server
> 3.) Push new/updated notes to server
> 4.) Push local deletion to server
> 
> That means that a note that is deleted on the server will be deleted on
> the client whether or not it has been edited there. That's fine for me
> as well, so I changed my code to do the same thing. I'm slowly getting
> to the point don't worry :) 
> 
> The first thing that happened was that my newly created notes were never
> pushed to the server because they got deleted in step 2.) already. I've
> then looked at the Tomboy code and I can see that you are using the
> individual revision number of each note to prevent notes that were never
> synced from being deleted.
> 
> So far I've managed to live without per note revision numbers and I was
> quite happy with it, because I don't have to create/read/update another
> file.
> 
> Now finally to the point: From what you know, is there another way to
> solve this in a pure client implementation without saving individual
> revision numbers? If not, are revision numbers needed or would it be
> enough to simply create a list of notes that have been synced at least
> once? I think that would be enough, but maybe you know of other good
> uses of those revision numbers, so I thought I should ask before I
> implement some more crap :)
> 
> My solution would be a text file with two sections. Once lists GUIDs of
> locally deleted notes, the other of notes that have been synced at least
> once.
> 
> Sorry, for the length of this mail, but I thought I should explain a bit
> what I'm doing, so that you could spot other errors I might have in my
> code/brain.
> 
> If you find some time, please write me your comments. It's really
> fascinating how much work and though there is in Tomboy.
> 
> Thanks!
> Conny
> 
> 
> 
> _______________________________________________
> 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