Saturday, November 14, 2009

How to Refresh Sync from Client

Recently I found that when doing “Refresh from Client” with large volume of data, the Funambol sever will close the connection after the first batch of contacts is sent from the client and the server sends back a status messages. So, only the first batch of contacts is added to the server.

When doing similar operation with Funambol Client plug-in for Outlook, things seem to be all right. Checking the detailed log of the plug-in, I found the sync package is with Replace commands rather than Add commands. This looks strange and inconsistent:
1. When doing “Refresh from Server”, the server send Add commands, and the client will delete local data first before adding records from server.
2. When doing slow sync, the server is working fine with multiple messages of a sync package containing Add commands from client.

I would suspect that the Funambol server might have a bug in dealing with multiple messages of a sync package during the operation of “Refresh from Client”. And the Funambol add-in for Outlook was just made a workaround of using replace commands instead.

The workaround in SyncML.NET is as following:
1. Refresh from Client with an empty dataset, in order to delete all on the server.
2. Slow sync so all local records will be added to the server.