Now that protocol buffers 3 has support for optional fields 
<https://stackoverflow.com/a/62566052/2233608> which lets you test whether 
the field was set or not, are FieldMasks still useful?

For instance, when implementing an Update method in gRPC which allows the 
client to update only the fields that they pass, should the method take a 
message with `optional` fields or a FieldMask? Is it a matter of personal 
preference? Or is there a benefit to one of them?

We also want to expose the gRPC API as a JSON/HTTP API using either 
grpc-gateway or envoy with the grpc_json_transcoder filter. Do these have a 
preference with either pattern?

I see that Googles AIPs <https://google.aip.dev/134> recommend FieldMasks 
for Update methods, but this could have been done before `optional` was 
available?

-- 
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/9f8b2b48-66fe-4f97-b822-84402309a5edn%40googlegroups.com.

Reply via email to