When a client sends a request to store data points, the request body is converted to a Gauge and GaugeDataPoint objects (in the case of gauge metrics).These classes live under hawkular-metrics/api/model and define the JSON model for the public API. JAX-RS calls GaugeHander which then maps those objects into instances of Metric DataPoint which live in hawkular-metrics/core/metrics-core-api. The model classes in metrics-core-api are independent of the JSON model. Earlier on in the project, I thought that this separation of layers made sense. Now I am not so sure. The fact is that the JSON model is our data model or schema that is part of the public API, not the classes in metrics-core-api.
I think that refactoring the code base to just use the api/model classes instead of also using metrics-core-api will make things easier. It will be a lot less code to maintain. It will also make things a lot less error prone since we will not have to worry about making changes to two sets of domain model classes. Lastly, I think it will help performance since we will avoid another set of data transformations when reading/writing data.