-
Notifications
You must be signed in to change notification settings - Fork 640
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
[Issue #417] gRPC design doc and protobuf models #593
Closed
Closed
Changes from 29 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
ba67c5c
Merge pull request #1 from apache/develop
jinrongluo d638ec4
[Issue #337] Fix HttpSubscriber startup issue
5ebfb54
[Issue #337] test commit
jinrongluo a3afff3
[Issue #337] revert test commit
jinrongluo 50f959d
[Issue #337] Enhance Http Demo Subscriber by using ExecutorService, C…
jinrongluo 7adc322
Merge remote-tracking branch 'origin/develop' into develop
jinrongluo d48ead5
[Issue #337] Enhance Http Demo Subscriber by using ExecutorService, C…
jinrongluo c9021fe
[Issue #337] Address code review comment for Subscriber Demo App
jinrongluo c6d732e
Merge branch 'apache:develop' into develop
jinrongluo c613be8
Merge branch 'apache:develop' into develop
jinrongluo 66ac95e
Merge branch 'apache:develop' into develop
jinrongluo 9e636c0
Merge branch 'apache:develop' into develop
jinrongluo a0f44b0
Merge branch 'apache:develop' into develop
jinrongluo 37f5d7a
Merge branch 'apache:develop' into develop
jinrongluo 93e711c
Merge branch 'apache:develop' into develop
jinrongluo e75d67a
Merge branch 'apache:develop' into develop
jinrongluo 2fb485b
Merge branch 'apache:develop' into develop
jinrongluo 80ab9af
Merge branch 'apache:develop' into develop
jinrongluo 87d1747
Merge branch 'apache:develop' into develop
jinrongluo c9d3537
Merge branch 'apache:develop' into develop
jinrongluo c9e38f5
Merge branch 'apache:develop' into develop
jinrongluo 63728fc
Merge branch 'apache:develop' into develop
jinrongluo ad18b29
Merge branch 'apache:develop' into develop
jinrongluo 0c58188
Merge branch 'apache:develop' into develop
jinrongluo 0141006
Merge branch 'apache:develop' into develop
jinrongluo 98b32c6
add eventmesh gric protobuf
jinrongluo 99fe0b9
update eventmesh client protos and generated codes
jinrongluo 834a6f8
update grpc design docs
jinrongluo 733af59
[Issue# 417] adding license header
jinrongluo 87c5c2f
Merge branch 'apache:develop' into grpc-dev
jinrongluo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
48 changes: 48 additions & 0 deletions
48
eventmesh-connector-plugin/eventmesh-protocol-grpc/build.gradle
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,48 @@ | ||
plugins { | ||
id 'java' | ||
id 'com.google.protobuf' version '0.8.17' | ||
} | ||
|
||
group 'org.apache.eventmesh' | ||
version '1.3.0-SNAPSHOT' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
def grpcVersion = '1.15.0' // CURRENT_GRPC_VERSION | ||
def protobufVersion = '3.5.1' | ||
def reactiveGrpcVersion = '1.2.3' | ||
def protocVersion = protobufVersion | ||
|
||
dependencies { | ||
implementation "io.grpc:grpc-protobuf:${grpcVersion}" | ||
implementation "io.grpc:grpc-stub:${grpcVersion}" | ||
implementation "com.google.protobuf:protobuf-java-util:${protobufVersion}" | ||
implementation "io.reactivex.rxjava2:rxjava:2.2.21" | ||
jinrongluo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
implementation "com.salesforce.servicelibs:rxgrpc-stub:1.2.3" | ||
|
||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0' | ||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' | ||
} | ||
|
||
protobuf { | ||
protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" } | ||
plugins { | ||
grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" } | ||
rxgrpc { | ||
artifact = "com.salesforce.servicelibs:rxgrpc:${reactiveGrpcVersion}" | ||
} | ||
} | ||
generateProtoTasks { | ||
ofSourceSet("main")*.plugins { | ||
grpc { } | ||
rxgrpc {} | ||
} | ||
} | ||
} | ||
|
||
|
||
test { | ||
useJUnitPlatform() | ||
} |
40 changes: 40 additions & 0 deletions
40
eventmesh-connector-plugin/eventmesh-protocol-grpc/src/main/proto/addressbook.proto
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,40 @@ | ||
syntax = "proto3"; | ||
|
||
jinrongluo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
package tutorial; | ||
|
||
option java_multiple_files = true; | ||
option java_package = "com.example.tutorial.protos"; | ||
option java_outer_classname = "AddressBookProtos"; | ||
|
||
message Person { | ||
string name = 1; | ||
int32 id = 2; | ||
string email = 3; | ||
|
||
enum PhoneType { | ||
MOBILE = 0; | ||
HOME = 1; | ||
WORK = 2; | ||
} | ||
|
||
message PhoneNumber { | ||
string number = 1; | ||
PhoneType type = 2; | ||
} | ||
|
||
repeated PhoneNumber phones = 4; | ||
} | ||
|
||
message AddressBook { | ||
repeated Person people = 1; | ||
} | ||
|
||
message GetAddressBookRequest { | ||
string bookId = 1; | ||
} | ||
|
||
service AddressService { | ||
rpc addPerson(Person) returns (AddressBook); | ||
|
||
rpc getAddressBook(GetAddressBookRequest) returns (stream Person); | ||
} |
36 changes: 36 additions & 0 deletions
36
eventmesh-protocol-plugin/eventmesh-protocol-grpc/build.gradle
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,36 @@ | ||
plugins { | ||
id 'java' | ||
id 'com.google.protobuf' version '0.8.17' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
def grpcVersion = '1.15.0' // CURRENT_GRPC_VERSION | ||
def protobufVersion = '3.5.1' | ||
def protocVersion = protobufVersion | ||
|
||
dependencies { | ||
implementation "io.grpc:grpc-protobuf:${grpcVersion}" | ||
implementation "io.grpc:grpc-stub:${grpcVersion}" | ||
implementation "com.google.protobuf:protobuf-java-util:${protobufVersion}" | ||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0' | ||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' | ||
} | ||
|
||
protobuf { | ||
protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" } | ||
plugins { | ||
grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" } | ||
} | ||
generateProtoTasks { | ||
all()*.plugins { | ||
grpc {} | ||
} | ||
} | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
region, namespace, idc, rack and so on. these tenant or geographic info should be carefully designed in our v2 version.
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.
BTW, any guys want to add comment for every field in protocol?
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.
This is V1 version of protobuf and we are experimenting this grpc transport feature.
Please review and comment on this set of header attributes and improve it in V2. @qqeasonchen @ruanwenjun
Thanks.