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

Ask Your Question
0

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 gravatar image

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

jaissefsfex gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0
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?
:)

Shay

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

shay hassidim gravatar image
edit flag offensive delete link more
0

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

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

guy sayar gravatar image
edit flag offensive delete link more

Comments

Sorry, I mean in the url

Should I do this?
rmi://hostname/container/space1
rmi://hostname/container/space2
rmi://hostname/container/space3
rmi://hostname/container/space4

or this?

rmi://hostname/./space1
rmi://hostname/./space2
rmi://hostname/./space3
rmi://hostname/./space4

testy gravatar imagetesty ( 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 gravatar imageguy 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 gravatar imagetesty ( 2007-08-24 09:58:01 -0500 )edit

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

guy sayar gravatar imageguy 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 gravatar imagetesty ( 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

Stats

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

Seen: 17 times

Last updated: Aug 24 '07