• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What is the best way to synchronize EOs between coordinators?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the best way to synchronize EOs between coordinators?


  • Subject: Re: What is the best way to synchronize EOs between coordinators?
  • From: "Pierce T. Wetter III" <email@hidden>
  • Date: Thu, 1 Jun 2006 13:00:40 -0700

On Jun 1, 2006, at 2:35 AM, Adam Czysciak wrote:


Hi everyone!

Lately I discovered this Wiki article on EO objects freshness.
http://en.wikibooks.org/wiki/Programming:WebObjects/EOF/Using_EOF/ Caching_and_Freshness#Recommended


Previously I've been synchronizing objects with EOF delegate - whenever object changes (new/updated/deleted), I do invalidate its GID in all of my registered coordinators. The good point is that I can control which entities and which actions need to be synchronized. But - this technique of course may cause EOF locks.

For me it looks that setting default lifetime for objects *may* improve the process, however in some cases it will cause useless fetches.

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.


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 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.

 Pierce


WOTip: WebObjects will be more then happy enough to pass along any id='blah' setting you put in the .wod file for use with Javascript and the DOM.
More Tips: http://www.twinforces.com





_______________________________________________ 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
  • Follow-Ups:
    • Re: What is the best way to synchronize EOs between coordinators?
      • From: Lachlan Deck <email@hidden>
  • Prev by Date: Re: Updated objects not present in updatedObjects() array ?
  • Next by Date: Help with code screen using model-view-controller
  • Previous by thread: What is the best way to synchronize EOs between coordinators?
  • Next by thread: Re: What is the best way to synchronize EOs between coordinators?
  • Index(es):
    • Date
    • Thread