If you are using gRPC, then it provides a way for introspecting methods and
parameters for a remote server. This is a functionality that has to be
enabled on the server side. See:
https://github.com/grpc/grpc/blob/master/doc/server-reflection.md. For C#:
https://github.com/grpc/grpc/blob/master/doc/csharp/server_reflection.md


On Fri, Dec 13, 2019 at 10:55 AM 'Adam Cozzette' via Protocol Buffers <
[email protected]> wrote:

> Protobuf reflection is about doing things like introspecting over the
> structure of a message. You could do things like recurse down from a
> top-level message and set every unset field to a default value for example.
> I'm not very familiar with C# but I guess C# reflection would let you do
> some of the same things. Protobuf reflection is independent of any
> client-server setup, so it is just about introspecting on local messages.
> However, with some work you could kind of make it useful in an RPC context
> as well. For example, the server could serialize its descriptors and send
> them over the wire and then the client could reflectively manipulate
> messages based on the server's version of the schema. The Java and C++
> protobuf implementations both have a class called DynamicMessage that lets
> you work with a message using a schema that is known only at runtime, using
> reflection.
>
> On Fri, Dec 13, 2019 at 10:15 AM erik stroeken <[email protected]>
> wrote:
>
>> This might be a dumb question but when you talk about Protobuf
>> reflection, does that mean that the client can iterate through the
>> interfaces and message structures of the connected client? I program C# and
>> reflecting through the generated classes client side is already supported
>> by C# itself so it must be that Protobuf reflection is used to analyze the
>> server. Right?
>> Not that it would solve my current problem because Protobuf reflection
>> isn't implemented in C# yet (depending on the answer it would be redundant
>> anyway). Thanks for the answer.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Protocol Buffers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/protobuf/4531a885-b3e5-4847-8d0d-945aa72f412a%40googlegroups.com
>> <https://groups.google.com/d/msgid/protobuf/4531a885-b3e5-4847-8d0d-945aa72f412a%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/protobuf/CADqAXr4ggxdksZ5NyYCwEYuXdAJ-YW_f_dq3quMjCarztgtcgw%40mail.gmail.com
> <https://groups.google.com/d/msgid/protobuf/CADqAXr4ggxdksZ5NyYCwEYuXdAJ-YW_f_dq3quMjCarztgtcgw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
-Nadav

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/CANZcNEp0nkXci%3DMg03P_u3GP0UhxOZjxPRRpZTmkEpmJ2Yi4ag%40mail.gmail.com.

Reply via email to