[grpc-io] gRPC Java on FreeBSD: did anyone try?

2021-04-05 Thread Alex Povolotsky
Well, Java is supposed to be multiplatofrm. And as well gRPC should not be 
system-dependent.
However, I cannot build gRPC-java because of "Unknown OS: FreeBSD" error.
As far as I understand, just adding FreeBSD to the list should work; 
there's nothing THAT different, unless gRPC use something kernel-dependent.
How can I do it?

Alex

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/1ed1f1c8-fd64-4be1-a3a2-76a9ff741a2bn%40googlegroups.com.


Re: [grpc-io] gRPC-Web client in JavaScript, gRPC server in Python: is it possible?

2021-04-05 Thread 'Bilal Ahmad' via grpc.io
facing similar issue. did you manage to figure out?

On Wednesday, December 2, 2020 at 12:00:42 PM UTC Chris Majewski wrote:

> Yes, that's what I did. But when I swap out the Node server with my Python 
> server, the Python server doesn't see any of the requests from my client. 
> How can I troubleshoot this? The Docker containers are really minimal, 
> there are almost no devops tools on them. I would like to start by ensuring 
> that the Envoy proxy is configured correctly. I'm able to look at the Envoy 
> logs, but not sure what to look for, and the lack of tools isn't helping. 
>
> [image: Logo]   
> [image: image]   
> Krzysztof (Chris) Majewski | Software Developer
> Sumac / Silent Partner Software
> silentpartnersoftware.com 
> Toll-free 1-877-399-4645
> [image: twitter]  [image: facebook] 
>  [image: youtube] 
> 
>
>
> On Tue, Dec 1, 2020 at 6:29 PM Stanley Cheung  
> wrote:
>
>> Does it work if you follow the quick start tutorial and use a Node 
>> server? If that works, swap out the Node server with your Python server. 
>> That way you can at least be sure that the JS and the Envoy parts are 
>> working correctly.
>>
>> On Tue, Dec 1, 2020 at 7:43 AM Chris Majewski <
>> chris.m...@silentpartnersoftware.com> wrote:
>>
>>> I'm working on a proof-of-concept using gRPC-Web. I was able to get the 
>>> Quick 
>>> Start tutorial  working. 
>>> My next challenge is to adapt this demo by writing a gRPC-Web client in 
>>> JavaScript that talks to my (very simple) gRPC server written in Python. Is 
>>> this possible? I am following the Basics Tutorial 
>>>  but it is incomplete. In 
>>> particular, some of the client-side Javascript code is missing, and the 
>>> code snippet that is there is different from the corresponding code in the 
>>> Docker containers from the Quick Start tutorial.
>>>
>>> I am able to build the JavaScript stubs for my client. However, my gRPC 
>>> server (Python) never sees any requests from the client (JavaScript). Not 
>>> sure if this is due to a bug in my JavaScript, a bug in the Envoy proxy 
>>> config, or something else. Troubleshooting is difficult because the Docker 
>>> containers are based on a very minimal Linux install that is missing basic 
>>> Unix tools.
>>>
>>> I can offer to help document this once I get it working, but I would 
>>> need some help to get it working in the first place.
>>>
>>> Thanks!
>>>
>>> Chris
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "grpc.io" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to grpc-io+u...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/grpc-io/8fdd4362-e04f-4b40-8819-9cc9293d5720n%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/7cfd1255-7fb6-4ee8-96ea-31d487fa3a40n%40googlegroups.com.


[grpc-io] Re: AttributeError: 'grpc._cython.cygrpc._ServicerContext' object has no attribute 'add_done_callback'

2021-04-05 Thread Tarek Saad
Hi Lidi,

Thanks for getting back. My application is for a long-lived bidirectional 
stream.
On the server, I need to detect a client disconnected. I understand 
multiple streams are multiplexed on same connection. However, in my case it 
is a long-lived bidirectional stream and the stream will terminate only 
when the client has died. 
When stream is terminated, and if the client/stream does not reconnect to 
server within a timeout, the server will need to purge out state associated 
with the client.

I'm counting on "add_done_callback" being able to register a callback that 
gets invoked before the stream is terminated. This allows me to start the 
timer on server side to wait before purging state associated with the 
client/stream.
I was also suggested to look into enabling TCP keepalives - but I have not 
seen a way for the application to be notified if/when TCP connection is 
terminated.

If you have better ideas, I much appreciate it.
BTW, I quickly sifted through the PR, there is a suggestion to catch 
asyncio.CancelledError.. However, 1) I am not sure if 
asyncio.CancelledError is raised if client disconnects, and 2) whether  
application/server will have a chance to do anything about it before 
underlying aio thread get cleaned up?

async def handler(request, service_context):
try:
make_something(...)
except asyncio.CancelledError:
clean_stuff_related_to_current_RPC()

Regards,
Tarek

On Monday, April 5, 2021 at 2:24:19 PM UTC-4 Lidi Zheng wrote:

> Hi,
>
> `add_done_callback` wasn't added to grpc.aio.Server because there was a 
> discussion that it overlaps with server interceptors: 
> https://github.com/grpc/grpc/pull/22503.
>
> I can update the PR later this week. If possible, please explain more 
> about your use case and why you think `add_done_callback` would be handy.
>
> On Saturday, April 3, 2021 at 2:56:56 PM UTC-7 dr.t...@gmail.com wrote:
>
>> Hi,
>>
>> Using python grpc.aio, I'm not able to add a callback  on server side 
>> (using context) to be invoked on a grpc stream terminated/cancelled -- I 
>> use grpc.aio.server().
>> The documentation here 
>>  
>> mentions 
>> the callback, but I can't seem to be able to get it to work. 
>>
>> If I use grpc.server() instead, I can set add_callback()
>>
>> I'm using:
>> Name: grpcio
>> Version: 1.36.1
>> Name: grpcio-tools
>> Version: 1.35.0
>> Name: aiogrpc
>> Version: 1.8
>>
>> Thanks
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/5fbc0de4-ada1-46d0-813f-9ac6ce7e83e3n%40googlegroups.com.


[grpc-io] Re: AttributeError: 'grpc._cython.cygrpc._ServicerContext' object has no attribute 'add_done_callback'

2021-04-05 Thread 'Lidi Zheng' via grpc.io
Hi,

`add_done_callback` wasn't added to grpc.aio.Server because there was a 
discussion that it overlaps with server interceptors: 
https://github.com/grpc/grpc/pull/22503.

I can update the PR later this week. If possible, please explain more about 
your use case and why you think `add_done_callback` would be handy.

On Saturday, April 3, 2021 at 2:56:56 PM UTC-7 dr.t...@gmail.com wrote:

> Hi,
>
> Using python grpc.aio, I'm not able to add a callback  on server side 
> (using context) to be invoked on a grpc stream terminated/cancelled -- I 
> use grpc.aio.server().
> The documentation here 
>  
> mentions 
> the callback, but I can't seem to be able to get it to work. 
>
> If I use grpc.server() instead, I can set add_callback()
>
> I'm using:
> Name: grpcio
> Version: 1.36.1
> Name: grpcio-tools
> Version: 1.35.0
> Name: aiogrpc
> Version: 1.8
>
> Thanks
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/1e2cfa41-2531-44e3-97f2-eff35b2265b4n%40googlegroups.com.