Who Owns Data After Sending It

A network write API can report acceptance by a local buffer, which is a different observation from application processing at the remote endpoint.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace an ordinary queued write
  2. Define the acknowledgement boundary
  3. Distinguish accepted bytes from recorded business effects
  4. Define what can be repeated after interrupted delivery

Trace an ordinary queued write

A sending function can return while bytes remain in transport handling. A later remote response may confirm that a complete record was parsed or stored. Buffered writes explain the corresponding local buffering distinction.

Define the acknowledgement boundary

If the caller needs committed data, specify a reply issued after that result. Be explicit about what to do when it never arrives. Unknown outcomes motivate that contract.[1][2]

Distinguish accepted bytes from recorded business effects

A client sends a complete report over a streaming connection. Receiving all bytes delivers the message to some receiving component. It does not prove the application saved the report or made it available to its consumer. A defined acknowledgement can identify a committed outcome. See lost replies.

Transport delivers report bytes
Application parses and validates the report
Application commits it or rejects it
Reply identifies the completed outcome under the contract

Define what can be repeated after interrupted delivery

Losing a reply can leave the caller uncertain after a commit. An operation identifier or later status request can help reconcile that. Test a complete received message with processing failure and a complete commit whose reply never arrives.

References

  1. Larry Peterson and Bruce Davie, Computer Networks: A Systems Approach ↩
  2. IETF, RFC 9110: HTTP Semantics ↩