-
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:
- minimizes redundant information in the response itself, such as repeated property names
- minimizes the amount of data conversion required between the native DB form and the returned client form
- relates to
-
NET-267 Update SolarQuery APIs to support stream IDs
-
- Closed
-