These are chat archives for atomix/atomix

29th
Jun 2018
william.z
@zwillim
Jun 29 2018 01:29 UTC
Hi, all. I am trying to make a Custom Primitive. But when creating a proxy, I cannot find the class AbstractAsyncPrimitiveProxy. It is said that this class appears in 2.1.0-SNAPSHOT. Which class should I use in 3.0.0-rc1?
Jordan Halterman
@kuujo
Jun 29 2018 01:33 UTC
@zwillim take a look at all the other primitive implementations for examples. Just extend AbstractAsyncPrimitive
all the existing primitives in Atomix are implemented exactly as one would implement a custom primitive, aside only from the primitive-specific methods on the Atomix interface itself
so all those examples are the best source of information IMO
Alexis Hernandez
@AlexITC
Jun 29 2018 01:35 UTC
@kuujo do you have sometime to talk about #662 ?
Jordan Halterman
@kuujo
Jun 29 2018 01:35 UTC
sure
Alexis Hernandez
@AlexITC
Jun 29 2018 01:38 UTC
I wonder if you tried the case when a node is leaving because I don't see any code pushing that event
I had an issue because the removal isn't bidirectional
I'm considering on implementing a kind of blacklist interface that the node checks before talking to another node, this list would be filled while explicitly removing a node, probably there is a simpler / better way to get the same result
Jordan Halterman
@kuujo
Jun 29 2018 03:21 UTC
Sorry, my wife called me right after I said I had time and started telling me to do stuff. Hahaha
Alexis Hernandez
@AlexITC
Jun 29 2018 04:14 UTC
I have had that experience :P
if you have time, please check my comments in your pull request, I'll check it tomorrow
thanks!
Jordan Halterman
@kuujo
Jun 29 2018 05:54 UTC

Yeah, so there are a couple of layers to cluster management. The discovery layer simply provides notifications of nodes joining and leaving the cluster. Essentially, the discovery layer is just providing a TCP Address to which the ClusterMembershipService can connect. Once it has that information, it will connect and exchange its own Member information with that IP, which includes the node’s name, metadata, etc. That node will then send it’s own Member information back and get a list of all the members in the cluster. Thereafter, failure detection is primarily handled by the ClusterMembershipService. So, really the discovery service is used for initially locating a cluster to join, and once it has been joined the ClusterMembershipService shares information for all members and does failure detection. So, the default implementation doesn’t need to trigger any LEAVE events since that’s handled by the failure detector.

Although, it may make more sense to allow the discovery layer to handle failure detection as well. We can move the failure detectors into the default implementation and just request member information when JOIN events occur.

Johno Crawford
@johnou
Jun 29 2018 13:36 UTC
@kuujo i'm able to reproduce the barrier test failure locally pretty easily when I set the amount of cpus to 1

15:33 $ mvn --version
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T21:39:06+02:00)
Maven home: /home/johno/Downloads/apache-maven-3.5.0
Java version: 11-ea, vendor: Oracle Corporation
Java home: /home/johno/Downloads/jdk-11
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "4.16.12-300.fc28.x86_64", arch: "amd64", family: "unix"
✔ ~/Workspaces/atomix/core [fix_tests|✚ 1…13⚑ 17]
15:33 $ taskset -c 0 mvn -Dtest=io.atomix.core.barrier.PrimaryBackupDistributedCyclicBarrierTest test

[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] PrimaryBackupDistributedCyclicBarrierTest>DistributedCyclicBarrierTest.testBarrier:73 » Timeout
[ERROR] PrimaryBackupDistributedCyclicBarrierTest>DistributedCyclicBarrierTest.testBrokenBarrierReset:164 » Timeout
[INFO]
[ERROR] Tests run: 2, Failures: 0, Errors: 2, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 57.422 s
[INFO] Finished at: 2018-06-29T15:33:04+02:00
[INFO] Final Memory: 44M/485M
[INFO] ------------------------------------------------------------------------

Luca Burgazzoli
@lburgazzoli
Jun 29 2018 21:30 UTC
@kuujo I see that now atomix can do discovery to find other nodes, is there an API for that ? I'd like to implement one to enable atomix discovery on kubernetes
Alexis Hernandez
@AlexITC
Jun 29 2018 23:02 UTC
@lburgazzoli if you talk about atomix/atomix#662 implement a MemberLocationProvider and trigger the JOIN/LEAVE events from it