Re: Cocoa Newbie & MySQL
Re: Cocoa Newbie & MySQL
- Subject: Re: Cocoa Newbie & MySQL
- From: Bill Bumgarner <email@hidden>
- Date: Wed, 28 Apr 2010 10:39:07 -0700
On Apr 28, 2010, at 10:35 AM, Jens Alfke wrote:
> SQLite works fine with multiple clients — it uses file locking to support transactions and ACID properties. I’ve used it that way myself. It just doesn’t scale as well as a full server-based system, because doing locking via the filesystem is slower than doing it in memory. But this is unlikely to affect you unless you’re doing really heavy-duty stuff. On the plus side, sqlite is already installed in the OS and is a zillion times easier to maintain than mysql (since the database is just a file, with no special access/permissions issues.)
Only if the underlying filesystem absolutely positively gets locking right. Fine for HFS+, not so fine for various network filesystems and/or other operating systems. Even in the network filesystem case where locking is correct, it may be horrendously inefficient. Coherency can be an issue, too, depending on filesystem.
I.e. avoid network filesystems with SQLite & multiple clients. Down that path lies pain.
Related, don't use SQLite modifications as an IPC mechanism. If you need app A to detect changes to the database from app B, use some other notification mechanism beyond watching the database file for changes.
b.bum
_______________________________________________
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