I am new to Java NIO .
I have a java program which queries servers (different IPs /Ports) iteratively in a loop. But now i want to send all the packets at once instead of in a loop and then store the data received in the reply packet.
The query consists of only 1 reply packet, no further communication is required.
is this the way to do it - > Make a datagram Channel , send all packets via .send() , listen for packets and start new thread to process and store packet data.
number of servers maybe >400 . Is it better to make 400 threads or 400 datagram channels ??? Also should i use async package instead of NIO .
Would it be easier with Netty etc?