node.js - Rrdtool with nodejs -


let's have program running in local machine, , listen http requests, triggers program run , respond output of program. example, have rrdtool (command line utility accessing round robin database) installed in linux box, , want web clients request web server run rrdtool program , respond output of rrdtool.

quesitons:

  1. i know programming languages used generate dynamic html contents sent clients, rrdtool existing program needs triggered web request. in fact, rrdtool provides various programming language bindings such python, use node.js on server side , javascript binding rrdtool isn't supported. how interface between javascript code , rrdtool program (cli) done?

  2. i thought using java implementation of rrdtool functionalities such rrd4j, portability isn't priority me , run official rrdtool program (written in c) better performance. however, i'm not sure if cost of interface between javascript on server side , rrdtool outweigh performance benefits of running c program.

any help/feedback/pointers appreciated.

just use nodejs's "child_process" module run rrdtool. capture output child.stdin.on('data', function (data) {..., etc. grab output, format html, , send reply web request initiated it.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -