[Mondrian] FW: new dimension cache-control API

Julian Hyde jhyde at pentaho.org
Wed Jan 30 20:34:15 EST 2008

Mondrian developers,
Marc posted this message to the forums last week. This is an important
change, and I know not everyone subscribes to the forums, so here it is for
your review.

I'm working on an extension to the Cache Control API.

This interface (mondrian.olap.CacheControl) helps deal with dynamic data
sources. For efficiency mondrian saves the results of database queries,
keeping a cache of cell values. If the underlying data changes, the saved
values of some cells become wrong. When an application is aware of the data
changes (it monitors them, or it causes them), it can call CacheControl to
specify regions of cells as outdated, and mondrian will flush them from its

I plan to extend this control to another cache that keeps data about
dimensions. In some applications this data is dynamic too: member attributes
can change, and (more importantly) a dimension hierarchy can be
restructured, which may change the membership of higher levels. This can
redefine cells and change cell values.

For example, consider a dimension Location, with levels Country, Region,
State, City. Suppose that a City moves in the hierarchy: say that Fishers
Island, New York is annexed by Connecticut. Note that Connecticut and its
region (New England) gain population etc, while New York and its region
(Mid-Atlantic) lose; however both regions are in the same country, which
doesn't change. A cell defined by state=CT or by state=NY may change, while
a cell defined by state=NJ or region=WestCoast won't change.

The new API assumes that the application is aware of dimension changes,
especially when the dimension data comes from a database. With the new
interface, there are two ways to track these changes: 

*	a caller can modify the cached data, changing member attributes or
rearranging the hierarchy
*	a caller can specify a set of changed members, flushing them from
the cache

In both cases, Mondrian figures out what cells are affected, and flushes
them from the cell cache.

The target date for this feature is the end of Feb 2008. With luck it will
be part of the next Mondrian release. A proposed java interface is attached.

Thanks in advance for comments and suggestions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20080130/4170c0e6/attachment.html 

More information about the Mondrian mailing list