Stream EOF support #62

Open
opened 2025-12-28 18:12:20 +00:00 by sami · 2 comments
Owner

Originally created by @cthulhu-rider on GitHub (Feb 24, 2022).

Currently we don't have any mention of a graceful end to the stream. Go gRPC implementation returns EOF on client/server side if server/client closed the stream via corresponding library functionality.

Do we want to unify this behavior on protocol definition level? Possible solutions:

  1. Require to finish stream with empty request|response body: this will support the completion of the stream at a purely protocol level, and not be tied to the implementation;
  2. Require to finish stream with EOF-like status code: alternative way of 2.
Originally created by @cthulhu-rider on GitHub (Feb 24, 2022). Currently we don't have any mention of a graceful end to the stream. Go `gRPC` implementation returns `EOF` on client/server side if server/client closed the stream via corresponding library functionality. Do we want to unify this behavior on protocol definition level? Possible solutions: 1. Require to finish stream with empty request|response body: this will support the completion of the stream at a purely protocol level, and not be tied to the implementation; 2. Require to finish stream with `EOF`-like status code: alternative way of 2.
Author
Owner

@cthulhu-rider commented on GitHub (Jan 15, 2024):

i thought that the synonymous problem could be lack of unknown RPC: Protocol Buffers v3 doesnt contain functionality for this. Hence current NeoFS API protocol doesnt specify behavior when calling, for example, neo.fs.v2.object.ObjectService/MissingRPC method. Some dedicated status message would help

https://datatracker.ietf.org/doc/html/rfc2616#section-10.5.2

@cthulhu-rider commented on GitHub (Jan 15, 2024): i thought that the synonymous problem could be lack of `unknown RPC`: Protocol Buffers v3 doesnt contain functionality for this. Hence current NeoFS API protocol doesnt specify behavior when calling, for example, `neo.fs.v2.object.ObjectService/MissingRPC` method. Some dedicated status message would help https://datatracker.ietf.org/doc/html/rfc2616#section-10.5.2
Author
Owner

@cthulhu-rider commented on GitHub (Jan 17, 2024):

consider specific status code similar to 206 Partial Content. Then all non-fin messages could carry this code while the fin one 0 OK meaning EOF

but be careful, backward compatibility never sleeps

@cthulhu-rider commented on GitHub (Jan 17, 2024): consider specific status code similar to [`206 Partial Content`](https://datatracker.ietf.org/doc/html/rfc2616#section-10.2.7). Then all non-fin messages could carry this code while the fin one `0 OK` meaning `EOF` but be careful, backward compatibility never sleeps
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-api#62
No description provided.