-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: introduce handshake to client and gRPC server #36
Conversation
Java implementation of numaproj/numaflow-go#42 Signed-off-by: Keran Yang <[email protected]>
FileWriter fileWriter = new FileWriter(filePath, false); | ||
objectMapper.writeValue(fileWriter, serverInfo); | ||
FileWriter eofWriter = new FileWriter(filePath, true); | ||
eofWriter.append("\n").append(ServerInfoConstants.EOF); |
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.
Do we need to add \n
?
src/main/java/io/numaproj/numaflow/info/ServerInfoAccessorImpl.java
Outdated
Show resolved
Hide resolved
StringBuilder stringBuilder = new StringBuilder(); | ||
String line; | ||
while ((line = bufferedReader.readLine()) != null | ||
&& !line.equals(ServerInfoConstants.EOF)) { |
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 guess \n
is for this.
I think it's better to use endWith()
to check and trim.
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.
We don't have to add \n
, I just feel it looks prettier when EOF is at a newline :). I also made corresponding changes in numaproj/numaflow-go#48 to make sure the parsing is consistent.
src/main/java/io/numaproj/numaflow/info/ServerInfoAccessorImpl.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Keran Yang <[email protected]>
Signed-off-by: Keran Yang <[email protected]>
Signed-off-by: Keran Yang <[email protected]>
* Please exercise cautions when updating the values below because the exact same values are defined in other Numaflow SDKs | ||
* to form a contract between server and clients. | ||
*/ | ||
public enum Language { |
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.
Any reason why we didn't go with proto? Since it's common among all the sdks we could have kept a common proto file
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.
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.
+1, we need to standardize our proto location before we do that. today we manually sink it between the repos.
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.
To be addressed by numaproj/numaflow#693
* Please exercise cautions when updating the values below because the exact same values are defined in other Numaflow SDKs | ||
* to form a contract between server and clients. | ||
*/ | ||
public enum 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.
Same comment
Java implementation of numaproj/numaflow-go#42
Testing