The code for this service is publicly available at GitHub
Governify Registry is the service in charge of storing and managing the information related to the Service Level Agreements (SLAs) registered in the platform. The information is stored in two collections in a MongoDB database, as explained in the Data Layer section. The registry service manage the states which come as a result of the metric and guarantee computation, and the agreements themselves.
The above diagram shows a typical interactions between the services surrounding registry. As explained before, registry manages not only the agreements but also the states, result of metric and guarantee computations. The reporter service is the one who requests registry to calculate the states, then this call is directy passed to the collector service, which gathers the data and computes the guarantee value. Once the value is obtained, the state is stored in the database and returned to the reporter to build the dashboards afterwards.
The Registry service counts with a REST API to interact with the service. The API is documented using OpenAPI and the documentation is exposed through the SwaggerUI at
/api/v6/docs once deployed. The API is divided in two main sections, the Agreement Registry and the State Registry.
The agreement registry is the part of the API in charge of managing the agreements. The following table shows the endpoints available for this section.
|GET||Get all agreements|
|GET||Get agreement by id|
|DELETE||Delete all agreements|
The state registry is the part of the API in charge of managing the states generated by the metric and guarantee computation. The following table shows the most relevant endpoints available for this section.
|GET||Get all states|
|DELETE||Delete all states|
|GET||Get all states for an agreement|
|GET||Get all guarantee states for an agreement|
|GET||Get guarantee state for an agreement|
|POST||Create guarantee state for an agreement|
|DELETE||Delete guarantee state for an agreement|
|GET||Get all metric states for an agreement|
|GET||Get metric state for an agreement|
|POST||Create metric state for an agreement|
The Registry data layer is implemented using MongoDB, which is a NoSQL database. The class diagram(s) below show the structure of the data on a conceptual basis, the actual data is stored in JSON format, and thus, its structure is not fixed.
The data layer is composed by two collections in a MongoDB database. The first one is the
agreements collection, which stores the agreements themselves according to iAgree 5.2 model. The second one is the
states collection, which stores the states generated by the metric and guarantee computation. The following diagram shows the structure of the states collection.