On Jun 21, 2008, at 3:33 AM, René v Amerongen wrote:

Does someone has any experience about having a local data store which is syncing wit the server store using Coredata?

We have a few 300+ laptop users and 50+ desktop users who are working in the same database.

Now I have to make a similar database but then that the Laptop users can work offline. I would like to have them sync their local copy with the server when they are online again.

Is this possible with Coredata and SQL? Does someone has suggestions in this directions?

Core Data doesn't do this out of the box. What you can do is create a server back-end that the front-end applications synchronize with. You'll have to implement both the server and the synchronization logic yourself, but two-way/multi-way synchronization are themselves actually well-traveled computer science problems.

        Data Synchronization
        http://en.wikipedia.org/wiki/Data_Synchronization

        Category: Data Synchronization
        http://en.wikipedia.org/wiki/Category:Data_synchronization

You'll need to ensure that each entity whose instances you want to synchronize has an additional "sync ID" property that is set to a UUID or something equivalent, and implement one of the standard sync algorithms. Communication with a back-end server that implements a REST-style protocol using Cocoa is very simple as well.

The advantage of doing this is that you can still get all of the benefits of Core Data for work on local systems, and just treat the local Core Data persistent store as a cache for the user's interaction with the server. (In other words, it makes offline/disconnected use of the application feasible.)

Of course you still have to write code to do this, but at least you don't have to switch the application that runs on end-user systems completely away from Core Data to use hand-generated SQL.

  -- Chris

PS - As always, if there are capabilities you'd like to see in Core Data or elsewhere in Cocoa, please file a feature/enhancement request at <http://bugreport.apple.com/>. Feature and enhancement requests are particularly useful if you describe a bit about why you'd like what you're suggesting -- what you'd do with it, what your business case or user base is ("300+ laptop users and 50+ desktop users"), and so on.

_______________________________________________

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