How do you initialize RolapStars for a distributed cache? - mondrian

I need create a distributed cache for Mondrian so I looked at a hazelcast cache implementation https://github.com/webdetails/cdc/blob/master/src/pt/webdetails/cdc/mondrian/SegmentCacheHazelcast.java#L141
It warns:
All relevant RolapStars must have been initialized inside mondrian for this to work.
How do I initialize the the relevant RolapStars?
Thanks.

Just run a dumb MDX query on each cube. Should do the trick.
select [Measures].[Foo] on columns from [Bar]

Related

is there a way to store multiple type of objects in single cacheStore in apache ignite?

I'm trying to do some in-memory calculations, I'm doing it by using Apache Ignite with CacheStore Implementations, where It insisting me to do cross cache joins, which are not working Efficiently.
so is there a way to do store multiple types of Objects in same cache store.
Ignite SQL performance does not depend on weather join is cross-cache or not. If you have performance issues, there should be another reason.
But in any case, you can store multiple data types in a single cache, there is no limitation. The way CacheStore is configured in this case depends of what implementation you use.
Maybe I'm missing the point but can't you just have your things implement the same base class?

Use MyBatis cache to load entire table and query

This is what is want to achieve using MyBatis cache(or combining with ehCache/others):
-load the entire result set for an aggregate query into cache
-ability to query this result set and apply sql based filter(between start and end dates)
I searched around the web but could not find an answer to this. Please help.
Suggestions welcome.
Ehcache has search API, you can load entries to cache and afterwords search it based on whatever criteria you like, including dates.
Of course this means implementing caching mechanism yourself, maybe by extending EhcacheCache or since you're using Spring maybe extending AbstractCacheManager or EhCacheCacheManager could be an option.
But there should be performance conciderations, since cache is mean not for querying, but for caching, especially standalone Ehcache version.

Torquebox Infinispan Cache - Too many open files

I looked around and apparently Infinispan has a limit on the amount of keys you can store when persisting data to the FileStore. I get the "too many open files" exception.
I love the idea of torquebox and was anxious to slim down the stack and just use Infinispan instead of Redis. I have an app that needs to cache allot of data. The queries are computationally expensive and need to be re-computed daily (phone and other productivity metrics by agent in a call center).
I don't run a cluster though I understand the cache would persist if I had at least one app running. I would rather like to persist the cache. Has anybody run into this issue and have a work around?
Yes, Infinispan's FileCacheStore used to have an issue with opening too many files. The new SingleFileStore in 5.3.x solves that problem, but it looks like Torquebox still uses Infinispan 5.1.x (https://github.com/torquebox/torquebox/blob/master/pom.xml#L277).
I am also using infinispan cache in a live application.
Basically we are storing database queries and its result in cache for tables which are not up-datable and smaller in data size.
There are two approaches to design it:
Use queries as key and its data as value
It leads to too many entries in cache when so many different queries are placed into it.
Use xyz as key and Map as value (Map contains the queries as key and its data as value)
It leads to single entry in cache whenever data is needed from this cache (I call it query cache) retrieve Map first by using key xyz then find the query in Map itself.
We are using second approach.

performance issue in find() method after migration to Hibernate 4.0 from OpenJPA 1.2

I migrate from OpenJPA 1.2 to Hiberante 4.0
I'm using TimesTen DB
I'm doing a native query to get id's of object's that I need , and then perform find on each on of them.
In OpenJPA instead of find I used findCache() method and if it return null I use the find() method , In hibernate I used only the find() method.
I performed this operation on the same DB.
after running couple of test I saw that the performance of OpenJPA is far better.
I printed the statistics of hibernate session ( after querying and finding the same object's) and saw that the hit\miss count to the first level cache is always 0.
while the OpenJPA is clearly reaching it's cache by fetching object's with the findCache method.
How can I improve the performance of find in Hibernate ?
I suspect it referred to the difference in the first level cache implementation of this tools.
another fact: I use the same EntityManager for the application run time ( I need to minimize the cost of creating of an EntityManager - my app is soft real time )
thanks.
Firstly, why don't you just retrieve the full objects instead of the id. One select statement to retrieve a number of objects is many magnitude times faster than retrieving each item individually.
Secondly, you likely need a second level cache for hibernate. The first level cache is mostly applicable within each session.
The first level cache in Hibernate corresponds to the session. So if the session has not yet loaded a given object, it will be a miss.
You need to enable second level cache to be able to cache an object by id across sessions.
Check out the reference documentation for more info http://docs.jboss.org/hibernate/orm/4.1/manual/en-US/html_single/#performance-cache

jboss searchable cache

I have jboss eap 5.1 and I am using struts 1.1 in it.Jdk is 1.6. Can it be used with the jboss searchable cache?How much memory can be stored in jboss searchable cache?I want to create google search type on type page load for my application.
I understand that you want to create a searchable page and in order to answer your question appropriately, it will be good to understand what is that you are looking to search?
Are you searching among the objects stored in memory or are you searching among the rows in a database or are your searching a file system?
The fact that you mentioned JBossSearchableCache makes me believe that you might be searching among the objects in memory.
If that is the case, you can only store as much memory as is allocated to your JVM. For example: If your JVM has 1GB allocated you'll have approximately 1GB minus what your runtime needs. If you need more memory then you should consider a Data Grid like Infinispan where you can store all the data in memory in a grid that's highly available and also give you MapReduce capabilities. You can also use Hibernate OGM to write SQL type of queries that span the entire grid.
Hope this helps.
Good luck!

Resources