Is it possible to call functions from Node.js in Rhino, and vice-versa? I'd like to enable communication between Node.js and Rhino somehow, even though they use different Javascript engines. I've set up a node.js server, and I'd like to make the server interact with a Java application that uses the Rhino javascript engine.
Asked
Active
Viewed 345 times
0
-
I'm not sure if this is an exact duplicate, but it's certainly relevant: http://stackoverflow.com/questions/4353107/is-it-possible-to-make-node-js-use-rhino-as-the-javascript-engine – Anderson Green Sep 04 '12 at 18:39
-
1Instead of using Rhino as the Node.js javascript engine (as in the question link above), I simply want to enable communication between node.js and Rhino. – Anderson Green Sep 04 '12 at 18:42
1 Answers
0
If you consider your node process to be a running webserver offering a REST API (e.g. via the "restify" package), and your Rhino process to be a Java web client, then I recommend using the Rhino code to call REST API methods (via Java hooks) on your node webserver process, probably by marshaling objects as JSON. Hope this helps.

Kevin Hutchinson
- 2,353
- 2
- 17
- 10