Re: Shared CoreData DataModel and DB file..

2009-12-28 Thread Steve Steinitz
Hi Bob, On 28/12/09, Robert Monaghan wrote: Is it possible to share a DataModel and resulting db file between 2 apps? If so, what sort of pitfalls are present? I want to create an App that creates the DB file, and a plugin for another App, that reads the database file. I have 5 machines sh

Re: Shared CoreData DataModel and DB file..

2009-12-28 Thread Robert Monaghan
Ideally, it is on the same machine, with the same user. Again, the DB file is read only, and due to the nature of the data, it isn't likely that the data will be updated while the plugin is reading. I still need to do better planning. bob. On Dec 28, 2009, at 10:29 AM, Mike Abdullah wrote: > B

Re: Shared CoreData DataModel and DB file..

2009-12-28 Thread Mike Abdullah
But from remote and local machine at once? This sounds dangerously like a multi-user setup which Core Data is very much NOT designed for. Trying to force it will only result in pain later. On 28 Dec 2009, at 18:19, Robert Monaghan wrote: > Nice! I suspected as much. > > So, I should implement

Re: Shared CoreData DataModel and DB file..

2009-12-28 Thread Robert Monaghan
Nice! I suspected as much. So, I should implement a file lock mechanism, as well, then. I have every reason to believe that people would use the database file over a network filesystem. bob.. On Dec 28, 2009, at 10:09 AM, Mike Abdullah wrote: > Yes. If you use the SQLite store, it automatica

Re: Shared CoreData DataModel and DB file..

2009-12-28 Thread Mike Abdullah
Yes. If you use the SQLite store, it automatically uses filesystem locking. Indeed, that is how CalendarStore and AddressBook operate under the hood these days I believe. The major caveat is that the locking doesn't work if the file is accessed from two different filesystems. i.e. a local file

Shared CoreData DataModel and DB file..

2009-12-28 Thread Robert Monaghan
Is it possible to share a DataModel and resulting db file between 2 apps? If so, what sort of pitfalls are present? I want to create an App that creates the DB file, and a plugin for another App, that reads the database file. Thanks! bob.. ___ Cocoa