Re: "Static" objects in EC (was: multi-instance sync woes)
Re: "Static" objects in EC (was: multi-instance sync woes)
- Subject: Re: "Static" objects in EC (was: multi-instance sync woes)
- From: OC <email@hidden>
- Date: Mon, 08 Dec 2014 16:33:40 +0100
Samuel,
thanks!
On 8. 12. 2014, at 16:12, Samuel Pelletier <email@hidden> wrote:
> 2- For complex objects with relationships to others EOs, it is easier to store them as real EOs in the database
Conceptually, I don't really like that they will make a copy in each EC, given they are inherently read-only, there should be a way to share them :) But well, I appreciate that sharing probably would bring more woes than advantages, and memory is cheap these days :)
One of my problems with this approach is the synchronization -- the plists which describe my static objects in the application might change for a new version. Then, if the database contains old ones, I have to run a comparatively complex code to synchronize (remove ones which should not exist anymore -- checking and fixing relationships --, change the contents of the updated ones, etc.)
With more instances, I also will have to lock through an extra table (or something like that), so as more instances don't clash with the sync code. At the moment, my code does not lock, and it leads to problem often.
(To make it even uglier, my old code -- written for single-instance -- did not sync all "statics" at start, but lazily, when the appropriate entity was used for the first time. That, of course, made the concurrence problems worse.)
Still, it is well possible it's the easiest and best approach, and I definitely will try the trick with GlobalIDs, thanks a very big lot!
OC
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden