You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "wangweiufofly (GitHub)" <gi...@apache.org> on 2018/12/18 02:29:40 UTC

[GitHub] [incubator-dubbo] wangweiufofly opened issue #2988: [Dubbo - telnet] Unrecognized the other provider

- [x] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this repository and believe that this is not a duplicate.
- [x] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.

## Environment
- Dubbo version: 2.7.0+
- Operating System version: mac
- Java version: 1.8
## Steps to reproduce this issue
Assume that there is an interface below:
``` java
package org.apache.dubbo.demo;
public interface DemoService {
    String sayHello(String name);
}

package org.apache.dubbo.demo.provider;
import org.apache.dubbo.demo.DemoService;
public class DemoAService implements DemoService {
    @Override
    public String sayHello(String name) {
        return "Hello " + name + ", response from provider: " + this.getClass().getSimpleName();
    }
}

package org.apache.dubbo.demo.provider;
import org.apache.dubbo.demo.DemoService;
public class DemoBService implements DemoService {
    @Override
    public String sayHello(String name) {
        return "Hello " + name + ", response from provider: " + this.getClass().getSimpleName();
    }
}
```
dubbo-demo-provider.xml:
```
    <!-- service implementation, as same as regular local bean -->
    <bean id="demoAService" class="org.apache.dubbo.demo.provider.DemoAService"/>

    <!-- declare the service interface to be exported -->
    <dubbo:service interface="org.apache.dubbo.demo.DemoService" ref="demoAService" group="demoA"/>

    <!-- service implementation, as same as regular local bean -->
    <bean id="demoBService" class="org.apache.dubbo.demo.provider.DemoBService"/>

    <!-- declare the service interface to be exported -->
    <dubbo:service interface="org.apache.dubbo.demo.DemoService" ref="demoBService" group="demoB"/>
```
## Start telnet call service:
``` shell
incubator-dubbo yeling$ telnet localhost 20880
dubbo>ls
org.apache.dubbo.demo.DemoService
org.apache.dubbo.demo.DemoService
dubbo>invoke org.apache.dubbo.demo.DemoService.sayHello("china") 
"Hello china, response from provider: DemoAService"
```
- Always only call the provider DemoAService,There's no way I can invoke to DemoBService.


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

[GitHub] [incubator-dubbo] beiwei30 commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
@jasonjoo2010 I will give it a try.

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


[GitHub] [incubator-dubbo] beiwei30 closed issue #2988: [Dubbo - telnet] Unrecognized the other provider

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

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


[GitHub] [incubator-dubbo] carryxyh commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
Personally think we should separate them.
:)

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


[GitHub] [incubator-dubbo] carryxyh commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
@jasonjoo2010 
Maybe we can discuss on mailing list. Would u pls reply the mail for some ideas?

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


[GitHub] [incubator-dubbo] jasonjoo2010 commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "jasonjoo2010 (GitHub)" <gi...@apache.org>.
> Emm.. Not a good way.
> Round Robin is to load balancing. In dubbo invoke, we need precise control. This is two cases.

So..... We will expose them as the implemented class name? Or just these multiple implemented interfaces?

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


[GitHub] [incubator-dubbo] jasonjoo2010 commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "jasonjoo2010 (GitHub)" <gi...@apache.org>.
Oh, I see, haha

So shall we merge the same interface or separate them?

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


[GitHub] [incubator-dubbo] carryxyh commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
@wangweiufofly 
Seems like we haven't supported this.


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


[GitHub] [incubator-dubbo] carryxyh commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
@wangchangbing 
Seems like we haven't supported this.


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


[GitHub] [incubator-dubbo] wangweiufofly commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "wangweiufofly (GitHub)" <gi...@apache.org>.
Can we differentiate multiple implementations of interfaces when LS commands, add group information, and facilitate the next invoke operation?

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


[GitHub] [incubator-dubbo] jasonjoo2010 commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "jasonjoo2010 (GitHub)" <gi...@apache.org>.
> A questions ::
> 
> * As adding group here, indicate multiple implementation support of a service which is exposed. How the consumer will discover which one to use?
>   
>   1. Is consumer developer will know about groups at the time of  writing it? Or some one else by understanding implementation details and available groups can choose which one to use?
> 
> Few improvements which I am guessing can be possible (Correct me If I am wrong here)
> 
> 1. Is there will be a default group support for any exposed service (e.g. in sprint boot there could be multiple implementation of a data source but there will be a default **primary** bean always.
> 2. If a implementation of service (e.g. group B) is unavailable should we provide support that consumer call can be still served by default group (or configured group D ), this can be use full when a particular group is in upgradation phase or out of service).
> 
> Any correction of my thought will be appreciated.Thanks in advanced.

Here what we talked about is only Telnet handler and will not effect normal RPC requests

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


