Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

Question about partitioned cluster schema

I have one PU, when the PU is deployed, about 10000 objects are loaded from a data base, I´m using a partitioned cluster schema with 2 cluster instances. The partition 1 has 10000 objects and partition 2 has 10000 objects too. When my application does a read multiple operation, the application returns an object two times, I think one per partition, I need no duplicated objects... How can I solve this... I need to point to only one instance?

Thanks

Attachments

  1. pu.xml

This thread was imported from the previous forum.
For your reference, the original is available here

asked 2008-06-24 17:55:06 -0500

nullcipher2 gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

Your cluster external data source settings need to be configured.
You should run in shared data source mode to make sure each partition will load the correct data. Make sure you have routing field declared.
If you are using 6.0 make sure your routing field and id decorations are using the same field. This limitation has been lifted with 6.5.
I recommend you to use the open spaces hibernate data source which comes with 6.5 and implement the initial load method to allow each partition to query the relevant data set from the database. Without this optimization each partition will load all the data and filter out the relevant data which could take long time and consumes memory.

Please note that with cache policy ALL IN CACHE all the data will be loaded and with LRU half of the cache size amount of objects will be loaded.

Take a look here:
http://www.gigaspaces.com/wiki/display/GS6/Read-ThroughandWrite-ThroughinClusteredSpace#Read-ThroughandWrite-ThroughinClusteredSpace-PartitionedClusteredSpace
http://www.gigaspaces.com/wiki/display/GS6/Read-ThroughandWrite-ThroughinClusteredSpace#Read-ThroughandWrite-ThroughinClusteredSpace-Configuration
Shay

Attachments

  1. pu.xml

answered 2008-06-24 18:32:49 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

Hi Shay.

How can I configure the shared data source mode. Now my Rounting field and space id are the same, Which are the criteria for choosing the routing field?. Now I´m working with Gigaspaces 6.5 and Java 1.5.0, How can I use the open spaces hibernate data source, What´s the difference between the Gigaspaces 6.0 version.

Jorge h4. Attachments

[pu.xml|/upfiles/13759718577453056.xml]

nullcipher2 gravatar imagenullcipher2 ( 2008-06-25 10:44:12 -0500 )edit

To configure the External Data source when spaces running in cluster mode use the following: cluster-config.cache-loader.external-data-source=true cluster-config.cache-loader.central-data-source=true

Take a look on the org.openspaces.persistency.hibernate.DefaultHibernateExternalDataSource and org.openspaces.persistency.hibernate.StatelessHibernateExternalDataSource.

These provides much better data load compared to the old HibernateExternalDataSource and includes few bug fixes found.

Shay h4. Attachments

[pu.xml|/upfiles/13759718573423679.xml]

shay hassidim gravatar imageshay hassidim ( 2008-06-25 12:33:19 -0500 )edit

My cluster mode configuration is fine, but my question is about the SHARED MODE CONFIGURATION.

Thanks h4. Attachments

[pu.xml|/upfiles/13759718588266501.xml]

nullcipher2 gravatar imagenullcipher2 ( 2008-06-25 13:09:05 -0500 )edit

The shared data source mode should be set to true.

Shay h4. Attachments

[pu.xml|/upfiles/13759718588957623.xml]

shay hassidim gravatar imageshay hassidim ( 2008-06-25 13:46:49 -0500 )edit

Can you post the pu.xml line of code for setting to true the shared data source mode?

Thanks h4. Attachments

[pu.xml|/upfiles/13759718586203344.xml]

nullcipher2 gravatar imagenullcipher2 ( 2008-06-25 14:37:40 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2008-06-24 17:55:06 -0500

Seen: 36 times

Last updated: Jun 24 '08