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

Ask Your Question

Design Best Practice

What is the best practice with the space architecture?

Do you use more spaces? Like one fully replicated for small amount of data taht is used everywhere and one partitioned for orders? i.e that each deployed PU started two (or even more) embeded space instances?

or is it better to build your application around one space?

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=3108]{quote}

asked 2009-05-28 04:52:32 -0500

hurda 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

Take a look here:

Replicated space is suggested only in in cases where you have read mostly application and local cache can't be used.In this case you will load-balance the read operation between the different replica (there is a way to do that). Another case to use replicated spaces is when you have multiple sites over the WAN where each space located in different site. In this case async replicated is used.

In all other cases partitioned space should be used.


answered 2009-05-28 07:30:58 -0500

shay hassidim gravatar image
edit flag offensive delete link more


But what shoudl I do in case I have some kind of Object that I want to be collocated at all of my Space instances, like for example exchange ratio in banking app.

I would have many bank account objects - so I use partitioned space
But I need to know exchange ratios at all my PUs

Do you suggest I use local cache on collocated space?

hurda gravatar imagehurda ( 2009-05-28 07:35:02 -0500 )edit

Having local view seems even more relevant in your case. Use local view and have these cached at the proxy side. Exchange ratio objects are a perfect type of data to reside within the local view. Have a dedicated proxy only for read activities with exchange ratio objects and another proxy for all other operations. Shay

shay hassidim gravatar imageshay hassidim ( 2009-05-28 07:40:59 -0500 )edit

How much slower is accesing objects in colocated space through whole space proxy then accesing them directly (access them in colocated space partition)

hurda gravatar imagehurda ( 2009-05-28 07:45:44 -0500 )edit

Reading data from a remote space is about 100 times slower than reading these from collocated space. If you are reading from a partitioned space make sure you have the routing field set to avoid parallel read from all partitions.

If you use local cache/view it will be 1000 faster (with 7.0 and readByID API) compared to remote call.


shay hassidim gravatar imageshay hassidim ( 2009-05-28 07:51:32 -0500 )edit

I'm concerned about reading from collocated space instance through proxy with local cache (can happen, if the object is collocated space but I dont, know it because I don't know whre it is)

How is this slower then reading it directly?

if you take my meaning.

hurda gravatar imagehurda ( 2009-05-28 08:38:07 -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


Asked: 2009-05-28 04:52:32 -0500

Seen: 77 times

Last updated: May 28 '09