grpc-java

Inferencing with Tensorflow Serving using Java

删除回忆录丶 提交于 2020-01-05 03:33:31
问题 We are transitioning an existing Java production code to use Tensorflow Serving (TFS) for inferencing. We have already retrained our models and saved them using the new SavedModel format (no more frozen graphs!!). From the documentation that I have read, TFS does not directly support Java. However it does provide a gRPC interface, and that does provide a Java interface. My question, what are the steps involved in bringing up a Java application to use TFS. [Edit: moved steps to a solution] 回答1

JavaFX gRPC Client Dependencies

青春壹個敷衍的年華 提交于 2019-12-25 11:28:28
问题 I am working on gRPC client(JavaFX) and server(SpringBoot with gRPC starter). The two application are independent and do not share any files together. The server is complete for testing(here) I would like to make JavaFX client independently from the gRPC server, i.e without including gRPC server as a maven dependancy in client POM. What gRPC client specific dependencies can i add in the javafx application and how to send request to the server? 回答1: According to the official documentation

Failed to load libraries: [netty_tcnative_linux_arm_32, netty_tcnative_linux_arm_32_fedora, netty_tcnative_arm_32, netty_tcnative]

元气小坏坏 提交于 2019-12-25 03:44:31
问题 I am trying to run a java application using jar on raspberry pi modal 3. I am unable to resolve this issue. Could someone kindly suggest how can I make this work on the raspberry pi? In pom, I have included google-cloud-speech dependency, 0.56.0-beta; and spring-boot-starter-web dependency. Error: java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_linux_arm_32, netty_tcnative_linux_arm_32_fedora, netty_tcnative_arm_32, netty_tcnative] at io.grpc

Google Assistant sdk GRPC authentication error : io.grpc.StatusRuntimeException: UNAUTHENTICATED:

妖精的绣舞 提交于 2019-12-24 11:18:57
问题 I successfully created EmbeddedAssistantStub using the below code. EmbeddedAssistantGrpc.EmbeddedAssistantStub mAssistantService = EmbeddedAssistantGrpc.newStub(channel) .withCallCredentials(MoreCallCredentials.from( Credentials.fromResource(mClientId,mRefreshToken,mAccessToken) )); After this i passed audio data to StreamObserver, At that time below exxception was occured. Line 3378: 12-07 12:59:25.099 1917 4286 E GASample: io.grpc.StatusRuntimeException: UNAUTHENTICATED: Request is missing

Failed to load any of the given libraries: [netty-tcnative-linux-x86_64,netty-tcnative]

孤者浪人 提交于 2019-12-24 00:59:45
问题 I have deployed a web-application inside a tomcat container and have used grpc-netty (1.2.0) with netty-tcnative-boringssl-static:jar:1.1.33.Fork26. When i switch on debug logs it tells that "java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty-tcnative-linux-x86_64, netty-tcnative-linux-x86_64-fedora, netty-tcnative]" and then a error message "java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured.". I have gone through the

How to intercept the headers from in call to one service and insert it to another request in gRPC-java?

≯℡__Kan透↙ 提交于 2019-12-23 04:28:18
问题 I have two servers - HelloServer and WorldServer. Both implement the same proto file: // The greeting service definition. service GreeterService { // Sends a greeting rpc GreetWithHelloOrWorld (GreeterRequest) returns (GreeterReply) {} rpc GreetWithHelloWorld (GreeterRequest) returns (GreeterReply) {} } message GreeterRequest { string id = 1; } // The response message containing the greetings message GreeterReply { string message = 1; string id = 2; } I want to add traceIds to the requests.

Exception handling in gRPC

人走茶凉 提交于 2019-12-22 05:48:15
问题 I have a server written in Java and client written in PHP. How can client catch exception from server if anything goes wrong? I can't find anything about exception handling in gRPC documentation. Thank you! 回答1: For handled exceptions, call responseObserver.onError() . If you pass in a StatusRuntimeException or StatusException (generally created via status.asRuntimeException() ) the status code and description will be communicated to the client. Unhandled exceptions within a callback will

Does gRPC server spin up a new thread for each request?

早过忘川 提交于 2019-12-20 23:29:21
问题 I tried profiling a gRPC java server. And i see the below set of thread pools majorly. grpc-default-executor Threads : Created 1 for each incoming request. grpc-default-worker-ELG Threads: May be to listen on the incoming gRPC requests & assign to the above "grpc-default-executor" thread. Overall, is gRPC java server, Netty style or Jetty/Tomcat style? Or it can configured to run as both ways? 回答1: gRPC Java server is exposed closer to Jetty/Tomcat style, except that it is asynchronous. That

What does Encountered end-of-stream mid-frame mean when it spits this out on the GRPC server?

試著忘記壹切 提交于 2019-12-13 04:26:53
问题 I am sending data to grpc service and getting error message in return: Encountered end-of-stream mid-frame What does this mean. the connection was interrupted or something else like not enough data sent across. Was it a failure of my client to send enough data of the message over or was it some connection break in the middle of processing. I dont have enough information from this. If you dont know whats wrong here just tell me if it means the connection closed too early during processing or

gRPC: How can I distinguish bi-streaming clients at server side?

一曲冷凌霜 提交于 2019-12-13 04:15:58
问题 In this tutorial and example code, a server can call onNext() method on every stream observer, which will broadcast messages to all clients bi-streaming with the server. But there is no method to identify which observer corresponds to which client. How can a server push a message to specific client instead of broadcasting? According to this answer it is possible to map each observer if client id is provided by metadata. It seems const auto clientMetadata = context->client_metadata(); part