Add new SolarQuery API that optimizes output conversion of native DB stream model to client models

XMLWordPrintable

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Major
    • Component/s: DB, SolarQuery
    • None

      Per NET-266 and related to NET-267, more efficiencies can be gained in SolarQuery by introducing a new set of APIs to more efficiently encode query responses. The current APIs generally return a list of "datum" objects for each returned datum/aggregate record. In JSON a response of datum objects might look like this:

      {
        "success": true,
        "data": {
          "results": [
          {
            "created": "2011-10-05 11:00:00.000Z",
            "nodeId": 30,
            "sourceId": "Main",
            "localDate": "2011-10-06",
            "localTime": "00:00",
            "watts": 1065.228,
            "wattHours": 12775.876,
            "tags": [
              "consumption"
            ]
          }
          ],
          "totalResults": 1,
          "startingOffset": 0,
          "returnedResultCount": 1
        }
      }
      

      Expressed this way in JSON, when there are thousands of results there is quite a bit of repeated data in the form of property names on each result object, which are most often identical for a given data stream.

      This idea for this ticket is to design a more efficient way of encoding the results as returned to clients, that:

      1. minimizes redundant information in the response itself, such as repeated property names
      2. minimizes the amount of data conversion required between the native DB form and the returned client form

            Assignee:
            Matt Magoffin
            Reporter:
            Matt Magoffin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: