Hi Kyle,

On 20/6/10, Kyle Sluder wrote:

to temporarily hide sales that are in progress on other machines.
I currently do that but in a more awkward way,

Might you instead want to make a sale an atomic thing? Perform the
sale on a scratch MOC, and then when the sale is complete (or voided),
merge the scratch MOC into the main MOC.

That's a good idea. I do that to a small degree when the sale is first created, so I can "micro-save" it. After that there are so many relationships from the other MOC: products, bikes, customer, employee... that I had felt it might be troublesome. I'm rethinking that.

But that aside, I do actually save in-progress sales during idle time to update the inventory levels so, for example, a bike doesn't get sold twice. Once saved, I need to 'hide' the Sale from other machines.

Also, this seems to imply that you're sharing the same persistent
store amongst all your clients. This way lies madness.

The madness had its four-year anniversary this very day :)

Each machine runs idle-time code which ensures it has recent data from the shared store. It was hard to get right but after a year of tweaking, it works well. SQLite has just enough locking capability to make it work.

The shared store is on a Synology NAS that claims to be able to saturate gigabit ethernet. Its really fast. It has a 128-meg cache and our database is only 30 meg. Flies. Does complex queries and returns the results often in under 5 msec. I've seen 1 msec.

Others have described theoretical alternatives but they don't sound inviting at all and I haven't seen any sample code. A friend gave me a book with a complex alternative which looks complete, at least. Some day, maybe,

I have an irrational hope that Apple will, one day, add another back-end option to Core Data.

All that said, I'm all ears to simple, practical, proven, scalable alternatives with sample code.

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

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

Reply via email to