[Dubbo-1876] Enhancements for the new async way of Dubbo#1957
Merged
chickenlj merged 47 commits intoapache:masterfrom Jul 11, 2018
Merged
[Dubbo-1876] Enhancements for the new async way of Dubbo#1957chickenlj merged 47 commits intoapache:masterfrom
chickenlj merged 47 commits intoapache:masterfrom
Conversation
# Conflicts: # dubbo-rpc/dubbo-rpc-api/pom.xml
…develop-async-response
# Conflicts: # dubbo-cluster/src/main/java/com/alibaba/dubbo/rpc/cluster/support/ClusterUtils.java # dubbo-common/src/main/java/com/alibaba/dubbo/common/Constants.java # dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ReferenceConfig.java # dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/DemoService.java # dubbo-demo/dubbo-demo-consumer/src/main/java/com/alibaba/dubbo/demo/consumer/Consumer.java # dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/provider/DemoServiceImpl.java # dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/dubbo-demo-provider.xml # dubbo-registry/dubbo-registry-api/src/main/java/com/alibaba/dubbo/registry/integration/RegistryProtocol.java # dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/ExchangeHandler.java # dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/support/ExchangeHandlerAdapter.java # dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/support/ExchangeHandlerDispatcher.java # dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/support/header/HeaderExchangeChannel.java # dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/support/header/HeaderExchangeHandler.java # dubbo-remoting/dubbo-remoting-api/src/test/java/com/alibaba/dubbo/remoting/PerformanceServerTest.java # dubbo-remoting/dubbo-remoting-api/src/test/java/com/alibaba/dubbo/remoting/handler/HeaderExchangeHandlerTest.java # dubbo-remoting/dubbo-remoting-netty/src/test/java/com/alibaba/dubbo/remoting/exchange/support/header/HeartbeatHandlerTest.java # dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/Result.java # dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/RpcContext.java # dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/RpcResult.java # dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/filter/ConsumerContextFilter.java # dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/filter/ContextFilter.java # dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/filter/ExceptionFilter.java # dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/proxy/AbstractProxyFactory.java # dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/proxy/AbstractProxyInvoker.java # dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/proxy/InvokerInvocationHandler.java # dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/support/RpcUtils.java # dubbo-rpc/dubbo-rpc-dubbo/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DubboCodec.java # dubbo-rpc/dubbo-rpc-dubbo/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DubboInvoker.java # dubbo-rpc/dubbo-rpc-dubbo/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DubboProtocol.java # dubbo-rpc/dubbo-rpc-dubbo/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/FutureAdapter.java # dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftProtocol.java # dubbo-test/dubbo-test-benchmark/pom.xml # dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/AbstractBenchmarkServer.java
# Conflicts: # dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/AsyncContext.java # dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/AsyncContextImpl.java
Codecov Report
@@ Coverage Diff @@
## master #1957 +/- ##
============================================
+ Coverage 53.07% 53.07% +<.01%
- Complexity 4930 4956 +26
============================================
Files 557 559 +2
Lines 24802 24892 +90
Branches 4427 4431 +4
============================================
+ Hits 13164 13212 +48
- Misses 9618 9660 +42
Partials 2020 2020
Continue to review full report at Codecov.
|
# Conflicts: # dubbo-rpc/dubbo-rpc-api/src/test/java/org/apache/dubbo/rpc/support/DemoService.java # dubbo-rpc/dubbo-rpc-api/src/test/java/org/apache/dubbo/rpc/support/DemoServiceImpl.java
Contributor
|
Looks fantastic! This new async way of Dubbo is quite amazing! (It may be better to squash the commits into one commit) |
Contributor
Author
|
An article introducing the new async way was recorded here, written in Chinese. |
Contributor
Author
|
Thank @hengyunabc for help reviewing, he totally agrees with the new async way showed in the demo. |
# Conflicts: # dubbo-rpc/dubbo-rpc-thrift/src/main/java/org/apache/dubbo/rpc/protocol/thrift/ThriftProtocol.java
July-X
pushed a commit
to July-X/dubbo
that referenced
this pull request
Jul 12, 2018
* commit 'b055991b317f4e58d256721875a00c52fe415510': (271 commits) Merge pull request apache#1957, enhancements for the new async way of Dubbo. rename log file from alibaba to custom-access (apache#2057) Merge pull request apache#2049, upgrade netty4 to the latest release and make it the default option for transporter. Format style. Restore the badges in README. Polish README. Refactor README. Merge pull request apache#2047, deprecate dubbo-rpc-thrift. Merge pull request apache#2005, change maven parent from sonatype to apache. rename access log in unit test from 'alibaba' to 'alibaba.log' so that it cannot be committed by accident. (apache#2051) add test cases for injvm rpc protocol (apache#2041) add test cases for rpc thrift protocol (apache#2042) Merge pull request apache#1966, introduces dubbo metrics API module. [Dubbo- unit test class not found] fix class not found "hi" (apache#2034) add README for compatible module (apache#2019) Polish README. update README (apache#2025) [Dubbo-1695] Enhance the test coverage part-16 : dubbo-rpc/dubbo-rpc-api module (apache#2004) Merge pull request apache#1997, clienthandler in netty4 should trigger heartbeat handler. Update issue template description. ...
This was referenced Jul 31, 2018
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
Enhancements for the new async way of Dubbo introduced in #1876. Below is the main issues this PR trys to solve:
Brief changelog
Add AsyncRpcResult to represent result value of async invoke, equivalent to RpcResult for sync invoke.
Add PostProcessFilter to support postprocess of result in filter chain
Change AbstractProxyInvoker and DubboInvoker to support services with original Future signature, supplementary for generated Future service.
Verifying this change
Follow this checklist to help us incorporate your contribution quickly and easily:
[Dubbo-XXX] Fix UnknownException when host config not exist #XXX. Each commit in the pull request should have a meaningful subject line and body.mvn clean install -DskipTests&mvn clean test-compile failsafe:integration-testto make sure unit-test and integration-test pass.