netty websocket + continuous PERIODIC data push -


what best way continuously push data periodically(say every n seconds) websocket server in netty?

edit :

i came across post : best way send continuous data in java using netty , according answer,while/sleep wouldnt scalable, how 1 schedule job on executor ?

  1. websocket client connects netty server, handshakes , establishes websocket connection.
  2. the server registers client's channel somewhere can retrieved when there's data send. (i use channelgroup in singleton)
  3. the scheduled job fires, gets data somewhere, gets reference client's channel , writes data it.
  4. the client channel's pipeline should have few encoders in marshal scheduled job supplied data websocket frames.

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -