Instead of using Java, look into a pure JS implementation of Coffee-Graph, or perhaps even a C/C++ port that we could use as a Node.js extension.