Metrics Service Class Diagram

  • The Falcon d1_metrics_service class is where the Falcon API creates a WSGI application and the Gunicorn server runs this application.
  • Resource object is created from the class MetricsReader which is eventually mapped to the end-points into the d1_metrics_service.
  • The JSON MetricsRequest object from the HTTP requests is passed on to the MetricsReader class for further processing.
  • The MetricsReader class parses the MetricsRequest object and based on the filtering properties calls the appropriate method of the MetricsElasticSearch and the MetricsDatabase class from the d1_metrics package.
  • The MetricsElasticSearch class has various methods to aggregate the metrics based on the filters specified in the MetricsReader class. The MetricsReader class forms a MetricsResponse object which is sent back to the client as HTTP Response.
  • The MetricsDatabase class has methods that establishes connection and returns a cursor that could perform CRUD operations on the Citations database. This class is reponsible for gathering Citations for the DataONE objects from the Crossref Citations API and updating the metadata on timely basis.
  • The MetricsReporter class queries solr to get the metadata for the generation of reports on a scheduled basis. These reports are send to the hub on month-to-month basis.

Class Diagram