Skip to content

Rename Call to ClientCall - #509

Merged
zhangkun83 merged 1 commit into
grpc:masterfrom
zhangkun83:rename_clientfoo
Jun 5, 2015
Merged

zhangkun83 merged 1 commit into
grpc:masterfrom
zhangkun83:rename_clientfoo

Conversation

@zhangkun83

Copy link
Copy Markdown
Contributor

Resolves #23

Other classes are already following the convention that ClientFoo for
client-side, and ServerFoo for server-side. Call has been the black
sheep of the family.

  • Call -> ClientCall
  • Calls -> ClientCalls
  • ForwardingCall* -> ForwardingClientCall*

@ejona86 @nmittler

Other classes are already following the convention that ClientFoo for
client-side, and ServerFoo for server-side. Call has been the black
sheep of the family.

- Call -> ClientCall
- Calls -> ClientCalls
- ForwardingCall* -> ForwardingClientCall*
@nmittler

nmittler commented Jun 5, 2015

Copy link
Copy Markdown

@zhangkun83 @ejona86 I'm wondering if we should hold off on this until the dust settles from Wolfgang's API work ... I suspect some of this might change again as a result. WDYT?

@wrwg

wrwg commented Jun 5, 2015

Copy link
Copy Markdown

I opened #510 to illustrate what @nmittler means. For certain, if we move
away from Call, the nice match Call/Callable wouldn't work anymore. As
Callable would be quite present in the programming style I've in mind,
ClientCallable as a substitute would really not be nice. On the other hand,
there is some concern about using Callable as name anyway, because it
conflicts with the same in java.util.concurrent.

Independent of that, I feel renaming this to "ClientCall" might be wrong.
The primary "orientation" of the name Call already seems to be client side.
Client usage of a service is typically 20x more than server usage, so
making the name for server side long and keeping it short and intuitive on
client side may be justified. So instead of promoting Call to ClientCall,
what about removing the Client prefix elsewhere, and get it consistent this
way?

W_olf_g_an_g

On Thu, Jun 4, 2015 at 7:52 PM, Nathan Mittler notifications@github.com
wrote:

@zhangkun83 https://github.com/zhangkun83 @ejona86
https://github.com/ejona86 I'm wondering if we should hold off on this
until the dust settles from Wolfgang's API work ... I suspect some of this
might change again as a result. WDYT?

—
Reply to this email directly or view it on GitHub
#509 (comment).

@zhangkun83

Copy link
Copy Markdown
Contributor Author

Independent of that, I feel renaming this to "ClientCall" might be wrong.
The primary "orientation" of the name Call already seems to be client side.
Client usage of a service is typically 20x more than server usage, so
making the name for server side long and keeping it short and intuitive on
client side may be justified. So instead of promoting Call to ClientCall,
what about removing the Client prefix elsewhere, and get it consistent this
way?

I don't feel it right to rename "ClientInterceptor" to "Interceptor", and "ClientStream" to "Stream" either, because "interceptor" and "stream" don't have the natural orientation that "call" does. On the other hand,
although "call" as a verb has outward orientation, when you use as a noun to refer to the activity on both sides, you usually decorate it, e.g., "outgoing call" and "incoming call". If we want to emphasize the out-going aspect of "Call" and introduce "Callable", maybe we should rename "ServerCall" to something like "Work" because out-going "Call" is not compatible with "Server".

@ejona86

ejona86 commented Jun 5, 2015

Copy link
Copy Markdown
Member

@zhangkun83, what is the plan for MethodDescriptor?

@zhangkun83

Copy link
Copy Markdown
Contributor Author

what is the plan for MethodDescriptor?

Since we are going to treat MethodDescriptor as a static representation of the method definition from IDL, I would keep it as-is, change ServerMethodDefinition to contain a MethodDescriptor, and delete Method.

@ejona86

ejona86 commented Jun 5, 2015

Copy link
Copy Markdown
Member

@zhangkun83, concerning MethodDescriptor, that sounds like a great direction. That is best done later, but I did want to know which way things were going.

@ejona86

ejona86 commented Jun 5, 2015

Copy link
Copy Markdown
Member

@zhangkun83 LGTM

@nmittler

nmittler commented Jun 5, 2015

Copy link
Copy Markdown

@ejona86 @zhangkun83 so should we hold off on this pending further discussion in #510? Is there a pressing need for this change?

@ejona86

ejona86 commented Jun 5, 2015

Copy link
Copy Markdown
Member

I think @zhangkun83 provided the main argument I would have: simply omitting "Client" doesn't really work because there are multiple classes that need the specificity. I'm also not sold on the name Callable given its frequent use from j.u.concurrent. I also don't see any problem with calling it ClientCallable, again, for the reason highlighted by @zhangkun83; we are definitely using Call as a noun and definitely using it on both client-side and server-side.

@ejona86

ejona86 commented Jun 5, 2015

Copy link
Copy Markdown
Member

I'd also like to mention that every API change is pressing, since the more time goes by the harder it is to make the change and the less time we have to discuss the change. To have any hope of being semi-API-stable next quarter things like this need to be resolved sooner than later.

@nmittler

nmittler commented Jun 5, 2015

Copy link
Copy Markdown

Right, so I think that's why we should have a broader discussion about the API changes now and get agreement on which way to proceed. I'd rather just change the API once if possible.

@zhangkun83

Copy link
Copy Markdown
Contributor Author

The name collision with java.util.concurrent.Callable sounds a deal breaker to me. IMO we need a different name for @wrwg 's new callable class, and this would reduce, if not eliminate, the demand for Call.

@nmittler

nmittler commented Jun 5, 2015

Copy link
Copy Markdown

Let's carry the discussion over to #510

@ejona86

ejona86 commented Jun 5, 2015

Copy link
Copy Markdown
Member

@nmittler, I think both @zhangkun83 and I don't think @wrwg's API impacts this PR. I wouldn't know what to discuss in #510. Moving the discussion to #23 could work, but it doesn't seem to be much better than just discussing here.

@wrwg

wrwg commented Jun 5, 2015

Copy link
Copy Markdown

Thanks @nmittler. I'm fine if you move forward with this PR, for the sake
of decoupling this discussion. We can have it again once we are looking at
a PR for Callable.

W_olf_g_an_g

On Fri, Jun 5, 2015 at 11:20 AM, Eric Anderson notifications@github.com
wrote:

@nmittler https://github.com/nmittler, I think both @zhangkun83
https://github.com/zhangkun83 and I don't think @wrwg
https://github.com/wrwg's API impacts this PR. I wouldn't know what to
discuss in #510 #510. Moving
the discussion to #23 #23 could
work, but it doesn't seem to be much better than just discussing here.

—
Reply to this email directly or view it on GitHub
#509 (comment).

@zhangkun83
zhangkun83 merged commit 2ee4d02 into grpc:master Jun 5, 2015
@zhangkun83
zhangkun83 deleted the rename_clientfoo branch June 5, 2015 21:41
@lock lock Bot locked as resolved and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants