Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge branch 'apache:master' into add-dubbo-samples-migration
- Loading branch information
Showing
58 changed files
with
3,193 additions
and
130 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## Triple-Samples | ||
|
||
### For beginners | ||
|
||
1. Start a zookeeper or config other registry in `org.apache.dubbo.sample.tri.ApiProvider` | ||
and `org.apache.dubbo.sample.tri.ApiConsumer` | ||
2. Build with `mvn clean install` to generate protobuf classes. | ||
3. Run `org.apache.dubbo.sample.tri.ApiProvider` | ||
4. Run `org.apache.dubbo.sample.tri.ApiConsumer` | ||
|
||
### For dubbo2 or non-prototbuf users | ||
Run `org.apache.dubbo.sample.tri.ApiWrapperProvider` and `org.apache.dubbo.sample.tri.ApiWrapperConsumer`. | ||
|
||
Dubbo3 will wrap request and response with a protobuf wrapper automatically, so it is still compatible with GRPC. | ||
|
||
### For Dubbo developers | ||
Code under `test` folder is a general interoperation test suite for both Dubbo/Dubbo and Dubbo/GRPC. | ||
|
||
#### Dubbo/Dubbo test | ||
1. Run `org.apache.dubbo.sample.tri.TriGrpcProvider` | ||
2. Run `org.apache.dubbo.sample.tri.TriPbConsumerTest` , `org.apache.dubbo.sample.tri.TriWrapConsumerTest` and `org.apache.dubbo.sample.tri.TriGenericTest` | ||
|
||
#### DUbbo/GRPC test | ||
|
||
##### GRPC --> Dubbo | ||
|
||
1. Run `org.apache.dubbo.sample.tri.TriGrpcProvider` | ||
2. Run `org.apache.dubbo.sample.tri.grpc.GrpcConsumerTest` | ||
|
||
##### Dubbo --> GRPC | ||
|
||
1. Run `org.apache.dubbo.sample.tri.grpc.GrpcProvider` | ||
2. Run `org.apache.dubbo.sample.tri.TriPbConsumerTest` | ||
|
||
|
||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
services: | ||
dubbo-samples-triple: | ||
type: app | ||
basedir: . | ||
mainClass: org.apache.dubbo.sample.tri.TriGrpcProvider | ||
|
||
dubbo-samples-triple-test: | ||
type: test | ||
basedir: . | ||
tests: | ||
# tri-->tri | ||
- "org.apache.dubbo.sample.tri/TriPbConsumerTest.class" | ||
- "org.apache.dubbo.sample.tri/TriWrapConsumerTest.class" | ||
- "org.apache.dubbo.sample.tri/TriGenericTest.class" | ||
# grpc-->tri | ||
- "org.apache.dubbo.sample.tri/grpc/Grpc*Test.class" | ||
# tri-->grpc | ||
# fixme Failure is always present (https://github.com/apache/dubbo/issues/8738) | ||
#- "org.apache.dubbo.sample.tri.grpc/TriGrpcDirectPbConsumerTest.class" | ||
systemProps: | ||
- zookeeper.host=dubbo-samples-triple | ||
- zookeeper.port=2181 | ||
- provider.host=dubbo-samples-triple | ||
- provider.port=50052 | ||
- grpc.provider.port=50053 | ||
waitPortsBeforeRun: | ||
- dubbo-samples-triple:2181 | ||
- dubbo-samples-triple:50052 | ||
depends_on: | ||
- dubbo-samples-triple | ||
|
||
|
||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
# Supported component versions of the test case | ||
|
||
# Spring app | ||
dubbo.version=3.* | ||
spring.version=4.*, 5.* |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Oops, something went wrong.