hi, there
i'm currently learning grpc and it is really easy to use. I'm using maven plugin to generate java code. So far, it works well.
But, the grpc client must specify the server host and port, if the server was down, the client can't get service any more. How can we solve this in a distributed system? If one server was down, the client can automatically find another valid server and do the rpc request. Is there a location discovery service to help? Or we can use nginx to do the proxy?
Another question, i found the has* method was very useful in proto2. But in proto3, there is no has* method in generated java file any more. why?
for instance, like the proto below,
in proto2, the generated java file has the "hasNum()" method to know if the client has set the num or not. Although it has a default value for int which is 0, but sometime we want to know whether the client has specified the field or not.
Can we still have this function in proto3?
sincerely,
Roy Lu
But, the grpc client must specify the server host and port, if the server was down, the client can't get service any more. How can we solve this in a distributed system? If one server was down, the client can automatically find another valid server and do the rpc request. Is there a location discovery service to help?
Or we can use nginx to do the proxy?
Another question, i found the has* method was very useful in proto2. But in proto3, there is no has* method in generated java file any more. why?