[Mondrian] connection pooling/cache linked to connection?

Paul Stoellberger p.stoellberger at gmail.com
Fri Jul 20 11:30:19 EDT 2012


Hi,

Since I'm just investigating some caching issues I had to change our way of handling connections.
We used to have one connection per user / session that would be reused all the time for query executions, metadata requests, etc.

Now it seemed like if we keep it that way that the cache with other classes that create an olap4j/mondrian connection won't be shared unless I switch to "constant" connection creation (every time a connection is requested a new one will be created).

Is the assumption correct that cache sharing cant happen unless this is done?
(It seems to work with creating new connections all the time)

If so, I looked at the MondrianServer connectionMap and I can see a whole bunch of connections in there (we don't close them at the moment, as we reuse them all the time)
and I'm a bit worried that they don't get cleaned up... there are easily dozens of connections in there after a while.

How would you recommend handling this?
When we introduce some sort of connection pooling I'm afraid the cache sharing won't work or shall i create new connections all the time and just make sure I close them again once they've been used?

All of the above is very mondrian specfic. Since there is no real caching layer for XmlaOlap4jConnections that would have an extreme negative Impact on them.
I know that there are some existing caching providers for xmla, but they're more or less useless if the connection is using roles or e.g. CustomData.

I would try to avoid handling all connection types differently if possible, so having a common API to e.g. clear the cache would be quite good.
Would you say thats something we can introduce in the future or do you disagree in having those common calls at all?


-Paul



More information about the Mondrian mailing list