Re: [grpc-io] Re: abstract gRPC protocol clarification: client half-closing

2021-06-01 Thread Piotr Morgwai Kotarbinski
Thanks for the answer! I've created a tiny PR with docs 
update: https://github.com/grpc/grpc/pull/26396

Thanks!

On Monday, May 31, 2021 at 12:49:50 AM UTC+7 sanjay...@google.com wrote:

> https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests 
> mentions EOS which is described as 
>
> "For requests, EOS (end-of-stream) is indicated by the presence of the 
> END_STREAM flag on the last received DATA frame. In scenarios where the 
> Request stream needs to be closed but no data remains to be sent 
> implementations MUST send an empty DATA frame with this flag set."
>
>
> On Sun, May 30, 2021 at 7:18 AM Piotr Morgwai Kotarbinski <
> mor...@gmail.com> wrote:
>
>> I've noticed that in case of the java client code, calling 
>> `requestObserver.onCompleted()` results in a call to `
>> io.netty.handler.codec.http2.DefaultHttp2FrameWriter.writeData(...) 
>> `
>>  
>> with `endStream` param set to `true` in case of netty, and in case of 
>> okHttp in a call to `io.grpc.okhttp.internal.framed.Http2.Writer.data() 
>> `
>>  
>> with `outFinished` param set to `true`. In both cases this results in 
>> `END_STREAM` flag to be set, so it seems my guess was correct. However some 
>> confirmation from someone more familiar with the protocol internals would 
>> be welcomed :)
>>
>> Thanks!
>>
>> On Sunday, May 30, 2021 at 2:26:51 PM UTC+7 Piotr Morgwai Kotarbinski 
>> wrote:
>>
>>> Hi all,
>>> I was reading the protocol overview here 
>>> https://github.com/grpc/grpc/blob/master/CONCEPTS.md#abstract-grpc-protocol
>>> One thing that is unclear to me is how a streaming client signals end of 
>>> its stream to a server (so called 'client half-closing'). The abstract part 
>>> says nothing about it. My only guess that in case of HTTP/2 implementation 
>>> clients basically close their input stream, but not sure about it. Could 
>>> someone with a deep knowledge of the protocol clarify this please?
>>>
>>> Thanks!
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "grpc.io" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to grpc-io+u...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/grpc-io/87e3fc86-f3c4-4c5a-8be7-e0b773b078d1n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/0d571d1c-0aa8-4b90-9075-f8e5a444cfbdn%40googlegroups.com.


Re: [grpc-io] Re: abstract gRPC protocol clarification: client half-closing

2021-05-30 Thread 'Sanjay Pujare' via grpc.io
https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests
mentions EOS which is described as

"For requests, EOS (end-of-stream) is indicated by the presence of the
END_STREAM flag on the last received DATA frame. In scenarios where the
Request stream needs to be closed but no data remains to be sent
implementations MUST send an empty DATA frame with this flag set."


On Sun, May 30, 2021 at 7:18 AM Piotr Morgwai Kotarbinski 
wrote:

> I've noticed that in case of the java client code, calling
> `requestObserver.onCompleted()` results in a call to `
> io.netty.handler.codec.http2.DefaultHttp2FrameWriter.writeData(...)
> `
> with `endStream` param set to `true` in case of netty, and in case of
> okHttp in a call to `io.grpc.okhttp.internal.framed.Http2.Writer.data()
> `
> with `outFinished` param set to `true`. In both cases this results in
> `END_STREAM` flag to be set, so it seems my guess was correct. However some
> confirmation from someone more familiar with the protocol internals would
> be welcomed :)
>
> Thanks!
>
> On Sunday, May 30, 2021 at 2:26:51 PM UTC+7 Piotr Morgwai Kotarbinski
> wrote:
>
>> Hi all,
>> I was reading the protocol overview here
>> https://github.com/grpc/grpc/blob/master/CONCEPTS.md#abstract-grpc-protocol
>> One thing that is unclear to me is how a streaming client signals end of
>> its stream to a server (so called 'client half-closing'). The abstract part
>> says nothing about it. My only guess that in case of HTTP/2 implementation
>> clients basically close their input stream, but not sure about it. Could
>> someone with a deep knowledge of the protocol clarify this please?
>>
>> Thanks!
>>
> --
> You received this message because you are subscribed to the Google Groups "
> grpc.io" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to grpc-io+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grpc-io/87e3fc86-f3c4-4c5a-8be7-e0b773b078d1n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CA%2BPad6jo67dbE4Px%2BoCHo1BniZ4bwm_2%3DK7Bwo-pOXNg0G9fFA%40mail.gmail.com.


[grpc-io] Re: abstract gRPC protocol clarification: client half-closing

2021-05-30 Thread Piotr Morgwai Kotarbinski
I've noticed that in case of the java client code, calling 
`requestObserver.onCompleted()` results in a call to `
io.netty.handler.codec.http2.DefaultHttp2FrameWriter.writeData(...) 
`
 
with `endStream` param set to `true` in case of netty, and in case of 
okHttp in a call to `io.grpc.okhttp.internal.framed.Http2.Writer.data() 
`
 
with `outFinished` param set to `true`. In both cases this results in 
`END_STREAM` flag to be set, so it seems my guess was correct. However some 
confirmation from someone more familiar with the protocol internals would 
be welcomed :)

Thanks!

On Sunday, May 30, 2021 at 2:26:51 PM UTC+7 Piotr Morgwai Kotarbinski wrote:

> Hi all,
> I was reading the protocol overview here 
> https://github.com/grpc/grpc/blob/master/CONCEPTS.md#abstract-grpc-protocol
> One thing that is unclear to me is how a streaming client signals end of 
> its stream to a server (so called 'client half-closing'). The abstract part 
> says nothing about it. My only guess that in case of HTTP/2 implementation 
> clients basically close their input stream, but not sure about it. Could 
> someone with a deep knowledge of the protocol clarify this please?
>
> Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/87e3fc86-f3c4-4c5a-8be7-e0b773b078d1n%40googlegroups.com.