One note is that the built-in service implementation is sort of considered to be "deprecated" at this point, due to the plugin infrastructure that allows people to generate their own service code.

On Jul 15, 2010, at 5:22 , Jamie McCrindle wrote:
2. I've been pondering how to inject in Service references. I like the
idea that I have a 'local' RPC implementation that could be swapped
out for a 'remote' one without having to change the client class. It
doesn't seem right to have this code in the client (i.e. recreate the
stub for every call):

I do exactly what you do: I create the stub once and pass it in where needed. You may also find the TestService.Interface interface to be useful for this. It lets you "inject" testing versions of the services, for example.

3. Regarding extending RpcController. Adding a timeout and a timestamp
seem pretty good candidates but the 'EnhancedRpcController' then
becomes a pervasive cast as well as a RPC implementation lockin

This is probably the "worst" part of the built-in service API, in my opinion. I end up with casts related to controllers in lots of places. Its ugly, but I don't see any good way to fix it.


Evan Jones

You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to