reaktivity / k3po-nukleus-ext.java

K3PO Nukleus Extension
Apache License 2.0
0 stars 9 forks source link

Support fragmented DATA frames (INIT | FIN=0) #45

Closed jfallows closed 6 years ago

jfallows commented 6 years ago

DATA frame has flags indicating INIT (initial) or FIN (final) fragment in a message, with the default behavior using single fragment DATA frames with both INIT and FIN flags set to 1.

The k3po-nukleus-ext transport needs support to force different DATA fragmentation scenarios during both write and read.

Each write statement results in a single message, using fragmented DATA frames as necessary to honor flow control.

write "a string" 123 "another string"

Therefore, the guaranteed behavior is that message boundaries align with separate write statements. This is backwards compatible with the current write behavior.

Each read statement verifies that the data is received as a single message, in one or more DATA frames.

read "a string" 123 "another string"

Therefore, the guaranteed behavior is that message boundaries align with separate read statements.

This is backwards incompatible with the current write behavior, so existing scripts comprising consecutive read statements may need to change to unified multi-term read statements instead, where message boundary enforcement now triggers a newly observed change of behavior.

The read message boundary enforcement would need to be handled by the generic k3po ReadHandler, so this enhancement has a dependency on a corresponding k3po enhancement.

k3po/k3po#466