FSIMS like "upload" send a message with their length, followed by several more with their payloads. Once the total sent payload equals the indicated length, the transfer is complete.
Problem:
I have seen many cases, specifically in smaller memory devices (embedded) where devices are attempting to generate transmission larger than they are able to hold in their memory buffers. i.e. They are dynamically generating this content over several datagrams, and therefore do NOT know the final size at the beginning of the transfer.
The only way around this issue has been to generate the data TWICE (one just to count size for initial length message, followed by another to transmit datagrams). But this both wastes time, and only work if data generation is guaranteed to be deterministic and identical.
Recommendation:
- Allow such FSIMs to transmit a zero-length size, to mean "unknown" in such cases
- Require them to send to zero-sized payload to indicate when transmission is done (EOT)
Alternative Considerations
- Do not send a length message at all (instead of zero) when null-sized EOT payload shall be sent.
- Use a differently-keyed message (e.g.
data, data, data then EOT - or payload-0, payload-1 then payload-EOT) to indicate EOT.
This should be considered along with Issue #36 for a more standardized approach to payload handling in FSIMs.
FSIMS like "upload" send a message with their length, followed by several more with their payloads. Once the total sent payload equals the indicated length, the transfer is complete.
Problem:
I have seen many cases, specifically in smaller memory devices (embedded) where devices are attempting to generate transmission larger than they are able to hold in their memory buffers. i.e. They are dynamically generating this content over several datagrams, and therefore do NOT know the final size at the beginning of the transfer.
The only way around this issue has been to generate the data TWICE (one just to count size for initial length message, followed by another to transmit datagrams). But this both wastes time, and only work if data generation is guaranteed to be deterministic and identical.
Recommendation:
Alternative Considerations
data,data,datathenEOT- orpayload-0,payload-1thenpayload-EOT) to indicate EOT.This should be considered along with Issue #36 for a more standardized approach to payload handling in FSIMs.