The brain observatory calls this particular route. At this point its functionality is replicated by the raw call which has a totally separate code path in datacube.py (see #67). Not only this, but it has its own optimized payload format (see _format_structured_array_response and _format_xr_dataset_response, as well as a short-circuit optimization for single-row access that uses it's own *.npy file here which duplicates the contents of the *.nc file.
There are two challenges; one is that the brain observatory web app has special javascript to consume this custom payload format, which would need to be changed to the xr.Dataset.to_dict() format used by raw, in addition to adapting from the filter_cell_specimens request API to the raw API (sorting is tracked in #67). The second challenge is that the brain observatory might not be responsive given a naive switch to using raw for single-row access. An issue should be opened against the brain observatory web app if that is the case, since it is known to follow less than ideal request patterns (individual row access as opposed to buffered/batched, as well as overly eager requests when scrolling the viewport quickly).
https://github.com/AllenInstitute/datacube/blob/167932d6a86eb93ba0a54edf441f52f2b1113f66/services/pandas/server.py#L299-L301
The brain observatory calls this particular route. At this point its functionality is replicated by the
raw
call which has a totally separate code path indatacube.py
(see #67). Not only this, but it has its own optimized payload format (see_format_structured_array_response
and_format_xr_dataset_response
, as well as a short-circuit optimization for single-row access that uses it's own*.npy
file here which duplicates the contents of the*.nc
file.There are two challenges; one is that the brain observatory web app has special javascript to consume this custom payload format, which would need to be changed to the
xr.Dataset.to_dict()
format used byraw
, in addition to adapting from thefilter_cell_specimens
request API to theraw
API (sorting is tracked in #67). The second challenge is that the brain observatory might not be responsive given a naive switch to usingraw
for single-row access. An issue should be opened against the brain observatory web app if that is the case, since it is known to follow less than ideal request patterns (individual row access as opposed to buffered/batched, as well as overly eager requests when scrolling the viewport quickly).