You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "carryxyh (GitHub)" <gi...@apache.org> on 2018/11/09 08:38:05 UTC

[GitHub] [incubator-dubbo] carryxyh opened issue #2769: About setting the connections to the method part.

There are currently two problems. The first question, is the setting of connections on the method valid?

The second question, is it necessary to set the connections property on the method?


After testing, the connections property on the method does not take effect. There is no impact on the number of connections.

Should we disable the connections property on the method? I think it should be disabled.

Currently an invoker is targeting a service instead of a method. It is not appropriate for us to set connections to the method.

If we can set connections to the method and take effect, how do we weigh the relationship between the service's connections and the methods' connections?

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2769 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] carryxyh commented on issue #2769: About setting the connections to the method part.

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
@khanimteyaz 
Sorry about that. I didn't notice your comment.
Now, we can config like this:
```
<dubbo:reference id="demoService" check="false" interface="org.apache.dubbo.demo.DemoService">
        <dubbo:method name="sayHello" connections="10"/>
    </dubbo:reference>
```

But in my debug, the connections config will not effect.
In my opinion, this setting is meaningless. Because the meaning of connections is to set the number of tcp channels, and for dubbo, an invoker corresponds to a service. We can only control the number of tcp links managed by an invoker, not the method.

At present, we also need to solicit opinions from many people. If we can agree, I think we need to modify the xbd file of dubbo, and the connections are not allowed on the method config..

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2769 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] beiwei30 commented on issue #2769: About setting the connections to the method part.

Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
so the follow up question is, should we throw exception if user configures it?

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2769 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] beiwei30 closed issue #2769: About setting the connections to the method part.

Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
[ issue closed by beiwei30 ]

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2769 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] khanimteyaz commented on issue #2769: About setting the connections to the method part.

Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
@carryxyh thanks for caring and explaining it. Based on the input provided by you, I am with you to have it on the service level, instead of method level. 
One more question, is this applicable to client-side or provider side or both?

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2769 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] carryxyh commented on issue #2769: About setting the connections to the method part.

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
对于method上的connections有两个问题。
1. 设置method上的connections目前是否生效?
2. 我们有没有必要允许用户设置这个属性?

第一个问题,目前简单测试并且check了一下代码,发现method上的connections是不生效的。
第二个问题,我认为应该禁止method上设置connections。

目前一个dubbo invoker针对的是一个service。对于method上设置connections不太恰当。connections是针对一个invoker而言的。
另外如果我们允许设置connections,那么我们如何权衡method的connections和service的connections之间的关系也是个问题,method覆盖service还是service覆盖method感觉都不是很合适。

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2769 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] khanimteyaz commented on issue #2769: About setting the connections to the method part.

Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
@carryxyh,
    Would be possible to guide me on some documentation or code related to this topic. Actually wanted to understand this part so that it could become easy for me to follow you on this topic. 

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2769 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] carryxyh commented on issue #2769: About setting the connections to the method part.

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
In xml, we can disable setting connections by modifying the dubbo.xsd file.

Is it a good way to throw an exception when using the Config class? Personally feel that this way is not a big problem, maybe we can add an expired annotation to MethodConfig's setConnections?

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2769 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] beiwei30 commented on issue #2769: About setting the connections to the method part.

Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
@carryxyh 

I am agree with you. It doesn't make sense to specify connection on method level, even though it is do-able.

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2769 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org