• 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: EOSharedEditingContext Useful for Read-Mostly?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOSharedEditingContext Useful for Read-Mostly?


  • Subject: Re: EOSharedEditingContext Useful for Read-Mostly?
  • From: Art Isbell <email@hidden>
  • Date: Mon, 26 Jul 2004 17:45:57 -1000

On Jul 26, 2004, at 2:22 PM, Marek Wawrzyczny wrote:

It shares them. As far as my understanding goes, all objects are fetched into the EODatabaseContext,

which places snapshots of fetched objects in its EODatabase object.

your own editing contexts, whether they are session, shared peer or nested ECs all are "children" of the Db EC.

Not sure what you mean by "Db EC" (database editing context?). All EOEditingContexts are children of an EOObjectStoreCoordinator which has one or more EOCooperatingObjectStores (usually EODatabaseContexts) which are mapped to EOModels.


Each time you make changes to an EO, change notification messages are sent up to the DB EC and then down to all the children.

There are many notifications posted and received by EOF objects. EOEditingContext broadcasts an ObjectsChangedInEditingContextNotification when changes to an EO are made. I believe this notification is intended for objects responsible for displaying EO values in a UI. Other notifications are broadcast when an EO is saved to its parent object store. These notifications are eventually received by all other editing contexts so they can update the same EO if it's present in these other editing contexts. What's happening under EOF's covers is very complex and clever.


On 27/07/2004, at 09:25, Hunter Hillegas wrote:

There are about 50 hotels. When using the session context, are they refetched each time or does EOF share the cache between session editing contexts? I am trying to minimize DB roundtrips.

If you explicitly fetch these hotels in your Session object, they will be refetched from the database regardless whether they've been fetched and cached previously. This ensures any new hotels added to the DB by another process will be fetched. Fetching these hotels into a shared editing context maintained by the Application object is a good way to minimize DB accesses at the expense of data freshness should another process add or delete hotel objects from the DB. You can schedule the WO instances to restart after the DB has been refreshed by the cron job.


Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: EOSharedEditingContext Useful for Read-Mostly?
      • From: Marek Wawrzyczny <email@hidden>
References: 
 >RE: EOSharedEditingContext Useful for Read-Mostly? (From: "Mark Edwards" <email@hidden>)
 >Re: EOSharedEditingContext Useful for Read-Mostly? (From: Hunter Hillegas <email@hidden>)
 >Re: EOSharedEditingContext Useful for Read-Mostly? (From: Marek Wawrzyczny <email@hidden>)

  • Prev by Date: Re: EOSharedEditingContext Useful for Read-Mostly?
  • Next by Date: Re: EOSharedEditingContext Useful for Read-Mostly?
  • Previous by thread: Re: EOSharedEditingContext Useful for Read-Mostly?
  • Next by thread: Re: EOSharedEditingContext Useful for Read-Mostly?
  • Index(es):
    • Date
    • Thread