[Mondrian] Mondrian Orchestrator SPI

Luc Boudreau lucboudreau at gmail.com
Thu Sep 29 10:16:34 EDT 2011


Pedro,

Let's take that conversation to the public mailing list, shall we?

Since you'll be writing a hazelcast implementation of the SegmentCache
SPI, we might throw into the deal a new SPI for Mondrian so we can
leverage hazelcast's task distribution capabilities.

Hazelcast can return a java.util.concurrent.ExecutorService. For
Mondrian, this means that it would simply have a new SPI which would
provide that service to the RolapResultShepherd. The default
implementation will run the tasks on the local machine, while allowing
the community to build their own executor service and customize how
and where the queries are executed by a cluster of Mondrian nodes.

Better yet, we can isolate Mondrian further and create a simpler SPI,
something along the lines of:

public interface Orchestrator {

    public <T> Future<T>execute(FutureTask<T> delta, Type type) throws
MondrianException;

    public enum Task {

        /** Task related to the execution of a MDX query coming from
the user thread. Low priority. **/
        MDX_USER_QUERY(0),

        /** Task related to the execution of a sub query. High priority. **/
        MDX_SUB_QUERY(10);

        private final int priority;

        private Task(int priority) {
            this.priority = priority;
        }

        /** Returns the priority of this type of task, relative to other types,
            on a scale of Integer.MIN_VALUE to Integer.MAX_VALUE.
            A reference priority of 0 is given to MDX queries sent by a
            user on a user thread. **/
        public int getPriority(int priority) {
            return this.priority;
        }
    };
}

I'd like some review from other users of Mondrian on that API, if
possible. If someone has a better idea, please share.

If you want some more documentation on the SegmentCache SPI, here is a
list of some resources.

Here is the actual API.
http://perforce.eigenbase.org:8080/@md=d&cd=//open/mondrian/src/main/mondrian/spi/&cdf=//open/mondrian/src/main/mondrian/spi/SegmentCache.java&rc=s&sr=14276&c=sbY@//open/mondrian/src/main/mondrian/spi/SegmentCache.java

Some explanations on the SPI.
http://devdonkey.blogspot.com/2011/02/mondrian-spi-segmentcache.html

Here is some more functional documentation explaining how the segment
cache interacts with Mondrian.
http://wiki.pentaho.com/display/analysis/Pentaho+Analysis+EE#PentahoAnalysisEE-ArchitectureofaMondriannode


Luc


More information about the Mondrian mailing list