Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dobbu util support for async callable feature. #3113

Closed
2 tasks
khanimteyaz opened this issue Jan 2, 2019 · 3 comments
Closed
2 tasks

Add dobbu util support for async callable feature. #3113

khanimteyaz opened this issue Jan 2, 2019 · 3 comments

Comments

@khanimteyaz
Copy link
Contributor

Come up with some design and implementation for dubbo util support. The purpose of this enhancement is to provide utility methods which can help dubbo user to use and achieve the better API experience without enforcing service implementation to provide those support while they write service.

e.g.
If consumer of service needs to make a Future type of call then instead of service implementation can add those as feature, using Dubbo provided utility they can transfer Rpc call to future callable using something like

RpcFuture future=DubboRpcUti.toFuture(someService.someMethod(msg),someNotifyMethod);

DubboRpcUril.call(someUserService.getUser(org)).process(businessLogicMethod).onException(UserNotAvailable.class,handleUserNotAvailable)

Above are not exhaustive list or final, but the idea is this is an place holder for coming up with some approach, design and implementation.

  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: xxx
  • Operating System version: xxx
  • Java version: xxx

Steps to reproduce this issue

  1. xxx
  2. xxx
  3. xxx

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps?

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!
@khanimteyaz
Copy link
Contributor Author

On it.

@chickenlj
Copy link
Contributor

Hi,
Here's few API targeting the same purpose for reference. It's a little out-dated and hard to use.

https://github.com/apache/incubator-dubbo/blob/460c3a17568ff31f994646558a48c2d0e7b37bd4/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcContext.java#L659

@khanimteyaz
Copy link
Contributor Author

Hi,
Here's few API targeting the same purpose for reference. It's a little out-dated and hard to use.

incubator-dubbo/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcContext.java

Line 659 in 460c3a1

public CompletableFuture asyncCall(Callable callable) {

Thanks for sharing this. As this week onward my works be less than last two week, hopefully will be able to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants