Re: [grpc-io] Benchmarking questions

2021-12-02 Thread Ctmahapa95
  
  

 Has anyone outside Google measured c++ Bidi stream latency numbers? Can one 
expect to achieve single digit or small double digit microseconds latency? 
Thank you.
  
  

  
  
>   
> On Dec 2, 2021 at 6:19 PM,   (mailto:davidlofstr...@gmail.com)>  wrote:
>   
>   
>   
> I have a few questions after reading benchmarking page at
>   
> https://grpc.io/docs/guides/benchmarking/
>   
>
>   
> The benchmark seem to use secure channels.
>   
> Parts of our solutions are totally isolated within a cluster and it will not 
> necessarily be required to use secure channels if the benefits are good 
> enough.
>   
> Do you also have a benchmark for insecure channels?
>   
>
>   
> I've read some (unofficial) claims that Rust can have lower overhead as 
> compared to other languages using gRPC.
>   
> Have anyone here experimented with benchmarking gRPC/Rust?
>   
> If so how does it compare to other languages?
>   
>
>   
>
>
>
>  --
>  You received this message because you are subscribed to the Google Groups 
> "grpc.io (http://grpc.io)" group.
>  To unsubscribe from this group and stop receiving emails from it, send an 
> email to  grpc-io+unsubscr...@googlegroups.com 
> (mailto:grpc-io+unsubscr...@googlegroups.com).
>  To view this discussion on the web visit   
> https://groups.google.com/d/msgid/grpc-io/0004ec4f-d3f9-46e5-99ea-284d6ebd425cn%40googlegroups.com
>  
> (https://groups.google.com/d/msgid/grpc-io/0004ec4f-d3f9-46e5-99ea-284d6ebd425cn%40googlegroups.com?utm_medium=email&utm_source=footer).
>

-- 
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/4f6bfa14-471a-4608-bb0c-b56abca594ee%40iPhone.


[grpc-io] Benchmarking questions

2021-12-02 Thread David Löfstrand
I have a few questions after reading benchmarking page at
https://grpc.io/docs/guides/benchmarking/

The benchmark seem to use secure channels.
Parts of our solutions are totally isolated within a cluster and it will 
not necessarily be required to use secure channels if the benefits are good 
enough.
Do you also have a benchmark for insecure channels?

I've read some (unofficial) claims that Rust can have lower overhead as 
compared to other languages using gRPC.
Have anyone here experimented with benchmarking gRPC/Rust?
If so how does it compare to other languages?

-- 
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/0004ec4f-d3f9-46e5-99ea-284d6ebd425cn%40googlegroups.com.


[grpc-io] Re: ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found

2021-12-02 Thread Antonio Orozco
This was not resolved. I just re-installed Ubuntu on a RaspberryPi instead. 
I noticed that there's a new version of Debian for the RaspberryPi (Based 
on Debian version 11-bullseye), it might work now but I have not tried.
Unfortunately, it seems like Google PubSub python package is just 
incompatible with *Debian GLIBC 2.28*

On Wednesday, December 1, 2021 at 11:20:10 AM UTC-8 Dayton Turner wrote:

