dynamic separate clusters

5 views
Skip to first unread message

dtravin

unread,
Jan 1, 2010, 5:52:08 PM1/1/10
to Hazelcast
Hi all,

Is there a way to create separate clusters dynamically ?
Something like Hazelcast.getCluster("cluster"+getSomeEntityId()).

I have 1 server that creates logical groups and peers members of
different groups do not communicate with each other.
I want to minimize traffic.

Daniel

Talip Ozturk

unread,
Jan 1, 2010, 6:05:40 PM1/1/10
to hazelcast
Yes. You should use HazelcastInstance instead of Hazelcast singleton.

Config cluster1Config= new XmlConfigBuilder().build();
cluster1Config.getGroupConfig().setName("cluster1");
HazelcastInstance h1 = Hazelcast.newHazelcastInstance(cluster1Config);

Config cluster2Config= new XmlConfigBuilder().build();
cluster2Config.getGroupConfig().setName("cluster2");
HazelcastInstance h2 = Hazelcast.newHazelcastInstance(cluster2Config);


h1 and h2 now belong to different clusters because they have different
group name (cluster name).

> --
>
> You received this message because you are subscribed to the Google Groups "Hazelcast" group.
> To post to this group, send email to haze...@googlegroups.com.
> To unsubscribe from this group, send email to hazelcast+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/hazelcast?hl=en.
>
>
>

dtravin

unread,
Jan 2, 2010, 4:20:26 AM1/2/10
to Hazelcast
Thanks. That is clear.

How about authentication/authorization?
Basically, I want to add some more fields in JoinRequest class and
handle them in ClusterManager.
However, ClusterManager is final I cannot see elegant solution.
I also need more fields in MemberInfo (not only address but some
application specific info)
JAAS is what I need, but probably it could be done simplier with a
couple of hacks.


What would you suggest in this situation?

micha...@gmail.com

unread,
Feb 22, 2010, 2:00:00 AM2/22/10
to Hazelcast
I am second on flexible authentication/authorization.
Reply all
Reply to author
Forward
0 new messages