[Mondrian] Mondrian Orchestrator SPI

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


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

    public enum Task {

        /** Task related to the execution of a MDX query coming from
the user thread. Low priority. **/

        /** Task related to the execution of a sub query. High priority. **/

        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.

Some explanations on the SPI.

Here is some more functional documentation explaining how the segment
cache interacts with Mondrian.


More information about the Mondrian mailing list