Hi Flavio,

While Apple, SQLite, myself and any sensible software developer advise against 
it, Core Data can run multi-user by placing the database on a server which 
supports AFP (e.g. a fast Synology NAS over gigabit ethernet).

SQLite has limited optimistic locking support, but the record locking will only 
work over AFP.

As mentioned elsewhere, you still have the (big) problem of keeping the cached 
objects of each Mac up to date.  We do it by getting fresh data from the 
database, then saving, every minute (plus or minus random seconds) during idle 
time.  The "refresh" code is complicated, ugly and big -- with bad smells 
abounding.

To make it work at all in Leopard and beyond (when Apple finally put their foot 
down on this abomination) you need to set a special Apple SQL pragma when 
creating your persistent store.  Our line of code looks like this:

        [pragmaOptions setObject: [NSNull null] forKey: @"lock_proxy_file"];

A retailer has been doing this for their Point of Sale (and back-office) on 
seven Macs for six years.  We lost a little data a couple times in the early 
days and we occasionally get a glitch under heavy Saturday load, but we've 
tamed the beast and now it works surprisingly well -- and fast.  

Be warned that there are, as Ben Trumbull once colorfully observed, "sharp 
edges".

Cheers,

Steve
_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to