I’m currently developing a server (using Java) that has to send quite often (every 10-30 seconds) a few bytes to multiple clients (10 – 100). At first, I thought of using UDP multicast datagrams (java.net.MulticastSocket), but I thought of this not being a good solution because of the bad support for multicast on most routers.
So I’m wondering if it would be a good idea if I sent all data directly to the hosts via unicast or do you know of anything more elegant/with less traffic?
There are many advantages in using JMS, but most of these use TCP and so could you. A few bytes every 10-30 seconds to a few hundred clients is small even on low bandwidth networks.
Say you send a 100 bytes message to 100 clients every 10 seconds, That 1000 bytes per second or 8Kbits/second. Even 3G networks will support this bandwidth easily. i.e. you could do this with a smart phone. 😉
The simplest approach may be to have a tcp connection from each client which the server sends update messages as required.