syntax = "proto3"; package cluster; import "google/protobuf/any.proto"; message GossipRequest { string from_member_id = 2; GossipState state = 1; } //Ack a gossip request message GossipResponse { GossipState state = 1; } //string key is member id //GossipState is the state of that member message GossipState { map members = 1; } //string key is the key of the gossip value, e.g. "heartbeat" //GossipKeyValue is the value of that key message GossipMemberState { map values = 1; } //a known key might be heartbeat. if we locally tag each entry with a local timestamp //this means that we can measure if we have not received a new heartbeat from one member in some time //even if we don't know the exact time the heartbeat was issued, due to clock differences. //we still know when _we_ as in this node, got this data. //and we can measure time from then til now. // //if we got a hear-beat from another node, and X seconds pass, we can assume it to be dead message GossipKeyValue { int64 sequence_number = 2; //version is local to the owner member google.protobuf.Any value = 4; //value is any format int64 local_timestamp_unix_milliseconds = 5; } //special datatype that is known by gossip actor //set key //remove key //get keys message GossipMap { map items = 1; }