Well... the data loss is not a guarantee, I have sent very large messages in the past without issue. However, there is an issue where the send/recv buffer on the UDP loopback can drop packets if they are sent too quickly. Due to the nature of large message support in JAUS, this can occur after the message is chopped up into smaller chunks. There are a few ways to solve this...
- Intelligently throttle the sending of large message chunks so as to not overrun the loopback buffers.
- Unintelligently hack a sleep into the largeMessageHandler to ensure the buffer has enough time to be processed and not over run.
- Fundamentally change the interface between the NodeManager and components so that this cannot occur (shared memory or TCP are options).
- Don't use JAUS to transfer large chunks of data, use another protocol like FTP or SCP which is designed for large data transfer and just use JAUS to negotiate that exchange.
As you can see, each solution offers differing levels of complexity and robustness. Some approaches may break interoperability with existing OpenJAUS code and some may break interoperability with other JAUS tool kits. Each of these approaches are on the table for development right now, but we are currently debating and discussing the solution we want to ultimately deploy (and in fact I suspect it may be a combination of things).
All that said, you can certainly take any of the approaches and make something that just works. If you need something that fixes this today, I would recommend number 2. One issue here though is that a call into the largeMessageHandler belongs to the orginating thread and sleeps in there may cause lag in your state machine. So you may need to create an outbound queue, make a thread and process those messages, then kill the thread when the process is complete.
~Danny