Slide 14
Slide 14 text
R and Microservices, how?
# In R
Rscript -e "arrow::write_arrow(head(iris), 'iris.arrow')";
# In NodeJS
node -e "var readFileSync = require('fs').readFileSync
var Table = require('apache-arrow').Table
const arrow = readFileSync('iris.arrow');
const table = Table.from([arrow]);
console.log( table.toArray()[0].toString() );"
#> 5.1, 3.5, 1.4, 0.2, "setosa"
Notes: IRL, this service should handle errors gracefully
Colin FAY (@_ColinFay) - WhyR 2019 - https://rtask.thinkr.fr 14 / 24