MatrixAI / Overwatch

Distributed Infrastructure Telemetry
2 stars 0 forks source link

First QoS Constraint #12

Open CMCDragonkai opened 6 years ago

CMCDragonkai commented 6 years ago

Let's start with Latency.

Let's get some example Haskell data types that can express all the kinds of latency constraints we might want on a networked service.

Remember message framing. What kind of latency are we measuring? Packet latency or Request Response Latency? RTT latency. Think about beginning of request vs ending of request vs beginning of response and ending of response. Network protocols are layered. If our protocol spec specifies a RESTful API. We know this means HTTP (possible HTTPs). This means perhaps we have compatible QoS spec in the form of TCP packet latency and also HTTP latency.

data LatencySpec = 
  Percentile Double Int

Those constructor names should be made better!