READ BYTES · FRAME EVENTS · CONSUME
Event streaming: byte chunks are not message boundaries
Fragment real encoded bytes, inspect the parser buffer and follow complete events into an ordered text consumer.
Text source and visible output
Appended output
Unparsed buffer: first 32 bytes in hex
Your experiment
Set reads to one byte and inspect the partial buffer. The emoji must still arrive intact after its complete event is reconstructed. This isolates SSE framing, not the full A2A message schema.
The text is split into six-code-point deltas, numbered from 1. A source fault targets event 3, or the last event when fewer than three exist. Output is appended only after a complete frame is parsed and consumer processing finishes.
In streaming mode a full application queue pauses reads; one additional event may be processing. In buffered mode all body bytes arrive before parsing begins. The same 60-second inspection maps proportionally to each scenario’s modeled duration; it is not a network performance measurement.
Recent parser and consumer events
Original event fixtures
Offline byte-framing lesson. SSE parsing supports only the generated LF-delimited id/data subset; this is not a complete EventSource implementation. The alternative uses a zero compression byte plus four-byte big-endian payload length and UTF-8 JSON, not Protobuf. No HTTP/2 frames, headers, trailers, grpc-status, compression, TLS, provider API, A2A envelope, retries or reconnect/resume are implemented. The queue policy is application backpressure, not transport flow control. Duplicate suppression and strict contiguous event IDs are explicit application policies, not guarantees supplied by SSE/gRPC. Missing IDs are rejected without reordering or replay. Empty source is complete with no output; an incomplete frame remains truncated. SSE specification · gRPC message framing.
Do not equate a byte read with an agent event
A read returns some bytes, not necessarily one complete message. This lab encodes a short text into ordered delta records, fragments their wire representation and reconstructs frames before passing records to a consumer. Bytes can stop inside a length header, JSON token or multi-byte character. The decoder buffer therefore holds incomplete framing work while the bounded application queue holds complete records waiting to be processed. This page demonstrates that boundary with actual encoded bytes, not an A2A schema validator or a streaming video decoder.
Control the byte and application boundaries
Local text supplies the payload, with the browser limiting entry to one hundred twenty UTF-16 code units. The model groups Unicode code points into records of up to six, each with a sequence identifier and delta string. Framing format selects the LF-delimited SSE subset or an uncompressed five-byte gRPC-style prefix around JSON. Application consumption either parses complete events incrementally or waits for the full body. Bytes per read changes fragmentation, Read interval changes scheduled arrival spacing, Processing per event changes consumer time, and Queued events bounds waiting records separately from the one active record. Parameter edits rebuild the scenario and start inspection unless reduced motion is requested.
Make fragmentation visible without corrupting text
Keep the default source with its emoji, choose the LF-delimited SSE subset and set Bytes per read to one. Inspect the growing pending-byte hex before a complete event can enter the queue. Show the end with the inspection slider: the output must reproduce the source exactly, including the emoji. Repeat with the uncompressed length-prefix format and observe the same output despite a different wire representation. Increase reads to sixty-four bytes; a read can now include multiple event pieces, but the consumer still acts only on complete validated records. Smaller reads are not smaller application messages.
Inject failures and inspect safely
Source event fault repeats, omits or corrupts the third event, or the last available event for a shorter source; truncation removes the final three wire bytes. Ignore already-applied event IDs affects duplicate records only. Missing or malformed records can leave a sequence gap, and later records are rejected rather than reordered or replayed. Play and Pause inspect sixty seconds of viewing time; Next event advances a recorded scheduler transition; Restart inspection rewinds; Speed adjusts viewing pace; Inspection time scrubs. Visible output, pending-byte hex and recent events reflect the inspected prefix. The complete-run preview and original event list describe the full scenario, not work already consumed.
Measure a local consumption policy, not a provider benchmark
Set reads to sixty-four bytes, interval to one hundred milliseconds, processing to one thousand milliseconds and queue capacity to one. Incremental consumption can pause reads while a complete event is waiting and another is active. Full-body buffering instead reads everything before parsing begins, giving a later first output and larger byte buffer in this fixture. Compare the complete-run preview, not merely the same playback second, because each scenario maps its own modeled duration onto sixty viewing seconds. There are no sockets, HTTP headers, A2A envelopes, provider tokens or transport flow-control windows. The result supports a local framing and queue explanation, not a throughput ranking of real protocols.