Skip to content

ArpNetworking/metrics-aggregator-protocol

Repository files navigation

Metrics Aggregator Protocol

License: Apache 2 Travis Build Maven Artifact

Defines the protocol between Metrics Aggregator Daemon and Metrics Cluster Aggregator.

Framing

Since protobuf does not have a message framing system, a prefix message length and message type has been added to the protocol.

Each message in the stream is prefixed with a 32-bit, big endian size (in bytes) of the message (including the size header). After the size comes a variable length message type. Currently, only 1 and 2 byte types are used. The message types are listed below.

Code Type
0x01 HostIdentification
0x03 Heartbeat
0x04 StatisticsSet
0x05 SampleSupportingData

Only SampleSupportingData currently has a subtype, which describes how to deserialize the supporting data.

Type and Subtype Code SubType
0x05 0x01 Samples supporting data
0x05 0x02 Sparse histogram supporting data

The full message format is:

 | 4 byte size | 1 byte type | [ 1 byte subtype (optional) ] | n byte protobuf payload

Building

Prerequisites:

Building:

metrics-aggregator-protocol> ./mvnw verify

To use the local version you must first install it locally:

metrics-aggregator-protocol> ./mvnw install

You can determine the version of the local build from the pom file. Using the local version is intended only for testing or development.

You may also need to add the local repository to your build in order to pick-up the local version:

  • Maven - Included by default.
  • Gradle - Add mavenLocal() to build.gradle in the repositories block.
  • SBT - Add resolvers += Resolver.mavenLocal into project/plugins.sbt.

License

Published under Apache Software License 2.0, see LICENSE

© Groupon Inc., 2016