sholsapp / gallocy

A distributed shared memory infrastructure.
27 stars 9 forks source link

Further decompose client and transport classes. #38

Open sholsapp opened 8 years ago

sholsapp commented 8 years ago

PR https://github.com/sholsapp/gallocy/pull/36 adds a lot of duplicate code because we haven't decomposed the client and transport classes into the core parts. We need to fix this, pronto, so that we can continuing trying out new transport classes.

Using an abstraction that would let us instantiate a client like this would be a nice approach.

HTTPClient<
  RobustClient<RetryClient, ReturnOnMajority, ...>,
  RDPTransportClient>
    client;

Here I think we could maintain clean separations of concern:

This might be overkill now if we use the daemon approach, at which point we can just depend on some third party library to do all of this for us. Anyway, let's just brainstorm and have a conversation around it.