Re: [Tomdroid-dev] Snowy synchronization branch

2009-08-24 Thread Sandy Armstrong
On Mon, Aug 24, 2009 at 11:17 AM, Benoit
Garret wrote:
> On Mon, Aug 24, 2009 at 3:59 PM, Sandy
> Armstrong wrote:
>> Out of curiosity, does your web-sync branch handle server-side
>> deletes?  I'm guessing not, since a quick grep in the source code
>> indicates that you're not tracking the last sync revision.  This also
>> means that every time you sync, you are getting every single note on
>> the server.  You could save bandwidth by tracking the last sync
>> revision, and only getting note updates since that revision (this
>> would also allow you to process deletes if you wanted to).
>
> You're right, it doesn't support that at the moment. I will handle
> that as soon as I get the note guid stored in the database. There's
> still one thing I didn't quite get about the remote note deletion. The
> examples of GET requests on http://domain/api/1.0/user/notes don't
> mention note deletion. Is that an omission or should I be able to
> infer the deleted notes from the response (in that case, I don't see
> how I could do that)?

The most efficient thing to do is to make two requests for the Notes resource:

http://domain/api/1.0/sally/notes/ - Gets you all notes (without
sending content).  Since you're not creating notes in Tomdroid, any
notes in your database that aren't in that list should be deleted from
the database (if you are creating notes, look at SyncManager.cs in
Tomboy to see the way we do it - you would need to store per-note
last-sync-revision information).

http://domain/api/1.0/sally/notes/?include_notes=true&since=455 - Gets
you all new/updated notes (including content) since revision 455.
This means you need to store the last sync revision returned from
Snowy.  Note that this number is always returned by the Notes resource
(if you are authenticated).

Hope this helps,
Sandy

___
Mailing list: https://launchpad.net/~tomdroid-dev
Post to : tomdroid-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~tomdroid-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Tomdroid-dev] Snowy synchronization branch

2009-08-24 Thread Benoit Garret
On Mon, Aug 24, 2009 at 3:59 PM, Sandy
Armstrong wrote:
> Out of curiosity, does your web-sync branch handle server-side
> deletes?  I'm guessing not, since a quick grep in the source code
> indicates that you're not tracking the last sync revision.  This also
> means that every time you sync, you are getting every single note on
> the server.  You could save bandwidth by tracking the last sync
> revision, and only getting note updates since that revision (this
> would also allow you to process deletes if you wanted to).

You're right, it doesn't support that at the moment. I will handle
that as soon as I get the note guid stored in the database. There's
still one thing I didn't quite get about the remote note deletion. The
examples of GET requests on http://domain/api/1.0/user/notes don't
mention note deletion. Is that an omission or should I be able to
infer the deleted notes from the response (in that case, I don't see
how I could do that)?

Cheers,

Benoit

___
Mailing list: https://launchpad.net/~tomdroid-dev
Post to : tomdroid-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~tomdroid-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Tomdroid-dev] Snowy synchronization branch

2009-08-24 Thread Benoit Garret
On Mon, Aug 24, 2009 at 6:32 PM, Olivier
Bilodeau wrote:
> That's awesome!
> As far as the switch from note directory to the database goes, do you feel
> that your code has any regression? If not, i'll review that portion quickly
> then merge it and start looking at the editing problem.

Everything should be working as before, except the load note from web
feature. I cannot think of a case where it would be useful and I'm
really tempted to remove it. Would you accept a branch or a patch for
this?

I'd like to work a bit more on this before it gets merged. If I'm not
mistaken, Tomboy and Snowy use the guid as an unique identifier for a
note. I'd like to add this field in the database and make sure we use
it everywhere we need to uniquely identify a note. This would be
useful to implement remote note deletion as Sandy suggested.

___
Mailing list: https://launchpad.net/~tomdroid-dev
Post to : tomdroid-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~tomdroid-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Tomdroid-dev] Snowy synchronization branch

2009-08-24 Thread Olivier Bilodeau
That's awesome!
As far as the switch from note directory to the database goes, do you feel
that your code has any regression? If not, i'll review that portion quickly
then merge it and start looking at the editing problem.

I'll try to have a full day of tomdroid hacking in the near future..

On Mon, Aug 24, 2009 at 6:44 AM, Benoit Garret <
benoit.garret_launch...@gadz.org> wrote:

> Hi list,
>
> I'm currently trying to have Tomdroid synchronize with Snowy. I've set
> up a branch at https://code.launchpad.net/~benoit.garret/tomdroid/web-sync
> which contains the work so far. I've reached a stage where things are
> testable, meaning a bit useful but still not ready for the everyman.
> It is not doing any synchronization per se, but it fetches all remote
> notes and inserts them in the tomdroid database. As notes currently
> aren't editable, I don't think we would benefit from much more than
> that at the moment.
>
> If anyone is interested and is willing to download, compile and test,
> I'm open to feedback and suggestions about code, bugs, UI design,
> features or whatever you think could be useful. I would also be happy
> to help if someone has a problem setting up a local instance of the
> snowy server to test the code.
>
> Cheers,
>
> Benoît Garret
>
> ___
> Mailing list: https://launchpad.net/~tomdroid-dev
> Post to : tomdroid-dev@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~tomdroid-dev
> More help   : https://help.launchpad.net/ListHelp
>



-- 
Olivier Bilodeau 
___
Mailing list: https://launchpad.net/~tomdroid-dev
Post to : tomdroid-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~tomdroid-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Tomdroid-dev] Snowy synchronization branch

2009-08-24 Thread Sandy Armstrong
On Mon, Aug 24, 2009 at 3:44 AM, Benoit
Garret wrote:
> Hi list,
>
> I'm currently trying to have Tomdroid synchronize with Snowy. I've set
> up a branch at https://code.launchpad.net/~benoit.garret/tomdroid/web-sync
> which contains the work so far. I've reached a stage where things are
> testable, meaning a bit useful but still not ready for the everyman.
> It is not doing any synchronization per se, but it fetches all remote
> notes and inserts them in the tomdroid database. As notes currently
> aren't editable, I don't think we would benefit from much more than
> that at the moment.
>
> If anyone is interested and is willing to download, compile and test,
> I'm open to feedback and suggestions about code, bugs, UI design,
> features or whatever you think could be useful. I would also be happy
> to help if someone has a problem setting up a local instance of the
> snowy server to test the code.

This is great, Benoit!  Please keep an eye on Snowy git, as in the
next week or so I should be merging a patch that changes the API a bit
(these changes are already documented on the wiki page).

Out of curiosity, does your web-sync branch handle server-side
deletes?  I'm guessing not, since a quick grep in the source code
indicates that you're not tracking the last sync revision.  This also
means that every time you sync, you are getting every single note on
the server.  You could save bandwidth by tracking the last sync
revision, and only getting note updates since that revision (this
would also allow you to process deletes if you wanted to).

Looking forward to trying this out,
Sandy

___
Mailing list: https://launchpad.net/~tomdroid-dev
Post to : tomdroid-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~tomdroid-dev
More help   : https://help.launchpad.net/ListHelp