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

Ask Your Question

Space and container

I'm not sure but I seem to read from somewhere that I should not put more than one space in a container. Is that true? If not, is there any limitation or anything I should know about?

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

asked 2007-08-24 09:25:05 -0500

testy's avatar

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

jaissefsfex's avatar
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
testy wrote:

Basically, I'm creating a small caching solution using JavaSpaces

So why you use the Map API? :P
It seems the Space API is classic for what you need.
A Java class mapped to a Space class.
You could have different class instances (objects) stored within the space as entries.
You can use your current "value" POJO objects as space objects without dealing with keys , but index the value object fields directly (you can have multiple fields indexed).
This will allow you to query the space using SQL and use the space in optimal manner.

Why you use the space as a simple cache when you can use is as In-Memory-Data-Grid?


answered 2007-08-24 11:11:00 -0500

shay hassidim's avatar
edit flag offensive delete link more

What do you refer to as a container? A GSC?

answered 2007-08-24 09:27:04 -0500

guy sayar's avatar
edit flag offensive delete link more


Sorry, I mean in the url

Should I do this?

or this?


testy's avatar testy  ( 2007-08-24 09:36:03 -0500 )edit

You should do

rmi://hostname/./Space1 rmi://hostname/./Space2 rmi://hostname/./Space3

These are separate spaces. What is it that you are trying to do?

guy sayar's avatar guy sayar  ( 2007-08-24 09:40:03 -0500 )edit

After searching around, I seem to find the document: http://gigaspaces.com/wiki/display/GS6/StartingMultipleSpacesinOneContainer-6.0

Basically, I'm creating a small caching solution using JavaSpaces. So I have one space for each cache container. It works great but it consumes a number of threads so I try to reduce the number of containers by consolidation all spaces in one container but it seems to be an obsoleted feature.

testy's avatar testy  ( 2007-08-24 09:58:01 -0500 )edit

It's not a suggested approach. Why do you need a number of spaces?

guy sayar's avatar guy sayar  ( 2007-08-24 10:04:00 -0500 )edit

I want to make sure that the key will not be collided with each other in different cache groups.

testy's avatar testy  ( 2007-08-24 10:42:05 -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: 2007-08-24 09:25:05 -0500

Seen: 57 times

Last updated: Aug 24 '07