• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CoreData local and on server sync
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData local and on server sync


  • Subject: Re: CoreData local and on server sync
  • From: Chris Hanson <email@hidden>
  • Date: Sat, 21 Jun 2008 19:20:32 -0700

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 (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


References: 
 >CoreData local and on server sync (From: RenĂ© v Amerongen <email@hidden>)

  • Prev by Date: Re: Bindings Concept Question
  • Next by Date: Re: CoreData local and on server sync
  • Previous by thread: Re: CoreData local and on server sync
  • Next by thread: Re: CoreData local and on server sync
  • Index(es):
    • Date
    • Thread