简体   繁体   中英

Play2 server to server communication

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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM