Problem

Jamie Munro
Jul 30, 2017 · 1 min read

What is the best way of integrating node.js with Scala (Java)?

The simplest way I see so far is using Redis PubSub as a mediator, with node.js server handling HTTP requests and publishing messages to the request channel (via redis-node-client), and Scala actors (e.g. Akka Redis PubSub integration) subscribed the request channel and publishing computation results to the response channel (subscribed by nodes).

Problem courtesy of: Vasil Remeniuk

Solution

I’ve implemented a small proof-of-concept library for connecting node.js to Scala Remote Actors directly via TCP (using protobuf as a marshalling mechanism).

Solution courtesy of: Vasil Remeniuk

View additional discussion.

Jamie Munro

Written by

Author of 20 Recipes for Programming PhoneGap, 20 Recipes for Programming MVC 3, and Rapid Application Development with CakePHP.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade