re: Core Data : Multiuser ?
re: Core Data : Multiuser ?
- Subject: re: Core Data : Multiuser ?
- From: Ben Trumbull <email@hidden>
- Date: Fri, 6 Aug 2010 23:38:24 -0700
> Can more than one process be accessing the same Core Data sqlite file?
>
> This post from author Marcus Zarra says "no"∑
>
> http://forums.pragprog.com/forums/90/topics/1476
>
> But this post from Ben Trumbull seems to say "yes", as long as the two processes are accessing it via the same filesystem:
>
> http://www.cocoabuilder.com/archive/cocoa/184606-core-data-file-sharing-via-an-afp-alias.html
>
> Which one am I misunderstanding?
There is a big difference between multiple processes accessing the same Core Data file and multiple machines. Multiple processes on the same local machine work fine. Several Apple products do this. Multiple processes across multiple physical machines will not work well (AFP) or at all (NFS).
So we don't recommend targeting a multi-user configuration. As I mentioned in that earlier post, your best bet is probably write the proper service that uses Core Data, and vends to your client processes via IPC (like a web service). The client processes might independently use Core Data for local caching (replication).
It possible, but inefficient, for a very limited number of clients to share over AFP. NFS doesn't work correctly at all. This is restricted by file caching issues underneath us. There are a lot of limitations and sharp edges here, so we actively recommend against multiple computers simultaneously accessing the same db. Support for it is disabled by default for projects built with a deployment target >= 10.6
- Ben
_______________________________________________
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