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

Ask Your Question

How do I get a proxy to an embedded member of a cluster?

I'm using SpaceFinder(url), so I use a 'java://'-based URL to get the embedded-space comme ca: java:// te=true

... and it certainly finds something and returns a space-proxy to me. However, when I try to do a simple blocking: space.take(new Data(),null,timeout)

on my partitioned data I get an exception with a stack-trace suggesting I'm actually talking to a cluster-proxy. Can someone help me to avoid this? TIA, -- kov

SERVICE #1: Error receiving request [com.gigaspaces.cluster.loadbalance.exception.LoadBalanceException: Broadcast is not supported for Read/Take Operations with timeout greater than 0. Operation description: class='does.not.exist.Data', operation=take, transaction=null, timeout=922337203 Operation requires broadcast to all partitions based on: configuration: <broadcast-condition>routing-index-is-null</broadcast-condition> and operation data: <routing index="" field="" is="" not="" defined="" in="" class="" 'does.not.exist.data'="" >="" ]="" at="" com.gigaspaces.cluster.loadbalance.loadbalanceimpl.getpojohashvalue(sourcefile:2555)="" at="" com.gigaspaces.cluster.loadbalance.loadbalanceimpl.selectmemberhashbased_pos(sourcefile:1350)="" at="" com.gigaspaces.cluster.loadbalance.loadbalanceimpl.selectmemberhashbased(sourcefile:1269)="" at="" com.gigaspaces.cluster.loadbalance.loadbalanceimpl.getnextfrompolicy(sourcefile:957)="" at="" com.gigaspaces.cluster.loadbalance.loadbalanceimpl.selectmemberforoperationmain(sourcefile:360)="" at="" com.gigaspaces.cluster.loadbalance.loadbalanceimpl.selectmemberforoperation(sourcefile:205)="" at="" com.j_spaces.core.cluster.jspaceclusteredproxy.selectmember(sourcefile:1357)="" at="" com.j_spaces.core.cluster.jspaceclusteredproxy.getlbremotejspace(sourcefile:1259)="" at="" com.j_spaces.core.cluster.jspaceclusteredproxy.prepareformethodcall(sourcefile:964)="" at="" com.j_spaces.core.cluster.jspaceclusteredproxy.readbasic(sourcefile:1853)="" at="" com.j_spaces.core.cluster.action.clusterspacetakeactionlistener.onaction(sourcefile:57)="" at="" com.j_spaces.core.cluster.action.clusterspacetakeactionlistener.onaction(sourcefile:20)="" at="" com.j_spaces.core.client.abstractspaceproxy.take(sourcefile:289)="" at="" com.j_spaces.core.client.abstractspaceproxy.take(sourcefile:272)<="" p="">

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

asked 2008-08-01 10:08:04 -0500

kov 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

Using the following url:
te=true" will not provide u a colocated proxy. It will generate a clustered proxy that will encapsulate for colocated space proxy and proxies to other spaces.

in order to extract the colocated proxy that will allow u to access only the data stored within pu1s1_container container u will need to get the container proxy and from it the specific space proxy:
IJspace.getContainer().getSpace(space name). The .net api has the getSingleProxy method that allows u to do the same. See example for such as part of the .Net sba example.

A clustered proxy for partitioned space does not support blocking read/take operations. That's why u get this error.

If u will use the colocated proxy this will not happen.

Open spaces api provide u ability to perform periodic operations against partitioned space using non blocking operations. This imitates blocking operations.
It provides u better way to get the colocated proxy.

I suggest u to move to open spaces framework to start your spaces and to inject the space proxy into the application logic. You are currently using the "old way" to build space based applications.


answered 2008-08-02 17:11:52 -0500

shay hassidim gravatar image
edit flag offensive delete link more


Thanks; yes we normally use the SBA approach. In this case, though, we're trying to use an existing generic framework to drive performance tests of multiple data-grid platforms.

BTW, I'm also starting to wonder whether this will work at all for partitioned data. I know that the PU's are supposed to use a shared classloader for types that are common to multiple JVM's, how is this accomplished with the 'old approach'? Even when I hacked in the routing key I knew would work, my service's take() never found any of the objects I was writing to the space.

kov gravatar imagekov ( 2008-08-02 20:16:02 -0500 )edit


Are you sure you constructed the correct template? Can you post your POJO?


shay hassidim gravatar imageshay hassidim ( 2008-08-03 09:14:03 -0500 )edit


I recommend against working against the system this way. Not only are you going to spend time figuring out how to do something not explicitly supported by the product, even if we help you to do it you are very unlikely to get a valid comparison to other data grids. It is no more reasonable to force GigaSpaces to fit into another vendor's framework than it would be to require another vendor to fit into SBA.

If you can explain exactly what it is you are trying to accomplish, specifically the business value you're seeking to demonstrate, we can help you.



patrickm gravatar imagepatrickm ( 2008-08-03 09:19:35 -0500 )edit

Sure, it's an existing framework (not written by me) to drive data-grid operations on a variety of platforms. The only problem is that it presumes a basic API+config interface to deploying and performing basic read/write/take ops. As you say, that simply may not work with GS 6.0 or 6.5.

But what about the 5.x api? Does 6.5 still support it? I.e., if I programmatically create a space via


and use that colocated proxy inside my 'service' data-gatherer, then drive load against it from the outside world via


Will I run into problems getting the colocated service to recognize the types of objects written by the 'client'? I'm happy to report back that this simply won't work, I just need to know the answer.

kov gravatar imagekov ( 2008-08-04 06:01:01 -0500 )edit


When you use the term "data grid", do you mean "distributed cache"? GigaSpaces can, of course, be used as a distributed cache, through either our space or map APIs. We've been tested by many customers and our raw caching performance is equal to the best pure caching products on the market. All of these tools are asymptotically approaching ideal performance for simple reads and writes. GigaSpaces is unique in offering far more than simple caching.

There are two issues with your question. The first is that you shouldn't need to know how to access individual partitions remotely to do this kind of test. For the minimum latency, run your test within a Processing Unit against the space node co-located in that same PU.

The second, more important, issue is that the caching performance is not what you should be measuring. GigaSpaces supports Space Based Architecture (SBA), a design approach that optimizes the end-to-end performance of your system (in addition to providing near-linear scalability and self-healing, high availability). That end-to-end performance is what is really of interest. If you compare an SBA solution to any solution that uses a simple caching product in conjunction with all of the other products required to provide the same functionality as GigaSpaces, you will see the significant benefits we provide.



patrickm gravatar imagepatrickm ( 2008-08-04 09:07:29 -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: 2008-08-01 10:08:04 -0500

Seen: 312 times

Last updated: Aug 02 '08