I'm trying to figure out how to integrate "ORE" https://github.com/OpenSourceRisk/Engine ( that calls another huge rep github.com/lballabio/QuantLib) with Nodejs.
For executing ORE you just need to call it in a shell giving as argument a "foobar.xml" file. It will produce xml files and return 0 or 1.
My intent is to build a wrapping interface for calling ORE, the main priority is performance and scalability.
I quickly run deep into Nodejs addon ( github.com/nodejs/node-addon-examples), i found them very helpful and they gave me intels in how to interact with the V8 engine. Great!!
I also found useful the nan project ( github.com/nodejs/nan) simplifying the development.
After all the examples and nice exercise i made with simple C++ programs when i started integrating with all those dependencies, modules like boost and which files wrap and which not.. I got lost. I just have a basic understading of C++ and the more errors I solved the more node-gyp gave me!
- How should i do it? What's the best approach?
- Maybe it would be better for performace to just separate ORE and Node and trying to make them talk with child_process.execFile? If so how?
- I will need to run multiple instances of ORE with Nodejs, then using child_process.fork instead of creating an addon is a better choice?
- What's the best approach for running in multiple machines?
Since ORE and Quantlib are always being updated it doesn't seems to me a good approach writing an addon since sooner or later the code it's gonna change.
Thank you for your help!!
via Calogero Mandracchia
No comments:
Post a Comment