Re: Synchronizing data displayed by two instances of my app
Re: Synchronizing data displayed by two instances of my app
- Subject: Re: Synchronizing data displayed by two instances of my app
- From: Sam Hart <email@hidden>
- Date: Tue, 6 Apr 2004 09:04:11 +0100
On Monday, April 5, 2004, at 10:15 pm, Denis Stanton wrote:
Hi Sam
On 05/04/2004, at 7:53 PM, Sam Hart wrote:
I still feel you should look at Change Notification.
I admit I'm somewhat confused by the choice of methods to use to
ensure that fetches return up to date results, particularly as the
documentation seems to imply that the solutions offered are flawed.
I had not heard of Change Notification in WebObjects before, but I
have used something very similar in Cocoa / Objective-C. It seems to
me that it could only work within a single application. If I am
running more than one instance of my WO application I would not expect
that a notification posted by one instance would be detected by
another - or am I missing the whole point of Change Notifications?
It would be useless in a single app.
Ok here goes ...
I have 2 instances of the same app or different apps which use the same
data.
These may be on the same machine or they may not.
If 1 app changes data the other app is unaware of the change until the
next fetch.
However the next fetch probably will not happen as the app does not
know that it's cached data is stale.
Change notification basically allows you to cluster apps which share
data without a common cache.
When an app changes an object in the data store ( DB ) it then sends a
message ( usually via JMS ) to listening apps.
The listening apps call invalidate object with global id or something
similar in there own object store.
The next request for the object gets a miss in the object store, and
thus goes off to the DB.
Very low overhead, very reliable.
In a single app it isn't needed, at least it shouldn't be, if it is you
are in trouble.
S a m
------------------------------------------------------------------------
------
Drawing on my fine command of language, I said nothing.
_______________________________________________
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.