[grpc-io] Re: gRPC java multiple bi-directional streams share same channel is faster than 1 channel per streaming

2018-08-20 Thread 'Carl Mastrangelo' via grpc.io
1 TCP connection for all streams (really RPCs) should be faster. On Monday, August 20, 2018 at 1:15:14 PM UTC-7, eleano...@gmail.com wrote: > > Hi Carl, > > It is hard to show my code as I have a wrapper API on top of grpc. > > However, are you suggesting that using 1 tcp connection per

[grpc-io] Re: how to use grpc java load balancing library with a list of server ip address directly

2018-08-20 Thread 'Carl Mastrangelo' via grpc.io
Look in the gRPC source code for DirectAddressNameResolverFactory, which you can copy into your project. This does what you want. On Monday, August 20, 2018 at 1:11:41 PM UTC-7, eleano...@gmail.com wrote: > > Hi, > > I would like to use the grpc java load balancing library, I looked at the >

[grpc-io] Re: gRPC java multiple bi-directional streams share same channel is faster than 1 channel per streaming

2018-08-20 Thread eleanore . jin
Hi Carl, It is hard to show my code as I have a wrapper API on top of grpc. However, are you suggesting that using 1 tcp connection per stream should be faster than using 1 tcp connection for all streams? On Monday, August 20, 2018 at 11:14:43 AM UTC-7, Carl Mastrangelo wrote: > > Can you

[grpc-io] how to use grpc java load balancing library with a list of server ip address directly

2018-08-20 Thread eleanore . jin
Hi, I would like to use the grpc java load balancing library, I looked at the example code, it looks like below: public HelloWorldClient(String zkAddr) { this(ManagedChannelBuilder.forTarget(zkAddr) .loadBalancerFactory(RoundRobinLoadBalancerFactory.getInstance())

[grpc-io] Re: gRPC java multiple bi-directional streams share same channel is faster than 1 channel per streaming

2018-08-20 Thread 'Carl Mastrangelo' via grpc.io
Can you show your code? This may just be a threading problem. On Saturday, August 18, 2018 at 9:02:59 PM UTC-7, eleano...@gmail.com wrote: > > Hi Srini, > > The way how I do it: > for single connection: > 1. send 1 request via request StreamObserver, to let initial connection > established

Re: [grpc-io] if we switch from netty to okttp in a non-android project, is there any potential different?

2018-08-20 Thread 'Eric Anderson' via grpc.io
grpc-okhttp works fine on regular, non-Android Java versions. Security is different than grpc-netty, so you can't use netty-tcnative. You can use Java 9+ or Conscrypt. If using Conscrypt, you should install it as the default provider with Security.insertProviderAt(Conscrypt.newProvider(), 1);

[grpc-io] Re: Establishing multiple grpc subchannels for a single resolved host

2018-08-20 Thread alysha.gardner via grpc.io
Hey Srini, I've tested pretty aggressive KeepAlive config with the following parameters: 'grpc.http2.min_time_between_pings_ms': 1000, 'grpc.keepalive_time_ms': 1000, 'grpc.keepalive_permit_without_calls': 1 Is there anything I'm missing? Ideally I would like this solution to handle both

[grpc-io] Re: Do we have any examples to use grpc in C

2018-08-20 Thread Prashant Shubham
Can anyone guide how to write C wrapper class for grpc? On Wednesday, January 27, 2016 at 5:12:53 AM UTC+5:30, yyd...@gmail.com wrote: > > Hi guys, > > How to use grpc in C? > > From thread history, the suggestion is to use C++. Understood this, while > we need to use grpc in C as our

Re: [grpc-io] Re: Fatal: grpc_call_start_batch returned 8

2018-08-20 Thread 'Jan Tattermusch' via grpc.io
FTR, it looks like "grpc_call_start_batch returned 8" corresponds to: /** there is already an outstanding read/write operation on the call */ GRPC_CALL_ERROR_TOO_MANY_OPERATIONS, That may mean that for a given call, you are not waiting for outstanding read/write operations to finish (the tag