vmware/hamlet

Proposal to have the DiscoveryService to do bidirectional sync

Opened this issue · 1 comments

Currently, the DiscoveryService allows only unidirectional sync. One of the challenges with this approach is that most agents implementing this interface need to be publicly available.

// DiscoveryService represents the API implemented by a federated service mesh
// owner.
service DiscoveryService {
// Establish a new stream with a federated service mesh owner. The federated
// service mesh owner can then send StreamResponse messages, and the federated
// service mesh consumer can ACK/NACK these via new StreamRequest messages.
rpc EstablishStream (stream StreamRequest) returns (stream StreamResponse);
}

The proposal is to change the interface in a way that service discovery works seamlessly even when only one of the agents is publicly available while the rest may not.

-  rpc EstablishStream (stream StreamRequest) returns (stream StreamResponse);
+  rpc EstablishPublishStream (stream StreamRequest) returns (stream StreamResponse);
+  rpc EstablishSubscribeStream (stream StreamResponse) returns (stream StreamRequest);

/cc @sergiopozoh

Pending #25