Originally Posted by Ibrahim
You could investigate different network schemes and find a suitable design for your layout. For example round robin -type so that way you could organize the network of machines not to have connection from each peer to each peer but one peer to one other and so on.
Lets say your clients are A, B, C and D.
If you want full p2p A would have to serve B, C and D. B would have to serve A, C and D and so on.
But if you round robin it so that A serves B, B serves C and C serves D you'd only need to "ack" A to start the chain. You'll save alot of connections for a tiny price of latency.
There might be other even more suitable network architectures depending on size and possible timing issues of the network. As for java side, i believe you will have to use the serversocket-socket structure for TCP/IP connection if the UDP isn't reliable for your needs. But you could implement some kind of light handshake protocol ( send ack -> wait for ack to ack -> if not recieved send another ack etc.. ) to strenghten the reliability of UDP.
Edit: You might want to look in to this as well: http://docs.oracle.com/javase/tutori...adcasting.html
Anyway, good luck to your project