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 <erik.stroe...@gmail.com>
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 protobuf+unsubscr...@googlegroups.com.
> 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 protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/CADqAXr4ggxdksZ5NyYCwEYuXdAJ-YW_f_dq3quMjCarztgtcgw%40mail.gmail.com.

Reply via email to