Alex replied to me off list, so for the archives, here's what he said. It's a great summary of how things work.

--------------------------------------------------------------------------------------------

You first register your application with the Sync Service. At registration you register for specific elements of the Address Book Sync Schema. Optionally you can also register a tool (command line app) which is called by the Sync Service from time to time, when changes are made to the specified elements.

A sync session occurs either when triggered by the user manually, or by either Sync Services or launchd (scheduler) calling the tool. During each session you first negotiate a sync mode. You can either Pull-Only, Push-Only or Push-Pull. There are a couple of parameters which you can also set during the negotiation phase.

Once the negotiation is complete you typically push your records. At this stage you have the option to either push all records, or only the records which have changed. This is specified by the parameters during the negotiation phase.

Then the sync engine will enter the "mingle" phase during which the pushed records are merged with the truth.

After the mingle phase comes the pull phase typically, during which the difference identified by the mingle phase is pulled from the truth.

Where you obtain the records to push or store the records pulled is left up to you. You should however keep track of the unique identifier for each record, at least I found it helpful. These identifiers also get reset from time to time (client reset, disable etc) and it can be quite a challenge to get an entire network of clients synchronised and stable on the same identifiers.

--------------------------------------------------------------------------------------------

Thanks again, Alex.

- d

On Mar 21, 2008, at 3:10 PM, Dave Hersey wrote:
Thanks for the info. Alex. Right, the code in question uses the Address Book framework, and all the sync logic was worked out and has been performing well. Since this work was originally done for 10.2, Sync Services wasn't around yet. Ideally, all of the AddressBook framework calls would go away and we would use Sync Services instead.

So, do you make SOAP calls outside of the Sync framework to move data to/from the server, or is there a way to set up a Sync Services client that talks to the server directly? It's not clear to me if Sync Services can handle the communication, if it gives you hooks to perform that communication, or if it just works off of data that I need to get to the local machine. Also, what is the data that you store on the server? Is it the truth database, Address Book data or something else... Or, do you not have to put the data on the server because the web database is specified in the schema or something like that, and Sync Services handles the data transfer for you?

I'm trying to understand the how the client/server communication works. I couldn't find a good explanation of this in the docs.

Thanks,

- d

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to