Reputation: 15406
I am developing a system that will provide many services, say, S1
, S2
, S3
. Each of these services have a number of executables that will communicate using events, using protobuf.
My question is: Which one do you think is better design: (1) Combine all events for all the services (currently about 10-15) into one big my_events.proto
definition, or (2) Keep them separate, i.e. s1_proto
, s2_proto
, etc.
Nice thing about (1) is that there's one proto file to worry about; downside is I'm linking the same large header file for all code.
Thanks!
Upvotes: 1
Views: 169
Reputation: 2941
I'd go with separate definition files. If anything, because you can change each service individually without having to recompile/build the entire set; you can manage change histories better in CVS or whichever source code control tool you use; and it would perhaps be easier to lookup smaller files when you are working on the service implementations.
Upvotes: 2