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:

  1. have akka actor listen new socket connections.
  2. wrap connections (ws or tcp sockets) clientconnectionmanager instance
  3. pass actors takes care of connections/rpc logic.

other leads considered: reimplementing playframework controller class.

or there implemented solution this?


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -