grpc-java

Maven and java: how to generate code from protobuf files in test directory?

大兔子大兔子 提交于 2019-12-12 18:34:25
问题 My question is very similar to this question but for maven and java. I am testing grpc, and want to put to a simple helloworld.proto in the test/proto folder. However the file doesn't generate a java file (unlike the proto file in /src/main/proto). So my question is how to generate code for proto in the test folder? 回答1: First, follow the documentation to use the org.xolstice.maven.plugins protobuf-maven-plugin. Alternatively, you can copy the example pom.xml (this is pinned to the v1.19.0

gRPC-java - Compilation of a .proto file

瘦欲@ 提交于 2019-12-11 17:43:53
问题 I have compiled my .proto file using the protobuf compiler and received a selection of Java files. I received a proto.java file and a .java file for each item in the .proto file, including the message type and each RPC call e.g. publicKeyRequest.java and Quote.java as the RPC and request parameter type. Is this all the files that are needed as I still cannot seem to to get any simple response back from the server? I want to generate a request for the PublicKeyRequest RPC call. I generated the

What is the maximum number of clients that a grpc-java managedchannelbuilder can handle?

感情迁移 提交于 2019-12-11 02:46:39
问题 When we create a managedChannelBuilder and use this to call a grpc-java service call, how many clients can we serve with this? Doesn't this channel be shutdown after individual service call? Say I have a REST interface which accepts REST calls from a browser and from within these REST Service methods, I am making grpc client calls to an independent grpc server. Also I can expect client connections in the range of [4000-5000] concurrently. How well can I make use of this managedChannelBuilder.

Deploy gRPC supporting application on AWS using ALB

感情迁移 提交于 2019-12-10 13:50:44
问题 I have two microservices communicating using gRPC.Both are docker applications deployed on ECS. How do I configure them to use AWS ALB?In documentation it says ALB supports HTTP/2, however I can only see HTTP1 settings. My application has one gRPC port and one health check API at 8080.How do I configure that on ALB? 回答1: I don't believe you can. ALBs "support" HTTP2 but only in so far as they can accept HTTP2 and de-multiplex it before forwarding on HTTP1. You can use AWS's newer "NLB" though

Facing NoSuchMethodError for io.netty.util.AttributeKey.valueOf() method with grpc and protobuf Hello world example

[亡魂溺海] 提交于 2019-12-09 06:44:51
问题 After running GreetingServerTest.java tests I am getting below given errors. I am using grpc 1.1.0-SNAPSHOT libraries and trying to implement basic Helloword example of grpc given in there git repo. Can anybody please suggest which libraries I am missing or there's anything else I need to do. java.lang.NoSuchMethodError: io.netty.util.AttributeKey.valueOf(Ljava/lang/Class;Ljava/lang/String;)Lio/netty/util/AttributeKey; at io.grpc.netty.Utils.<clinit>(Utils.java:87) at io.grpc.netty

is it possible to use jmeter to test grpc

允我心安 提交于 2019-12-07 09:46:14
问题 Was wondering if anybody has tried to use jmeter to test gRPC application. I was hoping that I could write a gRPC client class with a non-blocking/asynchronous stub that makes non-blocking calls to the server, Create a Jar of the above client Import the Jar to JMeter Use the Java method in Jmeter BeanShell sampler before investing time in trying the above I wanted to see if any body has tried something similar and if above workaround work? will each thread create a separate TCP connection? We

Android studio show this error during run. Error: Program type already present: androidx.concurrent.futures.DirectExecutor

两盒软妹~` 提交于 2019-12-06 11:05:44
问题 im tried to run my android app program through / using android studio version 3.1.4 and i have no idea what is happen while im run my program its keep showing this error Error: Program type already present: androidx.concurrent.futures.DirectExecutor I'd tried quick googling its answer but yet still not found answer related to my issues. As per I'd found those issues related to class name conflict? Correct me if I'm wrong. Below this is my build.gradle apply plugin: 'com.android.application'

Grpc Server keeps processing the data even when client get disconnected

淺唱寂寞╮ 提交于 2019-12-06 07:24:00
问题 I have a server which streams the data for a given request below is the method which does that function @Override public void getChangeFeed(ChangeFeedRequest request, StreamObserver<ChangeFeedResponse> responseObserver) { long queryDate = request.getFromDate(); long offset = request.getPageNo(); ChangeFeedResponse changeFeedResponse = processData(responseObserver, queryDate, offset); while(true){ if(changeFeedResponse!=null && !changeFeedResponse.getFinalize()){ responseObserver.onNext

How to use new Dialogflow SDK V2 in Android

扶醉桌前 提交于 2019-12-05 02:34:53
问题 I'm a bit confused about the migration to Dialogflow V2: I have an Android app using https://github.com/dialogflow/dialogflow-android-client (1) that makes voice recognition via "AIService" and request to my Dialogflow Agent V1. Now with the release of Dialogflow V2, the docs point me to use: https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-dialogflow But I can not see correspondence to AIService in this new SDK for Java... all I've found is this: https:/

How to use new Dialogflow SDK V2 in Android

人盡茶涼 提交于 2019-12-03 17:20:38
I'm a bit confused about the migration to Dialogflow V2: I have an Android app using https://github.com/dialogflow/dialogflow-android-client (1) that makes voice recognition via "AIService" and request to my Dialogflow Agent V1. Now with the release of Dialogflow V2, the docs point me to use: https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-dialogflow But I can not see correspondence to AIService in this new SDK for Java... all I've found is this: https://googlecloudplatform.github.io/google-cloud-java/latest/apidocs/index.html?com/google/cloud/dialogflow/v2