Tag Archives: node.js

Controlling Java from Node.js – a simple JSON based RPC protocol

This is an introductory example of creating a simple JSON based protocol for communicating with a Java program from a Node.js JavaScript application. You might want to do this if, for example, there is a Java library that gives some sort of fantastic benefit that you’d have a problem replicating in a Node.js script by itself. In this example, we will only be sending some basic message back and forth. In a more real world scenario, and a future article I plan on writing, you could have messages that do whatever you want on the Java side so that those actions would then be controllable from the Node side.

Continue reading