These are chat archives for atomix/atomix
@dualscyther Copycat maintains a single TCP connection to all other nodes, and clients have connections to all servers.
In Atomix all nodes - including clients/servers - are peers and have both TCP servers and TCP connection pools (up to 8 connections) to each other peer. Messages with the same subject are always sent on the same TCP connection to maintain causal order.
Yeah all 8 connections to all other nodes are kept open. The pool is shared by messages of all types, and message types are hashed to specific connections.
Although, we may want to at least limit
CLIENT nodes to a single connection per
CORE node and reserve pools only for nodes that have to replicate data.
message types are hashed to specific connections
not sure I understand this part
@dualscyther look at the API:
sendAndReceive(Address address, String type, byte message);
In specific usages of the API, a message type will be e.g.
command in the Raft implementation or
execute in the primary-backup implementation. Generally, a specific type of object is associated with the
String type, e.g.
String type is hashed to a TCP connection which guarantees that it will be delivered in order among other messages of the same type. This reduces the frequency of having to reorder requests inside Raft servers, and the primary-backup implementation actually doesn’t reorder messages at all but instead relies upon those semantics to ensure ordering of requests/events.