C
C#2y ago
nboyz98

❔ GRPC design oneof or separate Rpc

Hi there, I have a system which i'm trying to expose via GRPC protobufs. Assume we have 5 different types of records with some shared fields and some custom fields in each record type. At the moment i can think of exposing it like this: message Record { string id = 1; string shared_field1 = 2; string shared_field2 = 3; oneof <type1_fields, type2_fields, type3_fields> custom_fields = 4; } The other option is for a separate message per record type which includes the custom fields in each.
3 Replies
phaseshift
phaseshift2y ago
What's the question?
nboyz98
nboyz98OP2y ago
Oopsies i missed adding the actual question. What is the better option for my use case?
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server