Re: Sync Services between Address Book and a web server
Re: Sync Services between Address Book and a web server
- Subject: Re: Sync Services between Address Book and a web server
- From: "Alexander F. Hartner" <email@hidden>
- Date: Fri, 21 Mar 2008 18:13:12 +0000
Hi Dave,
I have also been working on something quite similar to this for some
time now, however I have been using Sync Services. Take a look at
http://www.addressbookserver.com which uses WebServices (SOAP) to
transfer Address Book content to a central server, which is also
platform independent. The server can be configured to use most modern
relational database and could potentially be used for all sorts of
integration with other applications / purposes.
What framework are you currently using to access the Address Book
content. Sync Services present quite a different interface, compared to
the older Address Book API. Sync Services is quite useful as it figures
out the differences between the server and each client for you, however
it seem that you already bridged this hurdle.
The SyncServices framework basically handles 2 types of events, a push
(writing to the truth db) and a pull (when you read from the truth db).
During each interaction the you would first perform a push, then the
sync engine will figure out the difference and provide you the changed
during the subsequent pull. The type of objects uses a nested
directories, which are not directly modeled on the underlying data, but
rather able to pass the data in a generic way. So you don't get the same
object model used by the Address Book API.
Have fun
Alex
Dave Hersey wrote:
> Hi,
>
> I've got an existing Cocoa application that's been around since 10.2
> and syncs user data with a client's workgroup management server. The
> app does everything directly via SSL to the server and works very well
> from 10.2 through 10.5, but the client is considering converting it to
> use Sync Services. He does not want to require .Mac, and he wants to
> continue to sync with his non-Mac web server.
>
> The server participates in syncing via XML requests and responses. The
> app requests the current data from the server, compares that against
> the local data, determines which side (if any) should make
> modifications, deletions and additions, and tells the server of any
> changes that it needs to process. On the local machine, the data
> that's being changed is in the Address Book, but we may want to sync
> iCal with the web server's calendar at some point too.
>
> I'm not sure how to best adapt this application to Sync Services since
> the web server behavior will (ideally) not be changing, and again the
> server is not a Mac so it's not running Sync Services itself.
>
> It seems like I'd need to make the same XML calls to the server to get
> its current state and build a representation of that, then build a
> similar representation of the current state of the local machine, then
> call Sync Services to sync the two representations and create local
> and server "diff" files. After that, the app would need to apply the
> local diffs and send XML back to the server for any data that it needs
> to change.
>
> Is that correct? Do I need to act as a proxy for the real data sources
> involved in this sync? It just doesn't seem like I'm gaining much from
> going to Sync Services if that's the case, since I'd have to write
> additional code for handling conversions to the "state
> representations," write additional code for applying the sync
> differences, the only code that would be removed would be the sync
> logic, and I'd still need to apply some filtering to that.
>
> Can anyone think of a better approach to doing this? The client was
> hoping for a simpler solution with Sync Services being handed a schema
> and handling most everything, but with the apples and oranges syncing
> that's going on (e.g. Address Book data and responses to server calls)
> I don't see how that's possible.
>
> Thanks,
>
> - d
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden