Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Talk:EclipseLink/DesignDocs/356812"

Line 1: Line 1:
Shaun:
+
[[User:Shaun.smith.oracle.com| Shaun Smith]]
  
 
1. The name of the feature should be generalized to refer to "external" change events rather than "database" change events.  Notification may be coming from an external system via, say JMS, which knows that certain data has been modified (maybe by itself).  The database is only one source of external notification.
 
1. The name of the feature should be generalized to refer to "external" change events rather than "database" change events.  Notification may be coming from an external system via, say JMS, which knows that certain data has been modified (maybe by itself).  The database is only one source of external notification.
Line 36: Line 36:
 
:[[User:Gordon.yorke.oracle.com|Gordon Yorke]] 14:32, 7 September 2011 (UTC)  
 
:[[User:Gordon.yorke.oracle.com|Gordon Yorke]] 14:32, 7 September 2011 (UTC)  
 
:From an extensibility perspective adding a new annotation for ChangeNotification or a new @Cache attribute may be better than limiting this to CacheInvalidation.  If we do add other forms of change notification in the future it will be confusing to have multiple ways to configure this or bad form to deprecate an Enum element.  Also Cache Expiry could be used in combination with Change Notification to work around the limitations (eg, Secondary Tables, Join Tables)
 
:From an extensibility perspective adding a new annotation for ChangeNotification or a new @Cache attribute may be better than limiting this to CacheInvalidation.  If we do add other forms of change notification in the future it will be confusing to have multiple ways to configure this or bad form to deprecate an Enum element.  Also Cache Expiry could be used in combination with Change Notification to work around the limitations (eg, Secondary Tables, Join Tables)
 +
 +
[[User:Shaun.smith.oracle.com|Shaun.smith.oracle.com]] 19:15, 7 September 2011 (UTC) We have a number of people concerned with the additions to the EclipseLink API coming out of this feature.  James, can you review the comments and concerns and perhaps consult with Gordon on how we can keep the API general enough for future extensions and sufficient to support your current concerns and come back with a proposal?

Revision as of 15:15, 7 September 2011

Shaun Smith

1. The name of the feature should be generalized to refer to "external" change events rather than "database" change events. Notification may be coming from an external system via, say JMS, which knows that certain data has been modified (maybe by itself). The database is only one source of external notification.

We already have the RCM cache coordination API that can receive change events from JMS or other sources. This feature is specific to the events come from database changes. I don't think we want to confuse it with RCM. The "database" can refer to the changes being raw database changes, not having to come directly from the database.
James.sutherland.oracle.com 15:57, 6 September 2011 (UTC)

2. Secondary tables, join tables, etc. can be supported through examination of the descriptors. I have done this myself with secondary table.

No, they cannot. With Oracle DCN only the ROWID is given, so there is no way to related the ROWID from a secondary table or relationship to the ID. Secondary table would be possible, but complex, as we would need to select the ROWID from all secondary tables (in selects and after inserts), and index these in the cache as well. Join tables and relationships would not be possible, we would need to select the foreign keys from the related table using the ROWID and then use the foreign keys to determine the ID (which may require another select). This would be very complex and very expensive, so is left for future development.
Note the generic API does not in anyway prevent supporting relationships, it is only not supported for Oracle DCN.
James.sutherland.oracle.com 15:57, 6 September 2011 (UTC)
Gordon Yorke 14:32, 7 September 2011 (UTC)
We should clearly document these restrictions and log warnings when change notified Entities have these mappings.

3. The Oracle database "DCN" feature has been renamed "QCN": Query Change Notification. I'm not sure in what release of Oracle DB this renaming took place.

It was called DCN in 10.2, and the query feature was added in 11g. It supports both DCN and QCN in 11g. In terms of our usage we are using the DCN part, not the query part. Perhaps just rename to Oracle Change Notification?
James.sutherland.oracle.com 15:57, 6 September 2011 (UTC)


4. This feature focuses on invalidation while it may be the case that the updated data for an object(s) is part of the change event. When available, it should be possible to update the cache with the new data rather than invalidate.

The generic API does not prevent other listeners from providing other options. The API is pretty minimal, just an interface and some callbacks. The main work for this feature is to support Oracle DCN.
James.sutherland.oracle.com 15:57, 6 September 2011 (UTC)


Should this be called expiryType (CacheExpiryType) instead of invalidationType (CacheInvalidationType)? The @Cache annotation already has expiry and expiryTimeOfDay elements. I assume this new enum will work in conjunction with those settings? There could be validation if invalidationType was set to Daily and Cache expiry was set instead of expiryTimeOfDay --Karen.moore.oracle.com 17:03, 6 September 2011 (UTC)

Invalidation is a super set of expiry. Expiry means invalidated because of its age. But you can invalidate for other reasons, such as from database change events. The native API policy is called CacheInvalidationPolicy, with Daily, TimeToLive and NoExpiry subclasses, this will add a forth subclass of Database. The DailyCacheInvalidationPolicy has an expiry time. The existing expiry settings will need to be validated with the type, I considered adding a new annotation, but since @Cache already had these settings, decided to keep the configuration in one place.
James.sutherland.oracle.com 17:23, 6 September 2011 (UTC)


Gordon Yorke 14:32, 7 September 2011 (UTC)
From an extensibility perspective adding a new annotation for ChangeNotification or a new @Cache attribute may be better than limiting this to CacheInvalidation. If we do add other forms of change notification in the future it will be confusing to have multiple ways to configure this or bad form to deprecate an Enum element. Also Cache Expiry could be used in combination with Change Notification to work around the limitations (eg, Secondary Tables, Join Tables)

Shaun.smith.oracle.com 19:15, 7 September 2011 (UTC) We have a number of people concerned with the additions to the EclipseLink API coming out of this feature. James, can you review the comments and concerns and perhaps consult with Gordon on how we can keep the API general enough for future extensions and sufficient to support your current concerns and come back with a proposal?

Back to the top