Question

How can I implement server to server communication in play framework?

I have to send a lot of data, very frequently, I'm looking for something like websockets but between servers. I could use simple socket, but my data is JSON. Is there any wrapper for sockets to use in similar way to websockets?

I'm using play 2.2 and scala.

Was it helpful?

Solution

How about Akka remoting? The actor model would fit well with the Play architecture, and would be a good way to handle unsolicited messages at the receiving end.

OTHER TIPS

I recommend you to use ZeroMQ implementation in Akka link. It is fine alternative to remote solution. The only drawback is that it depends on ZeroMQ native so you have to have ZeroMQ library installed. But it works great. Especially that you don't have to implement yourself Pub-Sub pattern.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top