These are chat archives for atomix/atomix

24th
May 2016
Di Xu
@xudifsd
May 24 2016 08:35 UTC
Hi, there. I'm reading example of copycat right now, and find out copycat do not expose any info about whether state machine is a leader or not, right? Any reason for this?
Jordan Halterman
@kuujo
May 24 2016 08:36 UTC
Because leadership is non-deterministic and state machines must be deterministic. That is, leaders don’t occur at the same index on all servers from the perspective of the state machine. It would be unsafe to rely on the role of a server within the state machine
Di Xu
@xudifsd
May 24 2016 08:40 UTC
sounds reasonable, so user of copycat could not display quorum state in dashboard?
and can not touch user's request before copycat stored it persistently?
Jordan Halterman
@kuujo
May 24 2016 08:42 UTC
you can get that information from outside the state machine…
CopycatServer server = CopycatServer.builder(…)…build();
server.bootstrap(…).join();
Cluster cluster = server.cluster();
cluster.leader();
cluster.term();
cluster.members();
cluster.onJoin(…);
cluster.onLeave(…);
cluster.onLeaderChange(…);
server.onStateChange(…);
…etc
I suppose there could be a use case for modifying requests before they’re persisted
what use case do you have?
Di Xu
@xudifsd
May 24 2016 08:46 UTC
I do have one, but not for modifying. I just want to log it first for later auditing and debugging.
Jordan Halterman
@kuujo
May 24 2016 08:47 UTC
gotcha… Copycat does log every request if you enable DEBUG logging.
Alternatively, you can implement a custom Transport that just wraps NettyTransport to do whatver you want with requests
Di Xu
@xudifsd
May 24 2016 08:48 UTC
ahh, I see
BTW, great piece of software, and I'm wondering you built it for fun or profession? I failed to find any info about that
Jordan Halterman
@kuujo
May 24 2016 08:53 UTC
originally started building it for fun a few years ago, but it turned eventually professional
I still do it mostly for fun but I do use it in some minor capacity
Di Xu
@xudifsd
May 24 2016 08:59 UTC
Well, if you're building it professionally, I think it would be nice to add company name that back it up in front page, like clojure
Jordan Halterman
@kuujo
May 24 2016 08:59 UTC
Online at 2:00am is certainly for fun :-) I'm in LA
Di Xu
@xudifsd
May 24 2016 08:59 UTC
that would attract more people
LOL, for sure
Jordan Halterman
@kuujo
May 24 2016 09:03 UTC
Yeah you're right. Need to compile a list of projects using it too. I don't keep up on that stuff as well as I should
Thanks! Time to get some sleep :-)