-
Notifications
You must be signed in to change notification settings - Fork 69
Initial gRPC implementation and samples #35
Conversation
/** | ||
* The gRPC server port. | ||
*/ | ||
private int port=10382; |
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.
Apparently gRPC has no default port. This one is 'gR' decoded.
>>> "%d%d"%(ord('g'),ord('R'))
'10382'
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.
Still need to actually run this, but here is a first review pass
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
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.
Missing newline
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.
I have newline in my local. I'm not sure what's going on.
} | ||
|
||
/* | ||
* TODO: Reply can be Empty for sink behavior. Maybe move this can be a separate RPC. |
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.
The "Maybe move..." sentence does not make sense
|
||
service StringFunction { | ||
rpc Call(fntypes.Request) returns (fntypes.Reply) {} | ||
} |
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.
Newline
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.
I'm not able to fix this for some reason
public class GrpcIntegrationTests { | ||
@Autowired Dispatcher dispatcher; | ||
|
||
@Ignore |
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.
Hmm, this doesn't test much, does it ? :)
public void start() throws IOException { | ||
server.start(); | ||
|
||
Runtime.getRuntime().addShutdownHook(new Thread() { |
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 feels a bit dirty. Can't cleanup be managed at the test level, rather than the whole JVM's?
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.
Not sure. I took this from sample code on the gRPC developers guide
samples/grpc/.gitignore
Outdated
@@ -0,0 +1,2 @@ | |||
proto/ | |||
proto/ |
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.
Double entry
I think there is something phony going on with the doubly nested
Wondering if the level 2 inner class should not bear |
|
||
=== Build the gRPC sample image | ||
``` | ||
samples/grpc/dockerize |
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.
I'd centralize the (non-maven) dockerizations in the dockerize script at the root of the project
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.
So far the main dockerize
script is for required components. This one is only required for the grpc sample.
function-proto/pom.xml
Outdated
<properties> | ||
<java.version>1.8</java.version> | ||
<protobuf.version>3.3.0</protobuf.version> | ||
<grpc.version>1.4.0</grpc.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.
function-proto/pom.xml
Outdated
<artifactId>protobuf-maven-plugin</artifactId> | ||
<version>${protobuf.plugin.version}</version> | ||
<configuration> | ||
<protocArtifact>com.google.protobuf:protoc:3.3.0:exe:${os.detected.classifier}</protocArtifact> |
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.
Version numbers in here should use properties defined above
Closing - will create a new PR to merge with master |
Resolves #32