Hi folks,<br><br>Are there any recommendations/examples to follow while building a service over Netty? My service has multiple methods and uses protocol buffers for message serialization. <br><br>Protocol buffers do let you define services, but the generated code expects an RPC interface and doesn&#39;t look like it can fit cleanly into Netty.<br>
<br>So it looks like the only option is to declare a message such as <br><br>message Request{<br>    enum RequestType { READ = 1; WRITE = 1; }<br>    required RequestType requestType = 1;<br>    optional ReadRequest readRequest = 2;<br>



    optional WriteRequest writeRequest = 3;<br>}<br><br>And then in the netty handler decide whether its a write call or a read call based on the enum, and then pass the appropriate optional field (readRequest or writeRequest) to the next handler.<br>
<br>Is this the recommended way or is there something cleaner I can do?<br><br>Utkarsh<br>