[grpc-io] Golang: Is it possible to get header (metadata) in StreamClientInterceptor?

2022-03-30 Thread 温明浩
Hi all,

Currently I have a rpc like this:
*rpc SayHello (HelloRequest) returns (stream HelloReply) {}*

Now I add a StreamClientInterceptor to catch response initial metadata,
but it block forever, and server shows that no request get, at least not 
into the rpc function.

The interceptor is similar to this example:
https://github.com/grpc/grpc-go/blob/master/examples/features/interceptor/client/main.go#L90
and I just add a line under L107 :
*responseMeta, err := s.Header()  //<-- block here*

Im sure that I can done in Python code,  which is implement similar to:
https://github.com/grpc/grpc/blob/master/examples/python/interceptors/headers/generic_client_interceptor.py#L33
and adds code under L37:
*print(response_it.initial_metadata())*

Can anyone tell me what is wrong of my Golang code?
Actually I can get header by wrapping grpc.ClientStream and received in 
RecvMsg()
and I observed that I can only get header after SendMsg, but it doesn't 
make sense :(

-- 
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/ce8a4460-cfdb-4975-806d-ae8f4ea6a5can%40googlegroups.com.


[grpc-io] Re: grpc with python 2

2022-03-30 Thread 'Richard Belleville' via grpc.io
Bhaskar,

As Vinod pointed out, yes, Python 2 support was dropped in 2020. However, 
all previous releases supporting Python 2 should theoretically continue 
working. Try pinning to grpcio==1.39.0.

Realistically speaking though, you should really consider moving off of 
Python 2. No bug or security fixes are being backported to this version, so 
you put yourself at more and more risk over time by sticking with Python 2.

On Wednesday, March 30, 2022 at 8:39:21 AM UTC-7 Vinod Lasrado wrote:

> Hi Bhaskar,
>Support for python 2 was dropped in 2020. 
>
> --Vinod
>
> On Wednesday, March 30, 2022 at 7:20:35 AM UTC+5:30 bhaskar rana wrote:
>
>> Hi Grpc team,
>>
>> I want to run  python 2 with grpc, i did see it require 3.5+.
>> Is there any way to run grpc with python 2.
>> Kindly assit
>>
>> Regards
>> Bhaskar Rana
>>
>

-- 
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/33b0fc87-c56a-4c5b-a0be-b9618546e9a1n%40googlegroups.com.


[grpc-io] gRPC Java v1.45.1 Released

2022-03-30 Thread 'Eric Anderson' via grpc.io
The v1.45.1 release 
is now available.Bug Fixes

   - netty: Fixed incompatibility with Netty 4.1.75.Final that caused
   COMPRESSION_ERROR (#9004 )
   - xds: Fix LBs blindly propagating control plane errors (#9012
   ). This change forces the
   use of UNAVAILABLE for any xDS communication failures, which otherwise
   could greatly confuse an application. This is essentially a continuation of
   the fix in 1.45.0 for XdsNameResolver, but for other similar cases

-- 
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%2B4M1oNU6wp4EyasDmrHetBV9F2gtpSF_YoF0M9FQ7HD_1%2B98Q%40mail.gmail.com.


smime.p7s
Description: S/MIME Cryptographic Signature


[grpc-io] Re: grpc with python 2

2022-03-30 Thread 'Vinod Lasrado' via grpc.io
Hi Bhaskar,
   Support for python 2 was dropped in 2020. 

--Vinod

On Wednesday, March 30, 2022 at 7:20:35 AM UTC+5:30 bhaskar rana wrote:

> Hi Grpc team,
>
> I want to run  python 2 with grpc, i did see it require 3.5+.
> Is there any way to run grpc with python 2.
> Kindly assit
>
> Regards
> Bhaskar Rana
>

-- 
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/a58c7c31-cbca-4f1c-a8bc-b903063f25f7n%40googlegroups.com.


[grpc-io] Re: What means by single response/request(Unary) and stream message(Bi-directional)

2022-03-30 Thread 'Vinod Lasrado' via grpc.io
Hi,
Please refer to the following links for basic understanding of gRPC.

https://grpc.io/docs/what-is-grpc/core-concepts/
https://stackoverflow.com/questions/58429357/should-i-transmit-large-data-sets-via-grpc-without-manual-chunking

To answer your questions.
1. Yes the example shown is a unary RPC.
2. Depending on implementation it can be server side of client side 
streaming.

--Vinod
On Sunday, March 20, 2022 at 3:40:44 AM UTC+5:30 MD ATIF BIN KARIM wrote:

> I am using the following message in protocol buffer
>
> syntax = "proto3";
>
> package demo_grpc;
>
> message S_Response {
> string name = 1;
> string street = 2;
> string zip = 3;
> string city = 4;
> string country = 5;
>
> int32 double_init_val = 6;
> }
>
> message C_Request {
> uint32 choose_area = 1;
> string name = 2;
> int32 init_val = 3;
> }
>
> service AddressBook {
> rpc GetAddress(C_Request) returns (S_Response) {}
> }
>
> I have set up all of the values for the `C_Request` and pass them to the 
> server where 
> `S_Response` messages fields are processed and returned back to the client.
>
> My question is--
> 1/ May I call it a Unary RPC?
> 2/ I want to in next stage pass a very large data (around 10GB, probably a 
> vector or array
> not a file as far I know). And have found that I have to pass it via small 
> chunk. That large
> vector related data field will be resided in a single message.
> What will be name of this type of RPC(eg: Bidirectional streaming RPC)?
>

-- 
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/c677a4c9-f6da-4713-aca9-08914e4b4d1cn%40googlegroups.com.