Commit 28d3472
committed
STDIN
1 feat(generic): add generic call sample for both Dubbo and Triple protocols
2
3 This PR refactors and enhances the generic call sample to demonstrate
4 both Dubbo protocol and Triple protocol generic calls between Go and Java.
5
6 ## Changes Overview
7
8 ### 1. Dual Protocol Support
9 | Protocol | Port | Group | Description |
10 |----------|-------|----------|----------------------------------|
11 | Dubbo | 20000 | `dubbo` | Traditional Dubbo binary protocol|
12 | Triple | 50052 | `triple` | HTTP/2 based Triple protocol |
13
14 ### 2. Direct Connection Mode
15 - Removed ZooKeeper dependency in favor of direct URL connection
16 - Simplifies local testing and CI/CD pipelines
17 - No external dependencies required to run the sample
18
19 ### 3. Project Structure Simplification
20 - Removed redundant nested directories (java-server/java-server → java-server)
21 - Added run.sh scripts for easy execution
22
23 ### 4. Comprehensive Test Suite
24 Added client_test.go with test cases covering:
25 - Dubbo Protocol Tests (6 cases)
26 - Triple Protocol Tests (13 cases)
27 - Benchmarks for both protocols
28
29 ### 5. Code Improvements
30 - Go server uses direct connection mode (no registry)
31 - user_provider.go Invoke method returns proper error for unknown methods
32 - Fixed QueryUsers parameter type to match Java array signature
33
34 ## Dependencies
35 This PR depends on apache/dubbo-go#3154 which adds `NewGenericService` API.
36 CI will pass after that PR is merged to main branch.
37
38 Signed-off-by: TsukiKage <chongyanx@163.com>1 parent a6246b2 commit 28d3472
File tree
5 files changed
+13
-8
lines changed- generic
- go-client/cmd
- go-server/cmd
5 files changed
+13
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
| |||
173 | 172 | | |
174 | 173 | | |
175 | 174 | | |
176 | | - | |
| 175 | + | |
177 | 176 | | |
178 | 177 | | |
179 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
| 835 | + | |
| 836 | + | |
835 | 837 | | |
836 | 838 | | |
837 | 839 | | |
| |||
1384 | 1386 | | |
1385 | 1387 | | |
1386 | 1388 | | |
1387 | | - | |
1388 | | - | |
1389 | 1389 | | |
1390 | 1390 | | |
1391 | 1391 | | |
| |||
0 commit comments