Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Unfortunately I don't know any books about netty, but the online documentation together with JavaDocs and examples are pretty good. Here is a handful of examples:</p> <ul> <li><p>if you want to serve thousands of concurrent users/connections, non-blocking I/O is your only choice. Java (and OS) won't handle thousands of threads effectively, needed for blocking I/O. netty can, without creating that many threads.</p></li> <li><p>netty is as good as underlying protocol (TCP/IP or UDP). You cannot work around network latency. E.g. sending a packet from USA to Europe will take around 150 ms.</p></li> <li><p>if timing is so important, you might need to synchronize the clocks somehow or use central time source. Check out <a href="/questions/tagged/ntp" class="post-tag" title="show questions tagged 'ntp'" rel="tag">ntp</a></p></li> <li><p>you must decide how your protocol will interact with the server:</p> <ul> <li><p>short request/response connections, established every time users wants to upload question or get new one - think <a href="/questions/tagged/http" class="post-tag" title="show questions tagged 'http'" rel="tag">http</a>. This will be very slow, but quite reliable (you don't have to worry about long-lasting connections being interrupted</p></li> <li><p>establishing one connection per user, lasting throughout the whole quiz. This will minimize latencies, but you must handle broken connections and reconnects manually.</p></li> <li><p>Hybrid approach - choose <a href="/questions/tagged/http" class="post-tag" title="show questions tagged 'http'" rel="tag">http</a> protocol with <code>Keep-alive</code> option</p></li> </ul></li> <li><p>in netty, avoid copying of byte arrays (<code>ChannelBuffer</code>/<code>ByteBuf</code> is pretty good at that) and creating too much garbage</p></li> <li><p>avoid blocking I/O operations in netty worker threads. Monitor how many worker threads are utilized, avoid queueing of netty events.</p></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload