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

2017-10-31 Thread ajhai
Can you check the thread at https://github.com/Juniper/grpc-c/issues/19 ? What is the version of protobuf you have installed on your Mac? I haven't tried using nanopb. It was tried before though directly with grpc. Look at https://github.com/grpc/grpc/pull/7670 and https://github.com/grpc/grpc/

[grpc-io] Re: [grpc-c++] gRPC polling for incoming packets from multiple sockets

2017-10-31 Thread 'Muxi Yan' via grpc.io
Hi! If you are using gRPC C++, you can create server and client calls on the same completion queue so that when you wait for event on that completion queue you wait for those from both sides. On Tuesday, October 31, 2017 at 2:50:15 AM UTC-7, Ista Ranjan Samanta wrote: > > Hey! > > I am also look

Re: [grpc-io] grpc python library server streaming issue

2017-10-31 Thread 'Ken Payson' via grpc.io
This behavior is expected for a unary request/stream response rpc. If you want the service handler to loop over requests, you should use bidirectional streaming (stream request/ stream response). On Tue, Oct 31, 2017 at 3:09 PM, sam reddy wrote: > a simple grpc server client, client send a int

[grpc-io] grpc python library server streaming issue

2017-10-31 Thread sam reddy
a simple grpc server client, client send a int and server streams int's back. client is reading the messages one by one but server is running the generator function immediately for all responses. server code: import test_pb2_grpc as pb_grpc import test_pb2 as pb2 import time

[grpc-io] Re: [java] Logging result of every call on server

2017-10-31 Thread John Hume
My wording was ambiguous, but what I meant to ask was whether the framework guarantees that ServerCall::close will be called on the possibly-wrapped-by-interceptors ServerCall passed on to the next handler. Our logs suggest that it does not. Our logging interceptor wasn't logging in the returne

RE: [grpc-io] Re: Looking for the best way to send/recieve DateTime objects using GRPC Java

2017-10-31 Thread Nicholas DiPiazza
Great!!! That’s what I was looking for. Thanks for spelling it out to me it was not at all obvious what ZoneId to use *From:* grpc-io@googlegroups.com [mailto:grpc-io@googlegroups.com] *On Behalf Of *Selcuk Bozdag *Sent:* Tuesday, October 31, 2017 1:13 PM *To:* grpc.io *Subject:* [grpc-io] Re:

[grpc-io] [grpc-c++] sample cmake makefile for windows

2017-10-31 Thread Selcuk Bozdag
Hi, After getting grpc built on my Windows using VS2015, I created a proto file and generated a service code. However I could not manage to compile it. It is a bit because I'm not so familiar with MS tools. So I decided to get Cmake on stage and create a building script which looks much more r

[grpc-io] Re: Looking for the best way to send/recieve DateTime objects using GRPC Java

2017-10-31 Thread Selcuk Bozdag
Hi, You can use epoch milliseconds. If you're working with LocalDateTime for instance: localDateTime.atZone(ZoneId.systemDefault()) .toInstant().toEpochMilli() would get you something you need I think. In proto file define it as a long data. Hope it helps. On Saturday, 28 October 2017 04:31:4

Re: [grpc-io] Re: Looking for the best way to send/recieve DateTime objects using GRPC Java

2017-10-31 Thread Evan Jones
A LocalDateTime does not have a time zone, and getSecond() only returns the seconds part of the "human broken down time", so it isn't the same. A Timestamp represents an instant in time, and the seconds part is seconds since the epoch. You probably need something like (I did not even attempt to com

[grpc-io] Re: Best way to include and reference standard google proto files

2017-10-31 Thread 'Carl Mastrangelo' via grpc.io
I believe all the Well Known Types like empty are included by the default Maven jar. google.rpc.Status comes from the googleapis-common-protos. On Tuesday, October 31, 2017 at 10:09:09 AM UTC-7, Matt Mitchell wrote: > > We're using Java gRPC and make use of some of the "standard library" > pro

[grpc-io] Re: Long lived bidirectional channel - how to communicate client errors

2017-10-31 Thread matt . mitchell
Perfect, thanks again. - Matt On Tuesday, October 31, 2017 at 1:22:39 PM UTC-4, Carl Mastrangelo wrote: > > It's present on the ClientCall object, which are wrapped by > StreamObservers. The ClientCall API is more advanced so most people don't > use it. If you look at the generated stubs, yo

Re: [grpc-io] Re: Looking for the best way to send/recieve DateTime objects using GRPC Java

2017-10-31 Thread 'Carl Mastrangelo' via grpc.io
It looks like you are using Java. In that case, Protobuf provides a helper library to create these, such as fromMillies: https://github.com/google/protobuf/blob/v3.4.0/java/util/src/main/java/com/google/protobuf/util/Timestamps.java#L279 On Tuesday, October 31, 2017 at 9:24:25 AM UTC-7, Nicho

[grpc-io] Re: Long lived bidirectional channel - how to communicate client errors

2017-10-31 Thread 'Carl Mastrangelo' via grpc.io
It's present on the ClientCall object, which are wrapped by StreamObservers. The ClientCall API is more advanced so most people don't use it. If you look at the generated stubs, you can see how to create a client call. All you need to do is not to wrap it in a StreamObserver. On Tuesday, O

[grpc-io] Re: Close channels from Server sides

2017-10-31 Thread 'Carl Mastrangelo' via grpc.io
On the server side you can set NettyServerBuilder.maxConnectionAge() and related methods to limit how long idle clients are connected. On Monday, October 30, 2017 at 8:41:06 PM UTC-7, Anh Le wrote: > > When I use an interceptor to authenticate clients (in bi-directional > streaming scenarios), i

[grpc-io] Re: [java] how to implement load balance in grpc.

2017-10-31 Thread 'Carl Mastrangelo' via grpc.io
Let's step back. High level, what do you want to do? On Monday, October 30, 2017 at 6:17:16 PM UTC-7, kuizh...@gmail.com wrote: > > Thank you for your reply. > I still have no idea about it. I don't konw what should to do in grpc > client and server.I read the example > github.com/saturnism/

[grpc-io] Best way to include and reference standard google proto files

2017-10-31 Thread Matt Mitchell
We're using Java gRPC and make use of some of the "standard library" protobuf messages, like google.protobuf.Empty and google.rpc.Status - currently, these are copied into our project under the proto directory, along side our application proto files. Is there a way to reference the google proto

Re: [grpc-io] Re: Looking for the best way to send/recieve DateTime objects using GRPC Java

2017-10-31 Thread Nicholas DiPiazza
Is this code snippet ok? LocalDateTime ldt = the date time object we want to send over grpc; Timestamp.newBuilder().setSeconds(ldt.getSecond()) .setNanos(ldt.getNano())) .build() Is there a helper method to make it easier? On Tue, Oct 31, 2017 at 9:23 AM, Evan Jones wrote: > I seco

[grpc-io] Re: Long lived bidirectional channel - how to communicate client errors

2017-10-31 Thread matt . mitchell
Got it, thanks Carl - that helps a lot. Can you point me to an example of how you'd call halfClose()? - Matt On Monday, October 30, 2017 at 8:45:17 PM UTC-4, Carl Mastrangelo wrote: > > Under the hood, the Client sends a RST_STREAM HTTP/2 frame with the > cancelled error code. If you want to g

[grpc-io] Re: Looking for the best way to send/recieve DateTime objects using GRPC Java

2017-10-31 Thread Evan Jones
I second the recommendation for using Timestamp. If you interact with other languages, some of the libraries provide some some nice helper methods to make working with it fairly straightforward. If you use any Google Cloud APIs, you will end up dealing with Timestamps at some point, so you might

[grpc-io] Re: [grpc-c++] gRPC polling for incoming packets from multiple sockets

2017-10-31 Thread ista . samanta
Hey! I am also looking into the same kind of handling mechanism to leverage gRPC promises one step forward but unfortunately there is no such example or explanations in the web that I found (:- It's really appreciated if anyone from Core team can reply something here or update the doc with ex