Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 179681

What is the best practice for embedded map?

$
0
0

I want to move a cache (multi-level embeded map) to Gemfire, and want to get some suggestion, thanks.

 

The current cache is Map<Integer, Map<Integer, Map<Integer, Map<Boolean, MyObject>>>>

You can treat the for level as year, month, week, and day.

It is easy to get data at any level by current implementation.

 

I think out three solutions for Gemfire.

S1: Use String as key, and Map<Integer, Map<Integer, Map<Boolean, MyObject>>> as value.

It is simplest for implementation, but the data update have poor performance. One MyObject change will lead to whole value propagation (the map may include several million MyObject instances).

 

S2: Use Object(String, Integer, String, Boolean) as key, and MyObject as value. Use OQL to get each level data.

Can OQL be as fast as current implementation?

 

S3: Use dynamic region, but not sure if it is implementable?

Can dynamic region be created on dynamic parent retgion?                             

                                             ReplicatedRegion

                                                 /               \

                                               /                  \

                                       dynamicY2012    dynamicY2013

                                          /               \

                                         /                 \

                                     dynM1 ....       dynM12

                                        /

                                     dynW1

                                      /

                                    dynD1 dynD2


Viewing all articles
Browse latest Browse all 179681

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>