java - TCP socket and Web Socket on playframework server? -
my service uses websockets communicate html5 in-browser client. client served same server normal http request.
now offer same service/app out of browser, , offer on tcp sockets.
the rpcs/action object using going same, serialization going same, logic same. want use tcp socket instead of websocket.
i keep code under same "project folder", starting @ once when deploy playframework server (basically on start want start listening websockets, tcp sockets , http requests), , have in same package on deploy.
i know that:
- it not necessary, since websocket can used in not-in-browser apps, consider exercise or curiosity question.
- playframework built on top of netty, , used netty before tcp services (nothing big , nothing prod ready though ... not expert). should work right?
what thinking do:
- have akka actor listen new socket connections.
- wrap connections (ws or tcp sockets)
clientconnectionmanager
instance - pass actors takes care of connections/rpc logic.
other leads considered: reimplementing playframework controller class.
or there implemented solution this?
Comments
Post a Comment