-
Notifications
You must be signed in to change notification settings - Fork 175
feat(benchmark): unify IDL definitions and modernize to dubbo-go v3 A… #856
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
base: develop
Are you sure you want to change the base?
feat(benchmark): unify IDL definitions and modernize to dubbo-go v3 A… #856
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool work!
- I notice in
tools/benchmark/protocol/triple/the server side have deletedubbogo.ymland use new api instead, why client side still remains adubbogo.yml? - update the performance part in the readme of
tools/benchmark - what about update go version to 1.25 in
go.mod? - why dubbo and grpc have 4 interfaces and triple only have 2?
- what about add a dubbo-driect so that we can compare it convientily
|
pls don't forget import-format before commit |
7a5b9df to
dde725f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #856 +/- ##
===========================================
+ Coverage 19.69% 19.71% +0.01%
===========================================
Files 255 255
Lines 18360 18360
===========================================
+ Hits 3616 3619 +3
+ Misses 14377 14375 -2
+ Partials 367 366 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Alanxtl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
excellent work, lgtm
|
@Similarityoung @nanjiek check this |
Alanxtl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- what's the difference between the proto file in
tools/benchmark/api/grpcstub/benchmark.protoand the proto file intools/benchmark/api/benchmark.protocan't we use the same proto file? - why dubbo direct has 6 interfaces? why not delete
GetUser2andGetErr?
|
Wouldn't it be better if the contents of tools/benchmark/protocol/triple/pb could be put into tools/benchmark/protocol/triple, after all, the proto file is in a separate folder |
dde725f to
9480d0a
Compare
Good suggestion! I've moved go-server and pixiu from protocol/triple/pb/ to protocol/triple/ |
- Consolidate scattered proto definitions into unified api/ directory - Create shared benchmark.proto with User service definitions - Add separate grpcstub/ for gRPC-specific generated code - Migrate triple server/client to dubbo-go v3 programmatic API - Remove legacy dubbogo.yml configuration files - Update README with markdown tables and performance comparison - Upgrade Go version to 1.25.0 - Add GetUsers and GetUserByName tests for triple protocol - Fix import formatting across test files
9480d0a to
16bd3c4
Compare
|
Thanks for the suggestions!
|
|
please fix the ci failure. |



What this PR does
This PR unifies the IDL definitions and modernizes the API in
tools/benchmarkmodule.Closes #835
Background
The benchmark module previously had three separate IDL definitions:
api/samples_api.proto- for Triple protocol withGreeterserviceprotocol/grpc/proto/hello_grpc.proto- for gRPC protocol withUserProviderserviceThis inconsistency made it difficult to compare performance across protocols fairly.
Changes
Unified IDL Definition
Created a single
benchmark.protodefiningBenchmarkServicewith consistent message types:Protocol-Specific Stubs
api/usingprotoc-gen-go-triple/v3(new programmatic API)api/grpcstub/using standardprotoc-gen-go-grpcServer Implementations Updated
grpcstub.BenchmarkServiceServerwith standardgoogle.golang.org/grpcserver.NewServer()+RegisterBenchmarkServiceHandler())UserProviderwith simplified structureTriple Protocol Modernization
Migrated from config-based API to new dubbo-go v3 programmatic API:
Server (before):
Server (after):
Client (before):
Client (after):
Dependencies
google.golang.org/grpcto v1.78.0dubbo.apache.org/dubbo-go/v3to v3.3.1Removed Files
api/samples_api.protoand generated filesprotocol/grpc/proto/hello_grpc.protoand generated filesBenchmark Results
Test environment: macOS, Apple Silicon, N=500 samples per method
gRPC Protocol (Direct)
gRPC via Pixiu
Triple Protocol (Direct)
Triple via Pixiu
Dubbo via Pixiu
Summary
Pixiu proxy adds approximately 0.3-1.1ms overhead compared to direct protocol calls. Performance comparison (median latency):
How to verify
Checklist
make import-formatgenerate.shfor code generation