[sync] SyncML working! step 3/3

Karsten Fourmont fourmont at gmx.de
Wed Jun 30 10:11:56 PDT 2004


Hi,

so here's the new SyncML package. A lot has changed and some files were 
added. So it's a complete tarball rather than a patch.

The tar is supposed to be extracted directly into /usr/share/php/Horde 
(or wherever your  PEAR dir is.) It contains SnycML.php and SyncML/** Be 
aware that any re-installation/update of the horde framework overwrites 
the SyncML-code.

Once this tarball has made it to CVS I promise to deliver further 
changes relative to the framework :-)

I also attached 3 .txt files in docs.zip with some documentation that 
can go to the docs directory:

1) "SyncML code program flow.txt"
some very sketchy notes I did while trying to figure out how the
SyncML package is organised. Far from complete or being good English.

2) SyncML Primer
A very brief introduction to the SyncML protocol.

3) install-p900.txt
Installation instructions for the P800/900. Other phones should
be similar.

So here's how it works:

Upon first connection a "SlowSync" is done. This is currently 
implemented by merging all the data from the client and the server.
So the resuling dataset is the set union of both sets.
For adjacent syncs, a TwoWaySync is used: here only the differences 
since the last sync are transferred. This should work for adds, modifies 
and deletes on both sides.

Logging is done with strings starting with "SyncML:" and loglevel debug
so you might want to run a tail -f horde.log | grep "SyncML:" to
avoid beeing cluttered with endless DataTee log output.

Of particular interest is the last log message:
it gives a summary about the six transfer types:
    (server|client)-initiated (add|modify|replace)
Sou you can track whether the actions of syncml makes sense or not.
It's loglevel info so it's there even if you don't have your horde 
install set to loglevel debug.

At the moment collision policy is simple: "client wins" (as it's the 
client who sends its changes first). That's certainly not the last word 
on that matter.

Currently things work fine with (simple) kronolith events, mostly fine 
with mnemo notes and rather basic (title and desc only) with nag tasks. 
Improving support in this area is mostly an issue of the respective 
applications and of SyncML.


Here are some hints if problems occur:

make sure the /tmp/sync directory exists and is writeable by your 
webserver (user might be wwwrun). Try to Sync once more and check the 
input/output in this directory.

Maybe change your php.ini settings so php logs ERROR messages and 
NOTICEs in a file as well. Check this file. Your phone gets confused 
when the XML is cluttered with stuff like
"PHP Notice:  Undefined index:  body in /blah/blub.php on line 256"


OK, that's it. I'm really curious if somebody else can get this thing 
running.

Cheers,
   Karsten



More information about the sync mailing list