Skip to content

Standardize Length/Terminator message chunking #37

Description

@bkgoodman

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:

  1. Allow such FSIMs to transmit a zero-length size, to mean "unknown" in such cases
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions