title: Java NIO based scalable non blocking TCP client server design: recommend way to send large response back to client
body: <p>I am trying to implement a highly scalable server in java for the following usecase</p>
  <ol>
  <li><p>Client sends a request to server in a form of COMMAND PARAM</p>
  </li>
  <li><p>Server can send a varying size response, from a few characters (10 bytes) to large text data (of size 6-8gb, equivalent to client ram)</p>
  </li>
  </ol>
  <p>What should be the appropriate way to send response in these scenarios. I need to support multiple concurrent clients. Can some one point me to a  reference/sample implementation?</p>