[GitHub] [incubator-dubbo] jasonjoo2010 commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "jasonjoo2010 (GitHub)" <gi...@apache.org>.
> > > A questions ::
> > > 
> > > * As adding group here, indicate multiple implementation support of a service which is exposed. How the consumer will discover which one to use?
> > >   
> > >   1. Is consumer developer will know about groups at the time of  writing it? Or some one else by understanding implementation details and available groups can choose which one to use?
> > > 
> > > Few improvements which I am guessing can be possible (Correct me If I am wrong here)
> > > 
> > > 1. Is there will be a default group support for any exposed service (e.g. in sprint boot there could be multiple implementation of a data source but there will be a default **primary** bean always.
> > > 2. If a implementation of service (e.g. group B) is unavailable should we provide support that consumer call can be still served by default group (or configured group D ), this can be use full when a particular group is in upgradation phase or out of service).
> > > 
> > > Any correction of my thought will be appreciated.Thanks in advanced.
> > 
> > 
> > Here what we talked about is only Telnet handler and will not effect normal RPC requests
> 
> @jasonjoo2010 thanks for your reply and correcting me.

:)

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


[GitHub] [incubator-dubbo] jasonjoo2010 commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "jasonjoo2010 (GitHub)" <gi...@apache.org>.
Where is DemoAService?

Is there some mistakes in code displayed?

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


[GitHub] [incubator-dubbo] LiZhenNet commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "LiZhenNet (GitHub)" <gi...@apache.org>.
> dubbo>ls
> demoA:org.apache.dubbo.demo.DemoService:1.0.0
> demoB:org.apache.dubbo.demo.DemoService:1.0.0
> 

How about this.

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


[GitHub] [incubator-dubbo] wangweiufofly commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "wangweiufofly (GitHub)" <gi...@apache.org>.
Can we differentiate multiple implementations of interfaces when 'ls' commands, add group information, and facilitate the next invoke operation?
just like this:
```
dubbo>ls
org.apache.dubbo.demo.DemoService$demoA
org.apache.dubbo.demo.DemoService$demoB
dubbo>invoke org.apache.dubbo.demo.DemoService$demoB.sayHello("china")
"Hello china, response from provider: DemoBService"
```

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


[GitHub] [incubator-dubbo] wangweiufofly commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "wangweiufofly (GitHub)" <gi...@apache.org>.
Can we differentiate multiple implementations of interfaces when 'ls' commands, add group information, and facilitate the next invoke operation?

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


[GitHub] [incubator-dubbo] wangweiufofly commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "wangweiufofly (GitHub)" <gi...@apache.org>.
> @jasonjoo2010 I will give it a try.

thanks

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


[GitHub] [incubator-dubbo] carryxyh commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
Emm..  Not a good way.
Round Robin is to load balancing. In dubbo invoke, we need precise control. This is two cases.

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


[GitHub] [incubator-dubbo] jasonjoo2010 commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "jasonjoo2010 (GitHub)" <gi...@apache.org>.
> @wangchangbing
> Seems like we haven't supported this.

Or we just implement a Round Robin like selecting by merging them together?
It looks more simple

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


[GitHub] [incubator-dubbo] khanimteyaz commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
> > A questions ::
> > 
> > * As adding group here, indicate multiple implementation support of a service which is exposed. How the consumer will discover which one to use?
> >   
> >   1. Is consumer developer will know about groups at the time of  writing it? Or some one else by understanding implementation details and available groups can choose which one to use?
> > 
> > Few improvements which I am guessing can be possible (Correct me If I am wrong here)
> > 
> > 1. Is there will be a default group support for any exposed service (e.g. in sprint boot there could be multiple implementation of a data source but there will be a default **primary** bean always.
> > 2. If a implementation of service (e.g. group B) is unavailable should we provide support that consumer call can be still served by default group (or configured group D ), this can be use full when a particular group is in upgradation phase or out of service).
> > 
> > Any correction of my thought will be appreciated.Thanks in advanced.
> 
> Here what we talked about is only Telnet handler and will not effect normal RPC requests

@jasonjoo2010 thanks for your reply and correcting me.

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


[GitHub] [incubator-dubbo] khanimteyaz commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
 A questions ::
- As adding group here, indicate multiple implementation support of a service which is exposed. How the consumer will discover which one to use? 
    1. Is consumer developer will know about groups at the time of  writing it? Or some one else by understanding implementation details and available groups can choose which one to use?

Few improvements which I am guessing can be possible (Correct me If I am wrong here)
   1. Is there will be a default group support for any exposed service (e.g. in sprint boot there could be multiple implementation of a data source but there will be a default **primary** bean always.
  2.  If a implementation of service (e.g. group B) is unavailable should we provide support that consumer call can be still served by default group (or configured group D ), this can be use full when a particular group is in upgradation phase or out of service).

Any correction of my thought will be appreciated.Thanks in advanced.



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


[GitHub] [incubator-dubbo] jasonjoo2010 commented on issue #2988: [Dubbo - telnet] Unrecognized the other provider

Posted by "jasonjoo2010 (GitHub)" <gi...@apache.org>.
> > dubbo>ls
> > demoA:org.apache.dubbo.demo.DemoService:1.0.0
> > demoB:org.apache.dubbo.demo.DemoService:1.0.0
> 
> How about this.

I think we should keep backwards compatibility.

So if no multiple implementation it should not change the gramma or formats.
Maybe it would changed when meet multiple implementation, eg:

```shell
dubbo>ls
org.apache.dubbo.demo.FirstService
org.apache.dubbo.demo.SecondService
org.apache.dubbo.demo.SecondServiceImplA
org.apache.dubbo.demo.SecondServiceImplB
```

Surely there is no extra info including version, group and etc. only work for multiple implementation.

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