Monarch: Google’s Planet-Scale In-Memory Time Series Database [pdf]
As someone interested in PL theory, I&#x27;ve long found the query language exposed by Monarch surprisingly interesting (briefly discussed in section 5.1 but the description doesn&#x27;t quite do it justice). It&#x27;s a functional language, a breath of fresh air compared to &quot;real programming languages&quot; in use at Google like C++, Java, or Go.<p>The most interesting idea is that its native data types are <i>time series</i> of integers, doubles, distributions of doubles, booleans, and tuples of the above. This means that the data you operate on intrinsically consist of many timestamped data points. It&#x27;s easy to apply an operation to each point of the data, and it&#x27;s also easy to apply operations on a rolling window, or on successive points. This makes the language have the feel of an array-based language, but even better because the elements are timestamped and the array can be sparse.<p>Furthermore the presence of fields in each data point adds more dimensions to the level of aggregation (not just the inherent time-based). Now the language has the feel of a native multi-dimensional array language. It feels amazing to program in it. You can easily do sophisticated queries like figuring out how many standard deviations each task&#x27;s RPC latency for a specific call is above or below all tasks&#x27; mean, for outlier detection.