Skip to content

Commit

Permalink
support triple, reform the code.(sofastack#906)
Browse files Browse the repository at this point in the history
support triple, reform the code
  • Loading branch information
leizhiyuan authored Apr 29, 2020
1 parent 4fd20b8 commit c507b32
Show file tree
Hide file tree
Showing 587 changed files with 5,119 additions and 2,253 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ bin

# log
logs/
*.log
*.log

#protobuf
example/build/*
test/test-integration/build/*
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ install:
- sh ./tools/check_format.sh

script:
- travis_retry ./mvnw clean package -Pci-test
- travis_retry ./mvnw package -Pci-test

after_success:
- bash <(curl -s https://codecov.io/bash)
44 changes: 36 additions & 8 deletions all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-all</artifactId>
<version>5.6.6-SNAPSHOT</version>
<version>5.7.0-SNAPSHOT</version>

<name>${project.groupId}:${project.artifactId}</name>
<url>http://github.com/sofastack/sofa-rpc</url>
Expand Down Expand Up @@ -68,6 +68,8 @@
<bolt.swagger.version>1.5.18</bolt.swagger.version>
<httpclient.version>4.5.11</httpclient.version>
<httpcore.version>4.4.13</httpcore.version>
<grpc.version>1.27.2</grpc.version>
<guava.version>27.0-jre</guava.version>
</properties>

<dependencies>
Expand All @@ -94,7 +96,7 @@
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-codec</artifactId>
<artifactId>sofa-rpc-codec-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand All @@ -120,12 +122,12 @@

<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-extension-common</artifactId>
<artifactId>sofa-rpc-api-compatible</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-api-compatible</artifactId>
<artifactId>sofa-rpc-bootstrap-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -245,7 +247,7 @@
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-remoting-grpc</artifactId>
<artifactId>sofa-rpc-remoting-triple</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand All @@ -258,6 +260,11 @@
<artifactId>sofa-rpc-tracer-opentracing-resteasy</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-tracer-opentracing-triple</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-metrics-lookout</artifactId>
Expand Down Expand Up @@ -369,6 +376,26 @@
<artifactId>httpmime</artifactId>
<version>${httpclient.version}</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
<version>${grpc.version}</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>${grpc.version}</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<version>${grpc.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>

</dependencies>

Expand Down Expand Up @@ -442,13 +469,13 @@
<include>com.alipay.sofa:sofa-rpc-api</include>
<include>com.alipay.sofa:sofa-rpc-exception</include>
<include>com.alipay.sofa:sofa-rpc-client</include>
<include>com.alipay.sofa:sofa-rpc-codec</include>
<include>com.alipay.sofa:sofa-rpc-codec-api</include>
<include>com.alipay.sofa:sofa-rpc-filter</include>
<include>com.alipay.sofa:sofa-rpc-log</include>
<include>com.alipay.sofa:sofa-rpc-proxy</include>
<include>com.alipay.sofa:sofa-rpc-transport</include>
<include>com.alipay.sofa:sofa-rpc-extension-common</include>
<include>com.alipay.sofa:sofa-rpc-api-compatible</include>
<include>com.alipay.sofa:sofa-rpc-bootstrap-api</include>
<include>com.alipay.sofa:sofa-rpc-bootstrap-bolt</include>
<include>com.alipay.sofa:sofa-rpc-bootstrap-dubbo</include>
<include>com.alipay.sofa:sofa-rpc-bootstrap-grpc</include>
Expand All @@ -474,9 +501,10 @@
<include>com.alipay.sofa:sofa-rpc-remoting-bolt</include>
<include>com.alipay.sofa:sofa-rpc-remoting-http</include>
<include>com.alipay.sofa:sofa-rpc-remoting-resteasy</include>
<include>com.alipay.sofa:sofa-rpc-remoting-grpc</include>
<include>com.alipay.sofa:sofa-rpc-remoting-triple</include>
<include>com.alipay.sofa:sofa-rpc-tracer-opentracing</include>
<include>com.alipay.sofa:sofa-rpc-tracer-opentracing-resteasy</include>
<include>com.alipay.sofa:sofa-rpc-tracer-opentracing-triple</include>
<include>com.alipay.sofa:sofa-rpc-config-apollo</include>
<include>com.alipay.sofa:sofa-rpc-doc-swagger</include>
<!-- TODO -->
Expand Down
23 changes: 21 additions & 2 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<packaging>pom</packaging>

<properties>
<revision>5.6.6-SNAPSHOT</revision>
<revision>5.7.0-SNAPSHOT</revision>
<javassist.version>3.20.0-GA</javassist.version>
<bytebuddy.version>1.9.8</bytebuddy.version>
<netty.version>4.1.44.Final</netty.version>
Expand All @@ -27,6 +27,7 @@
<sofa.registry.version>5.2.0</sofa.registry.version>
<swagger.version>1.5.18</swagger.version>
<asm.version>7.0</asm.version>
<guava.version>27.0-jre</guava.version>
<!-- serialization -->
<hessian.version>3.3.7</hessian.version>
<thrift.version>0.9.2</thrift.version>
Expand All @@ -35,6 +36,7 @@
<jackson.databind.version>2.9.10.3</jackson.databind.version>
<msgpack.version>0.6.12</msgpack.version>
<protostuff.version>1.5.9</protostuff.version>
<grpc.version>1.27.2</grpc.version>

<!--common-->
<httpcore.version>4.4.13</httpcore.version>
Expand Down Expand Up @@ -354,7 +356,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>20.0</version>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.ecwid.consul</groupId>
Expand Down Expand Up @@ -458,6 +460,23 @@
<version>1.3.5</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
<version>${grpc.version}</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>${grpc.version}</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<version>${grpc.version}</version>
</dependency>

<!-- Test libs -->
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@

<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-extension-impl</artifactId>
<artifactId>sofa-rpc-bootstrap</artifactId>
<version>${revision}</version>
</parent>

<artifactId>sofa-rpc-extension-common</artifactId>
<artifactId>sofa-rpc-bootstrap-api</artifactId>

<dependencies>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-log-common-tools</artifactId>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-common</artifactId>
Expand All @@ -32,7 +36,7 @@
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-codec</artifactId>
<artifactId>sofa-rpc-codec-api</artifactId>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ private void doExport() {
try {
// 构造请求调用器
providerProxyInvoker = new ProviderProxyInvoker(providerConfig);

preProcessProviderTarget(providerConfig, (ProviderProxyInvoker) providerProxyInvoker);
// 初始化注册中心
if (providerConfig.isRegister()) {
List<RegistryConfig> registryConfigs = providerConfig.getRegistry();
Expand Down Expand Up @@ -477,4 +479,12 @@ private boolean inMethodConfigs(String methodConfigs, String methodName) {
}
return false;
}

/**
* make other provider bootstrap can do extra work
* @param providerConfig
*/
protected void preProcessProviderTarget(ProviderConfig providerConfig, ProviderProxyInvoker providerProxyInvoker) {
return;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-extension-impl</artifactId>
<artifactId>sofa-rpc-bootstrap</artifactId>
<version>${revision}</version>
</parent>

Expand All @@ -19,8 +19,7 @@
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-extension-common</artifactId>
<version>${project.parent.version}</version>
<artifactId>sofa-rpc-bootstrap-api</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>sofa-rpc-extension-impl</artifactId>
<artifactId>sofa-rpc-bootstrap</artifactId>
<groupId>com.alipay.sofa</groupId>
<version>${revision}</version>
</parent>
Expand All @@ -16,8 +16,7 @@

<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-extension-common</artifactId>
<version>${project.parent.version}</version>
<artifactId>sofa-rpc-bootstrap-api</artifactId>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-extension-impl</artifactId>
<artifactId>sofa-rpc-bootstrap</artifactId>
<version>${revision}</version>
</parent>

Expand All @@ -19,8 +19,7 @@
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-extension-common</artifactId>
<version>${project.parent.version}</version>
<artifactId>sofa-rpc-bootstrap-api</artifactId>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>sofa-rpc-extension-impl</artifactId>
<artifactId>sofa-rpc-bootstrap</artifactId>
<groupId>com.alipay.sofa</groupId>
<version>${revision}</version>
</parent>
Expand All @@ -19,8 +19,7 @@
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-extension-common</artifactId>
<version>${project.parent.version}</version>
<artifactId>sofa-rpc-bootstrap-api</artifactId>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>sofa-rpc-extension-impl</artifactId>
<artifactId>sofa-rpc-bootstrap</artifactId>
<groupId>com.alipay.sofa</groupId>
<version>${revision}</version>
</parent>
Expand All @@ -15,8 +15,7 @@
<dependencies>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-extension-common</artifactId>
<version>${project.parent.version}</version>
<artifactId>sofa-rpc-bootstrap-api</artifactId>
</dependency>

<dependency>
Expand Down Expand Up @@ -64,17 +63,17 @@
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
<version>1.17.0</version>
<version>1.27.2</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>1.17.0</version>
<version>1.27.2</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<version>1.17.0</version>
<version>1.27.2</version>
</dependency>

</dependencies>
Expand Down
Loading

0 comments on commit c507b32

Please sign in to comment.