phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [phpGroupWare-developers] Google Summer of Code


From: Christian Rost
Subject: Re: [phpGroupWare-developers] Google Summer of Code
Date: Tue, 24 Apr 2007 18:06:31 +0200
User-agent: Thunderbird 2.0.0.0 (Windows/20070326)

Johan Gunnarsson schrieb:
> I got one thing I've been thinking of. How did you track deletions
> made from within phpgw? Say if a user deletes any given item in phpgw
> (f. ex. a todo item) and then does starts a sync from a client. How do
> you find that deleted item and generate a delete command for the
> client? The historylog could of course be used for this, but I havn't
> found anything that tracks deletions in CVS HEAD. Did you make any
> modifications or have I just missed something?
> 

The tracking changes to syncitems [delete, add, update] is done by the
combination of

- timestamps [last sync, last update of syncitem]
- mappings [syncItem ID from phpGroupware mapped to syncItem ID from client]

The rest will be done by the SyncML protocol and the SyncML client. You
will have something like a unique syncID [syncChannel] for each device
and for each SyncSource [contacts, appointments, ...]. That means if
Johan is going to sync appointments, and if he's never done it before,
he needs a an unique ID for this and the following syncs -  e.g.
syncChannel [1]. If Johan is going to sync contacts he needs another
unique channel ID - syncChannel [2].

##
## DELETE
##
Between two syncs, you delete a syncItem in phpGroupware, but the
syncMapping still exists. Now we have need to deal with two different
situaions
1. the syncItem wasn't updated on the client side
    -> syncItem is deleted via SyncML on client and mapping is deleted
2. the syncItem was updated on the client side
    -> !!! Conflict !!!
    -> Server wins - syncItem is deleted via SyncML on client and
mapping is deleted
    -> Client wins - add syncItem to phpGroupware, add new mapping and
delete old mapping
    -> resolve manually - the most complex situation, we really don't
want this now

You can continue this for "adding" and "updating" a syncItem, and keep
in mind that we need to deal with a two-way and a one-way sync if
needed. This should be a switch (global or per syncChannel) in phpGroupware.

In addition to the code of Guillaume - the existing sync modul is a good
source of information because it is working already. The only thing
that's not part of phpGroupware is the SyncML interface, because the
Funambol server does this. But the SyncML interface could be taken from
the Horde project. If you want to take a look at the code, I can sent
you a tarball.

Christian
-- 
===========================================================
Christian Rost
roCon - Informationstechnologie
Glatzer Weg 4

44534 Lünen

fon: +49 (0) 2306 910 658
fax: +49 (0) 2306 910 664
url: http://www.rocon-it.de










reply via email to

[Prev in Thread] Current Thread [Next in Thread]