I'm writing a C++ application MyMasterApp which sends information (OSC via UDP) to multiple clients (about 5-10), which are mobile devices (Android or iPhone) via wifi.
Each device is to receive unique information, of the same type. Probably about 100-200 bytes per device, and I'll be updating all devices at 30Hz.
I could send a unique data packet to each device, or I could create one big structure which contains each of the unique bits of data for each device, with the target id, multicast this to all devices, then each device only picks out the data it needs.
i.e.
- send DATA1 to device1
- send DATA2 to device2
- send DATA3 to device3
- send DATA4 to device4
vs
- create a new DATA which contains DATA1, DATA2, DATA3 etc. multicast DATA to all devices, and each device picks the relevant data to use.
Before I attempt both approaches, are there any theoretical, or recorded practical advantages of one over the other (E.g. better performance, less collision, lost packets etc)? Or are the differences just negligible?
I have a related network performance question about the same project at Should I listen on different ports, or the same port?