transferring dataframes including column specifications
PietrH opened this issue · 1 comments
PietrH commented
Currently the workflow for transferring data between etnservice
and etn-client
is as follows:
graph LR;
etnservice --> rob[R Object]
rob --> JSON
JSON --> rob2[parsed JSON R Object]
etnservice produces an R object, that is converted into JSON by the opencpu request (/json
suffix in the url), and then parsed back into an R object by etn-client
.
However, in this translation certain information gets lost, in this case the column specification. Which means that etn-client
has no way of knowing what class the different columns are in tabular data for example.
Implementing column parsing on the client side is prone to errors, because the client doesn't have database access.
PietrH commented
We are now using the two step transfer method of using OpenCPU
sequenceDiagram
client ->> OpenCPU: POST function + arguments
activate OpenCPU
OpenCPU -->> client: list of object paths
client ->> OpenCPU: GET rda path
OpenCPU -->> client: response rda object
deactivate OpenCPU