title: JBoss netty: How can I integrate a Telnet connection in a separate thread?
body: <p>I am working on a web-application that connects a limited number  of Android devices (150) over WebSockets in a closed network environment based on jboss netty. The netty server also needs to forward commands over telnet to another system, therefore netty uses telnet as a client (apache telnet package).</p>
  
  <p>I am wondering how to integrate this telnet connection into the netty websocket application. I am considering the following options:</p>
  
  <ul>
  <li>Encapsulate the Telnet connection and the telnet reader in two seperate threads.</li>
  <li>Encapsulate the Telnet connection in an akka Actor that starts a seperate reader-thread.</li>
  <li>Encapsulate the Telnect connection in a class that starts the reader thread.</li>
  </ul>
  
  <p>My questions:</p>
  
  <ul>
  <li>Is it possible and is it a good idea to start threads from within netty?</li>
  <li>Is it possible and is it a good idea to use an actor that starts a thread? </li>
  </ul>
  
  <p>Any suggestions as to how to solve the problem are highly appreciated.</p>
  
  <p>Cheers</p>
  
  <p>Peter</p>