GRPC Serializer does call at the time of GRPC request calling why

100 views
Skip to first unread message

Joseph Anjilimoottil

unread,
May 15, 2023, 7:45:10 AM5/15/23
to grpc.io
Hi Guys,
I am working on the project and i want to do  nested serializer  and in that i want  to do data filtering based on the request while API calling but the pdb does not hit but while saving it hit the pdb  in the serialize why.

can you please give me answer on these questions

Zach Reyes

unread,
May 17, 2023, 3:54:33 PM5/17/23
to grpc.io
What language are you using? Can you please provide more information? I don't know what pdb is referring to.

Tripti Kothari

unread,
May 18, 2023, 2:24:51 AM5/18/23
to grpc.io

HI we are using python for grpc as a server and client both

Richard Belleville

unread,
May 18, 2023, 1:49:19 PM5/18/23
to grpc.io
I'm not clear on what the issue is exactly. Can you please add some more detail here?

Tripti Kothari

unread,
May 18, 2023, 1:58:22 PM5/18/23
to grpc.io

HI  in GRPC when we want to serialize the we sent it to the protoserrializer file in python right why does function call only when server get refresh it whenever I invoke the API request at that my serializer  does not call why it happen like this and I want to ask about the custom method Serializer in grpc python  I hope my issue now is clear

Richard Belleville

unread,
May 18, 2023, 2:09:27 PM5/18/23
to grpc.io
I'm still not 100% sure I understand, but I'll try to clarify my assumptions as I go.


> when we want to serialize the we sent it to the protoserrializer file

I'm assuming this means that you're using a custom response serializer via this keyword argument of the RpcMethodHandler class. "protoserializer" is not a file I am familiar with in either the gRPC or protobuf projects, so I'm guessing this is your own file and probably your custom serializer.

I'm not sure why you would be using a custom serializer if all you want to do is serialize protobufs though. That's the behavior of the default serializer.

> why does function call only when server get refresh it whenever I invoke the API request at that my serializer  does not call

I'm really not sure what you mean by "refresh" here. gRPC servers have no refresh method. If you are using your own RpcMethodHandler with a custom response serializer, then it will be invoked every time you return a response in your server handler.

> about the custom method Serializer

The capitalization of "Serializer" here is throwing me. There is no "Serializer method" in the gRPC Python API surface, nor do we have any methods that are capitalized, but individual proto files _do_ capitalize all of their methods. Is this a particular RPC method that your or another member of your organization has written into a proto file?

Tripti Kothari

unread,
May 18, 2023, 2:25:43 PM5/18/23
to grpc.io
Hi, I am sorry  I am not getting the clarity

In grpc we have protoserializer  in that there is modelserializer to serialize the model query into the json format write.
Now In serializer in django there is serializemethodfield we used to create out function to do query into the another table, and that table have the reverse foreign key for that in grpc what should I do. can you give me suggestion on that.
Reply all
Reply to author
Forward
0 new messages