> Same, I'm also just running into this and looking for a solution too! 
> please let us know if you figure it out!
>
> On Tuesday, 30 November 2021 at 21:15:53 UTC-8 jeremy scott wrote:
>
>> I'm having the same exact issue. Did this issue ever get resolved?
>>
>>
>> On Wednesday, October 27, 2021 at 8:44:54 PM UTC-7 Antonio Orozco wrote:
>>
>>> This is the first time trying to use google pub/sub python package.
>>>
>>> Command that I used to install:
>>> python3 -m pip --no-cache-dir install grpcio
>>>
>>> I tried many other ways, all yield the same result. "sudo pip3..", 
>>> "sudo pip...", "pip3 ...", "pip..."
>>> It works perfectly on Ubuntu 20.04.
>>> Looking in indexes: https://pypi.org/simple, 
>>> https://www.piwheels.org/simple
>>> Collecting grpcio
>>>   Downloading 
>>> https://files.pythonhosted.org/packages/9e/68/721d94afa6fea6c559b1d795d2bae0147b3db9b43f4069d392371a2b8cab/grpcio-1.41.1-cp37-cp37m-linux_armv7l.whl
>>>  
>>> (47.9MB)
>>> 100% || 48.0MB 12.8MB/s
>>> Requirement already satisfied: six>=1.5.2 in 
>>> ./.local/lib/python3.7/site-packages (from grpcio) (1.16.0)
>>> Installing collected packages: grpcio
>>> Successfully installed grpcio-1.41.1
>>>
>>> ldd --version
>>> ldd (*Debian GLIBC 2.28-10+rpt2+rpi1*) 2.28
>>> Copyright (C) 2018 Free Software Foundation, Inc.
>>> This is free software; see the source for copying conditions.  There is 
>>> NO
>>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
>>> PURPOSE.
>>> Written by Roland McGrath and Ulrich Drepper.
>>>
>>> On Wednesday, October 27, 2021 at 10:21:07 AM UTC-7 rbel...@google.com 
>>> wrote:
>>>

 How did you install grpcio? If you used pip install grpcio, can you 
 please include the installation logs?

 Did this work on previous versions?
 On Monday, October 25, 2021 at 8:33:16 PM UTC-7 Antonio Orozco wrote:

