Triple is an application layer's protocol based on HTTP/2, which supports interoperating with GRPC protocol naturally using Protobuf serialization. For non-protobuf applications, triple provides a compatible mode to upgrade without code modifications. So it is smooth to migrate to triple.
This sample project contains most scenarios of Dubbo and non-Dubbo interoperation.
org.apache.dubbo.sample.tri.ApiProvider
and org.apache.dubbo.sample.tri.ApiConsumer
mvn clean install
to generate protobuf classes.org.apache.dubbo.sample.tri.ApiProvider
org.apache.dubbo.sample.tri.ApiConsumer
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.
Code under test
folder is a general interoperation test suite for both Dubbo/Dubbo and Dubbo/GRPC.
org.apache.dubbo.sample.tri.TriGrpcProvider
org.apache.dubbo.sample.tri.TriPbConsumerTest
, org.apache.dubbo.sample.tri.TriWrapConsumerTest
and org.apache.dubbo.sample.tri.TriGenericTest
org.apache.dubbo.sample.tri.TriGrpcProvider
org.apache.dubbo.sample.tri.grpc.GrpcConsumerTest
org.apache.dubbo.sample.tri.grpc.GrpcProvider
org.apache.dubbo.sample.tri.TriPbConsumerTest