Uploaded image for project: 'Hawkular Metrics'
  1. Hawkular Metrics
  2. HWKMETRICS-326

Do away with core model classes

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 0.9.0
    • Fix Version/s: 0.11.0
    • Component/s: Core, REST
    • Labels:
      None

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                nstefan Stefan Negrea
                Reporter:
                john.sanda John Sanda
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: