Re: What is the best way to synchronize EOs between coordinators?
Re: What is the best way to synchronize EOs between coordinators?
- Subject: Re: What is the best way to synchronize EOs between coordinators?
- From: Lachlan Deck <email@hidden>
- Date: Mon, 5 Jun 2006 08:53:23 +1000
Hi there,
On 02/06/2006, at 6:00 AM, Pierce T. Wetter III wrote:
On Jun 1, 2006, at 2:35 AM, Adam Czysciak wrote:
What is your experience guys? Is setting the default fetch
timestamp lag recommended? If so, what value do you recommend? (I
know, this is really app specific...)
I've never had good luck with the object timestamp thing. What ends
up happening is any object you cached gets arbitrarily refetched
when you least expect it.
Well the 'object timestamp thing' is always a factor. It's not an
either/or choice. It's just a matter of time ;-) before the tsl
(timestamp lag which defaults to 1 hour) kicks into play...
Instead, what we do is all of our servers run something called
spread. (http://www.spread.org) That basically gives us a robust
broadcast messaging system so that we can publish messages to all
the servers.
We then use a category on EOEditingContext
<wish>Bring back WO-Objective-C ;-)</wish>
to add a method called "saveChangesAndNotify". We use this method
anytime we want to broadcast that an object has changed. This calls
processRecentChanges to get a list of the changed objects, then
broadcasts the GIDs on the invalidate channel. Processes that care
connect to the invalidate channel on their local spread daemon and
invalidate the GID (which invalidates it in all the local ecs. )
It's simple, it works, and its not very application specific
because you can selectively choose where to call saveChanges() and
where to call saveChangesAndNotify(). You can even make sure that
the parent relationships get refetched by adding the GID of the
parent to the broadcast as needed; something the fetch timestamp
may not do.
Interesting framework. Thanks for pointing it out...
with regards,
--
Lachlan Deck
_______________________________________________
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