Right now when I parse a message in node, the enum value is set to string. However, string is not an efficient representation of enum. It takes longer to compare, it takes more space in the database, etc.
Possible solutions:
- Provide a mapping from string to int.
- Set option to always return int for enums.
- Generate a simple module that contains constants for all the enums in the protobuf.
Solutions #2 + #3 are likely to generate the nicest and most efficient server-side code.