These are chat archives for atomix/atomix

5th
Apr 2017
aamargajbhiye
@aamargajbhiye
Apr 05 2017 09:38

I have created custom resource and I am trying to register it with AtomixReplica as given in documentation.

AtomixReplica replica = AtomixReplica.builder(address, cluster)
.withTransport(new NettyTransport())
.withResources(DistributedValue.class)
.build();

but withResources() is not available on AtomixReplica.

Himanshu
@himanshug
Apr 05 2017 14:30

@kuujo @jhall11 thanks and sorry, I was away for a bit. But, here are the possible ways forward I think....

  1. Use appropriate storage level so that Log and Cluster Configuration are stored in MEMORY but <term,vote> metadata is stored on Disk. This kind of setup is not possible currently but I can make the change to enable that. With that, cluster configuration is only in memory and shut-all-then-restart-all can take care of removing/adding nodes.
  2. Use DISK storage level. For permanent node removal, user sends a request with address of that node and application code invokes server.cluster().member(someAddress).remove() to permanently remove a crashed node.
  3. Building on (2) to be fully dynamic where user does not have to take any action. I would have a "ServerStatus" query that is only answered by raft leader and tells the "reachability status" of each cluster member. Application code can run something periodically that makes the "ServerStatus" query and figures out the node that has been down for "too long" and invoke "server.cluster().member(someAddress).remove()" to remove it from cluster configuration. That way, node removal would be working automatically with no input from user.

I am currently using copycat only for membership discovery and leader election in my application and storing Log on DISK is not required. So, I'm planning to do (1) to begin with, would that work?
As things mature, I would like to get to (3) eventually.

How does that sound?