Synchronous message transmission
-
It seems to me that if each message is being send async over different sockets you are going to need some way of identifying which sets of messages are related, the order in which they are meant to arrive and the total number to expect. The simplest solution I can think of is to create a message header that details this information. The receiving system should then be able store incomplete message sets and wait until the total number of messages has arrived before sorting them by message order. The receiver will need to be designed to be able to handle multiple sets of messages being sent at the same time to avoid data clashes. I would also add some sort of check sum if the data is going over a public network to ensure that no one has tried to inject messages into the system.