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

Ask Your Question
0

Space locator attribute in space startup url

GS version is: GigaSpaces XAP 6.5.1 ga (build 2400)

I have a clustered space running on two hosts 'host1' and 'host2' on different subnets. To enable both multicast and unicast lookup, will the following urls with specific locators attributes work? This is my understanding from the SpaceURL API doc, but just wanted to confirm 1) that this is correct, and 2) The locators attributes should contain host:port attributes for all other hosts where other members of the cluster are running (and not this host which is starting the space instance).

Host #1

// create space and save proxy for operations since space lookup is expensive IJSpace proxy = SpaceFinder.find("/./mySpace?cluster_schema=primary_backup&clustername=myCluster&total_members=1,1&id=1&groups=myGroup&locators=host2:4162") // perform space operations proxy.read(), proxy.write() etc....

Host #2

// create space and save proxy for operations since space lookup is expensiveIJSpace proxy = SpaceFinder.find (/./mySpace?cluster_schema=primary_backup&clustername=myCluster&total_members=1,1&id=1&backup_id=1&groups=myGroup&locators=host1:4162) // perform space operations proxy.read(), proxy.write() etc....

Reference: [ http://www.gigaspaces.com/docs/JavaDo... ]

"The locators URL property should be used to perform unicast LUS discovery. To enable both multicast and unicast discovery the following Space URL should be used. SpaceFinder.find("jini:////Space?groups=g1,g2,g3&locators=h1:port,h2:port,h3:port)."

Edited by: s m on Jul 21, 2009 10:19 AM - Correction, the GS version is: GigaSpaces XAP 6.5.1 ga (build 2400)

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

asked 2009-07-16 14:04:50 -0500

wasefmasood 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

Multicast is enabled by default. You need to make sure it actually works by using the Test Multicast utility.
The URLs you have seems to be OK with one important comment:
If you have 2 lookup services running you need to make sure all the started spaces register themselves to both. This means your locators should be: host1:4162,host1:4162.

Remember the first one that will be started will be the primary. The spaces will use the lookup service as the directory service that includes also the space active status mode.

Shay

answered 2009-07-20 04:50:16 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

OK, thanks, I will use the url below for each host that starts a space in the cluster:

IJSpace proxy = SpaceFinder.find("/./mySpace?clusterschema=primarybackup&clustername=myCluster&total_members=1,1&id=1&groups=myGroup&locators=host1:4162, host2:4162, ... hostN:4162") // changed to also include in the locators property the name of the host that's starting the space

Correction, the GS version is: GigaSpaces XAP 6.5.1 ga (build 2400)
SM

wasefmasood gravatar imagewasefmasood ( 2009-07-21 10:19:22 -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: 2009-07-16 14:04:50 -0500

Seen: 45 times

Last updated: Jul 20 '09