These are chat archives for atomix/atomix

30th
Apr 2018
Jordan Halterman
@kuujo
Apr 30 2018 00:09
Not much. It all pertains to the Raft implementation. Too much new stuff to copy and paste
But I’ll get there eventually
Got some of the good sections done at least
swapnildubey19
@swapnildubey19
Apr 30 2018 08:17
I am trying to implemented HA and distributed messaging in my module using Atomix. Can someone point me to the bare minimum code that I can use to bring 1 instance up and then wait for other nodes in cluster to join. Just for testing !!!
Jordan Halterman
@kuujo
Apr 30 2018 08:45
Atomix atomix1 = Atomix.builder()
  .withLocalMember(Member.builder(“foo”)
    .withType(Member.Type.EPHEMERAL)
    .build())
  .withMulticastEnabled()
  .build();

atomix1.start().join();

Atomix atomix2 = Atomix.builder()
  .withLocalMember(Member.builder(“bar”)
    .withType(Member.Type.EPHEMERAL)
    .build())
  .withMulticastEnabled()
  .build();

atomix2.start().join();

Atomix atomix3 = Atomix.builder()
  .withLocalMember(Member.builder(“baz”)
    .withType(Member.Type.EPHEMERAL)
    .build())
  .withMulticastEnabled()
  .build();

atomix3.start().join();
This assumes you can use multicast in your network. This is the simplest possible configuration, but it can become a lot more complicated depending on the structure of the cluster and the types of features you want to use. Here’s all the documentation on configuring the cluster: http://atomix.io/docs/latest/user-manual/cluster-management/cluster-configuration/
@swapnildubey19
BTW constructing an Atomix instance without partitions (just for messaging) may not actually work... I haven’t tried it. But to just use cluster management/messaging just construct an AtomixCluster by simply replacing Atomix with AtomixCluster in the above code.
Johno Crawford
@johnou
Apr 30 2018 11:17
what's really weird is this
address=ip6-localhost:5001
switch (type) {
  case IPV4:
    return String.format("%s:%d", host(), port());
  case IPV6:
    return String.format("[%s]:%d", host(), port());
so it's a ipv4 host with the name ip6..
Luca Burgazzoli
@lburgazzoli
Apr 30 2018 11:33
hi all, I'm playing a little with atomix 2.1 (SNAPSHOT), is there a way to get the cluster name configured through ClusterConfig.setName from an Atomix instance ?
Johno Crawford
@johnou
Apr 30 2018 13:41
@lburgazzoli looks like it's discarded
in the sense that we take the hashcode and pass that into the NettyMessagingService and use it as a preamble
Luca Burgazzoli
@lburgazzoli
Apr 30 2018 13:43
I guess a workaround would be to put it as local node metadata
but would be really nice to have an api to get it
mh, but a node does not have meta-data but only tags
swapnildubey19
@swapnildubey19
Apr 30 2018 17:58
thanks @kuujo It worked ..
swapnildubey19
@swapnildubey19
Apr 30 2018 18:05
I mean creating AtomicCluster. Atomic instance indeed need partitions.
Jordan Halterman
@kuujo
Apr 30 2018 19:09
great!