> Traceback (most recent call last):
>   File "fpl_notifications.py", line 4, in 
> *from google.cloud import pubsub_v1*
>   File 
> "/home/antonio/.local/lib/python3.7/site-packages/google/cloud/pubsub_v1/__init__.py",
>  
> line 17, in 
> from google.cloud.pubsub_v1 import types
>   File 
> "/home/antonio/.local/lib/python3.7/site-packages/google/cloud/pubsub_v1/types.py",
>  
> line 25, in 
> from google.api_core import gapic_v1
>   File 
> "/home/antonio/.local/lib/python3.7/site-packages/google/api_core/gapic_v1/__init__.py",
>  
> line 16, in 
> from google.api_core.gapic_v1 import config
>   File 
> "/home/antonio/.local/lib/python3.7/site-packages/google/api_core/gapic_v1/config.py",
>  
> line 23, in 
> import grpc
>   File 
> "/home/antonio/.local/lib/python3.7/site-packages/grpc/__init__.py", line 
> 22, in 
> from grpc import _compression
>   File 
> "/home/antonio/.local/lib/python3.7/site-packages/grpc/_compression.py", 
> line 15, in 
> from grpc._cython import cygrpc
> *ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' 
> not found* (required by 
> /home/antonio/.local/lib/python3.7/site-packages/grpc/_cython/
> cygrpc.cpython-37m-arm-linux-gnueabihf.so)
>
> On Monday, October 25, 2021 at 8:22:28 PM UTC-7 Antonio Orozco wrote:
>
>> Hello,
>>
>> Running into the following issue on a Raspberry Pi 4
>>
>> $ lsb_release -a
>> No LSB modules are available.
>> Distributor ID: Raspbian
>> Description:Raspbian GNU/Linux 10 (buster)
>> Release:10
>> Codename:   buster
>> $ uname -a
>> Linux liverpool 5.10.63-v7l+ #1459 SMP Wed Oct 6 16:41:57 BST 2021 
>> armv7l GNU/Linux
>>
>>
>> Python 3.7.3 (default, Jan 22 2021, 20:04:44)
>> [GCC 8.3.0] on linux
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> from grpc._cython import cygrpc
>> Traceback (most recent call last):
>>   File "", line 1, in 
>>   File 
>> "/home/antonio/.local/lib/python3.7/site-packages/grpc/__init__.py", 
>> line 
>> 22, in 
>> from grpc import _compression
>>   File 
>> "/home/antonio/.local/lib/python3.7/site-packages/grpc/_compression.py", 
>> line 15, in 
>> from grpc._cython import cygrpc
>> ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' 
>> not found (required by 
>> /home/antonio/.local/lib/python3.7/site-packages/grpc/_cython/
>> cygrpc.cpython-37m-ar

[grpc-io] Re: Is this a valid way to multi thread RPC handlers in gRPC async server in C++?

2021-12-02 Thread 'Christopher Warrington - MSFT' via grpc.io
On Sunday, November 14, 2021 at 9:59:34 PM UTC-8 Rajanarayana A wrote:

> I see that there is a possibility of one instance of CallData being
> accessed in multiple threads (returned as part of tag). Is CallData
> thread-safe here or do we need to have a mutex for the same?

There's an older thread on a similar topic, "How to implement async gRPC
with more than one method?" [1]. It talks about how to manage multiple
CallData instances at once, which may be relevant to what you're doing.

[1]: https://groups.google.com/g/grpc-io/c/bXMmfah57h4/m/EUg2B8o1AgAJ

--
Christopher Warrington
Microsoft Corp

-- 
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/0f3c0152-ff1c-4d82-857f-3c04cad94ca4n%40googlegroups.com.


[grpc-io] Re: gRPC wait server ready

2021-12-02 Thread Сергей Соболев
Good news, thank you!

среда, 1 декабря 2021 г. в 21:27:36 UTC+3, yas...@google.com: 

> I think this API is pretty stable and should be promoted. 
> https://github.com/grpc/grpc/pull/28247
>
> On Tuesday, November 9, 2021 at 1:06:03 PM UTC-8 Сергей Соболев wrote:
>
>> Hi, everyone!
>> I'm writing test (with gtest) with grpc similar to the following (in C++ 
>> pseudocode):
>>
>> class Fixture {
>>   void SetUp() { m_server = BuildAndStart(); }
>>   void TearDown() { m_server->Shutdown(); }
>> };
>>
>> TEST_F(Fixture, *Test1*) { ASSERT_EQ(clientStub->rpcCall(ctx), 
>> grpc::Status::OK); }
>> TEST_F(Fixture, Test2) { ASSERT_EQ(clientStub->rpcCall(ctx), 
>> grpc::Status::OK); }
>>
>> When compiling (clang++11) with a thread sanitizer (grpc library 
>> compiling with tsan too) sometimes I get an error UNAVALABLE (code 14) with 
>> logs:
>> "Failed to pick subchannel", "Failed to connect to all addresses" and 
>> observe the state of the channel is TRANSIENT_FAILURE.
>> But only the first test always fails (*Test1*). Searching the internet I 
>> found the following suitable solution 
>> https://chromium.googlesource.com/external/github.com/grpc/grpc/+/HEAD/examples/python/wait_for_ready/
>> In other words, with tsan I guess grpc library does not have enough time 
>> to fully initialize (Test2 is always OK). After use 
>> grpc::ClientContext::set_wait_for_ready(bool) method problem solved
>>
>> TEST_F(Fixture, Test1) { ASSERT_EQ(clientStub->rpcCall(ctx*WithWait*), 
>> grpc::Status::OK); }
>> TEST_F(Fixture, Test2) { ASSERT_EQ(clientStub->rpcCall(ctx*WithWait*), 
>> grpc::Status::OK); }
>>
>> My questions are:
>>
>>1. grpc::ClientContext::set_wait_for_ready(bool) marked as 
>>EXPERIMENTAL (C++ api) and may be removed in the future, but 
>>grpc::ClientContext::set_fail_fast(bool) method is DEPRECATED. It's 
>>recommended to use wait_for_ready(). Is it true that in the future 
>>set_wait_for_ready should become a replacement set_fail_fast?
>>2. Are there any other ways to solve this problem? I was also looking 
>>at ChannelState API 
>>
>> https://chromium.googlesource.com/external/github.com/grpc/grpc/+/refs/heads/chromium-deps/2016-09-09/doc/connectivity-semantics-and-api.md
>>  Which 
>>way is more correct and reliable?
>>
>> I will also need to implement similar logic in C# code. In C# this is a 
>> CallOptions.WithWaitForReady(bool) method, but it's EXPERIMENTAL too
>>
>> Wished to clear up a misunderstanding and choose the right solution.
>>
>> Thank you for your time.
>> Highly appreciated.
>> Sergey
>>
>

-- 
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/1ae8c323-1e96-457f-8a89-e1d9a42d9fe2n%40googlegroups.com.