What is the best way to work with akka from nodejs What is the best way to work with akka from nodejs express express

What is the best way to work with akka from nodejs


Since Akka speaks HTTP itself you can just make a RESTful call from Node to the Akka service. Pipelining is supported so you can make this very efficient. Within the Akka HTTP server flow you use the ask pattern to get the calculated value back from your actor.


The cleanest way would to be to skip node.js/socket.io for the messaging layer and instead use websockets over spray.io directly. Typesafe has an activator template for just the scenario of websockets to akka actors: Spray and Websocket interfaces to actors

Otherwise you would be looking at some kind of RPC middleware, maybe Thrift or ZeroMQ.