[grpc-io] Re: Communication of grpc streaming between C# and C++

2021-01-20 Thread 'AJ Heller' via grpc.io
Hi Zijian. Basic streaming communications should work fine between languages. Can you be more specific about your errors, or produce a minimum reproducible example? On Thursday, January 14, 2021 at 5:59:36 AM UTC-8 Zijian Han wrote: > Hello, > > I'm developing a grpc service, with image

[grpc-io] gRFC L82: gRPC Core EventEngine API

2021-06-21 Thread 'AJ Heller' via grpc.io
Please review and comment! The gRFC is at https://github.com/grpc/proposal/pull/245. This work replaces gRPC Core's iomgr with a public interface for custom, pluggable implementations which we're calling EventEngines. EventEngines are tasked with providing all cross-platform I/O, task

[grpc-io] Re: How to unit test grpc services api in ci/cd

2021-05-05 Thread 'AJ Heller' via grpc.io
Hi Sunandan. For unit tests, it's first worth trying to test your business logic in isolation from gRPC. For integration tests, you could run your service and exercise it with test clients (your CI environment may be opinionated on how to automate that). We also have a doc that offers one

[grpc-io] Re: gRFC L79: C++ API changes on ByteBuffer and Slice

2021-04-19 Thread 'AJ Heller' via grpc.io
Corrected link: https://github.com/grpc/proposal/pull/232. (previous link pointed to #215) On Monday, April 19, 2021 at 4:24:39 PM UTC-7 veb...@google.com wrote: > Hi all, > > I've created a gRFC for C++ API changes on ByteBuffer and Slice. The > proposal is here: >

Re: [grpc-io] Re: grpc c++ performance - help required

2021-09-13 Thread 'AJ Heller' via grpc.io
Absolutely, I'll reach out when the EventEngine integration is a bit more feasible. As Mark said, getting to a point where gRPC is ready for custom EventEngine integration is maybe 6 months away. The EventEngine API is public, you can review and comment on it here:

[grpc-io] Re: gRPC executor threads and timer thread

2021-07-12 Thread 'AJ Heller' via grpc.io
We're adding a new API to gRPC core for exactly these kinds of situations. Please see https://github.com/grpc/proposal/pull/245 for information on the EventEngine API, I'd appreciate your feedback! In short, if you need fine-grained control over threading/eventing behaviors in gRPC, or want to

[grpc-io] Re: What's the Threading Model behind Completion Queue?

2021-07-28 Thread 'AJ Heller' via grpc.io
Hi Lixin. Good questions! I can offer a high-level summary. > I'm wondering what's the threading model behind the completion queue? This is a bit of an oversimplification, but the C++ API's `CompletionQueue` borrows threads from the application. Work is done when applications make a blocking

[grpc-io] Re: Should I use async API instead of sync one ?

2021-09-21 Thread 'AJ Heller' via grpc.io
Hi Théo. You'll at least want to consider using the async API. See https://grpc.io/docs/guides/performance/#c for some handy guidelines. The sync API may be fine for fast, non-blocking server-side operations. For the streaming method, you've limited your concurrency there a bit, but that's not

[grpc-io] Re: gRPC server crash when calling CompletionQueue::AsyncNext and then grpc_byte_buffer_destroy

2021-10-20 Thread 'AJ Heller' via grpc.io
*There have _been_ a handful ... On Wednesday, October 20, 2021 at 11:08:09 AM UTC-7 AJ Heller wrote: > There have a handful of crash fixes since January, when 1.35 was released. > Can you reproduce this with v1.41? If so, a minrepro would be helpful. > > On Wednesday, October 13, 2021 at

[grpc-io] Re: gRPC server crash when calling CompletionQueue::AsyncNext and then grpc_byte_buffer_destroy

2021-10-20 Thread 'AJ Heller' via grpc.io
There have a handful of crash fixes since January, when 1.35 was released. Can you reproduce this with v1.41? If so, a minrepro would be helpful. On Wednesday, October 13, 2021 at 4:11:34 AM UTC-7 mykyta@gmail.com wrote: > Hi, I am using gRPC version 1.35. I am experiencing the following

[grpc-io] Re: grpc c++: how to create async callback client

2021-09-22 Thread 'AJ Heller' via grpc.io
You should not need to manage your own threads for basic callback usage, that’s one of the callback API’s design goals ( https://github.com/grpc/proposal/blob/master/L67-cpp-callback-api.md#proposal ). Take a look at the route_guide example here:

[grpc-io] Announcement: Possible breaking change to community-supported platforms on gRPC-core

2021-11-03 Thread 'AJ Heller' via grpc.io
Hello gRPC community! I'll be introducing a change (#27513 ) to gRPC-core which may break the build on some community-supported platforms . This affects

[grpc-io] Re: Announcement: Possible breaking change to community-supported platforms on gRPC-core

2022-02-01 Thread 'AJ Heller' via grpc.io
Update on the timeline: we now expect to land this change in the master branch in the next few weeks, followed by an official release this coming March or April. As stated above, this change will require libuv to build on all supported platforms, and we've made an effort to ensure all supported

[grpc-io] Re: How are bidirectional streams handled for TCP disconnection exceptions in gRPC?

2023-09-13 Thread 'AJ Heller' via grpc.io
This is answered on StackOverflow. On Saturday, September 9, 2023 at 11:56:35 PM UTC-7 borong wrote: > > https://stackoverflow.com/questions/77075070/how-are-bidirectional-streams-handled-for-tcp-disconnection-exceptions-in-grpc > > > > specific description > -- You received this message

[grpc-io] Re: Handling gRPC-gateway for .NET Core

2023-09-13 Thread 'AJ Heller' via grpc.io
gRPC-gateway is a go project. grpc-web might be able to help you https://github.com/grpc/grpc-web On Tuesday, September 12, 2023 at 10:15:58 PM UTC-7 David CHANE wrote: > Dear Mrs., Mr , > > > > I am currently progamming an App in gRPC using .NET environment and > writing my code in C#

[grpc-io] Re: The following imported targets are referenced, but are missing: absl::any_invocable while trying to use gRPC for a project

2023-09-13 Thread 'AJ Heller' via grpc.io
I believe this was answered in https://github.com/grpc/grpc/issues/34299 On Monday, September 11, 2023 at 2:29:30 AM UTC-7 Abhishek Ghosh wrote: > The contents of the file /usr/local/lib/cmake/grpc/gRPCConfig.cmake > # Module path list(APPEND CMAKE_MODULE_PATH >

[grpc-io] Re: How to find boringSSL version in grpcio 1.21.1 ?

2023-09-13 Thread 'AJ Heller' via grpc.io
I'm not entirely sure how to help you with such an old version. I'd recommend trying with a more recent gRPC version, we are currently up to version 1.58. https://pypi.org/project/grpcio/ On Monday, September 11, 2023 at 3:40:12 AM UTC-7 Reena THOMAS wrote: > I am downloading tar file from >

[grpc-io] Re: gRPC Connections Managment golang

2023-09-13 Thread 'AJ Heller' via grpc.io
I'm not sure what your question here is, exactly. I'd recommend starting with this grpc-go tutorial https://grpc.io/docs/languages/go/basics/, which will teach you the basics of creating connections and issuing RPCs. You may be most interested in bidirectional streaming. On Saturday, September

[grpc-io] Patch Releases for CVE-2023-4785, covering gRPC Core, C++, Python, and Ruby

2023-09-19 Thread 'AJ Heller' via grpc.io
Patched versions of the affected gRPC libraries have been released to address CVE-2023-4785 . *Please deploy patched libraries if all of the following apply to you:* * You are using gRPC C++, Python, or Ruby. * You are running a gRPC Server in one

[grpc-io] Re: grpc ClientAsyncReaderWriter::Write() crashes: !byte_buffer->Valid()

2023-08-16 Thread 'AJ Heller' via grpc.io
Yes, you need to wait for the Write itself to complete before you can attempt another Write. It isn't really an issue of efficiency, it's more about the nature of a network connection, and a mechanism to signal to the application that another write can proceed. See

[grpc-io] Re: gRPC stuck in epoll_wait state

2022-05-17 Thread 'AJ Heller' via grpc.io
If you're still having this issue, it would be worth trying to upgrade to gRPC v1.46.0 or newer. The default polling engine has been removed, so if there is still an underlying bug in gnmi or gRPC, it may show up in some other way. On Monday, December 13, 2021 at 4:43:01 PM UTC-8 nupur

[grpc-io] Re: limiting grpc memory usage

2022-06-13 Thread 'AJ Heller' via grpc.io
Which gRPC library are you using? And which language? C++, Java, Python, etc On Monday, June 6, 2022 at 11:42:26 AM UTC-7 amandee...@gmail.com wrote: > So, we identified that it might be because of > CodedInputStream::ReadStringFallback in protocol buffers. > We do not reserve the buffer upfront

[grpc-io] Re: C++ Async Server Performance Issue

2022-06-13 Thread 'AJ Heller' via grpc.io
It's hard to tell, given there are a few variables here. Are you running ghz on the same machine as the gRPC server? How many threads are being spawned in both scenarios? It might be valuable for you to run something like perf and analyze the results to see where both processes are spending

Re: [grpc-io] Alpine package for `grpc-cli` is broken in alpine 3.15

2022-06-14 Thread 'AJ Heller' via grpc.io
I believe this should be fixed in the apline package build file. I've CC'd the maintainer. https://git.alpinelinux.org/aports/tree/community/grpc/APKBUILD?h=3.15-stable On Tue, May 31, 2022 at 3:40 PM Blaine Nelson wrote: > When I build the following docker image: > > ``` > FROM alpine:3.15 >

[grpc-io] Re: what's difference between synchronous and asynchronous and callback for server?

2022-06-14 Thread 'AJ Heller' via grpc.io
Assuming we're talking about the C/C++ library, you're partially correct. Both the sync and callback API use multiple threads under the hood, created by gRPC. The Async CQ-based API requires the application to donate threads, so the thread count is controlled by you for the most part. For best

[grpc-io] Re: Server to client inverted rpc calls

2022-08-24 Thread 'AJ Heller' via grpc.io
I'm not familiar with third-party solutions in this space, but I don't believe there's a better answer today for reverse-tunneling with gRPC alone. The tracking issue for the work is here: https://github.com/grpc/grpc/issues/14101. You can manually wire this sort of thing up using BiDi

[grpc-io] Re: gRPC C++ callback API

2022-10-19 Thread 'AJ Heller' via grpc.io
That's fine. You can replace the Wait call with `absl::SleepFor(absl::Seconds(42))` and it should work fine since the callback API does not need to borrow threads from the application. At shutdown, you'll still may want to wait on the gRPC server to finish doing its job before exiting, but

Re: [grpc-io] Re: gRPC C++ callback API

2022-10-21 Thread 'AJ Heller' via grpc.io
l > Next() or AsyncNext() on a completion queue. > > On Wed, Oct 19, 2022 at 11:36 AM 'AJ Heller' via grpc.io < > grp...@googlegroups.com> wrote: > >> That's fine. You can replace the Wait call with >> `absl::SleepFor(absl::Seconds(42))` and it should work fine s

[grpc-io] Re: grpc crash during streaming call

2022-09-13 Thread 'AJ Heller' via grpc.io
I see. I'm guessing that's your system package, maybe on Ubuntu or Debian? Please try a build with the latest official release from https://github.com/grpc/grpc/releases. We are on v1.48 now, the v1.30 release is 2 years old and outside of our maintenance window. Numerous bug fixes and

[grpc-io] Re: grpc crash during streaming call

2022-09-11 Thread 'AJ Heller' via grpc.io
What version of gRPC are you using? Can you try with the latest release? The ru_alloc_slices code was rewritten a while ago, and it would be valuable to see if this bug still shows up or not. On Tuesday, September 6, 2022 at 5:16:52 AM UTC-7 pragadeesh...@gmail.com wrote: > I am running grpc

[grpc-io] Re: grpc stops forward progress if DNS resolve has 0 addresses

2022-08-05 Thread 'AJ Heller' via grpc.io
That's mysterious, do you know what the state of the DNS records are when this occurs? And would it be possible for you to upgrade your gRPC library and try to reproduce this? v1.36.4 is over a year old, and a fair handful of bug fixes have gone in since then. We've been unable to reproduce

[grpc-io] Re: C++: how to handle blocking code from callback reactor

2022-12-01 Thread 'AJ Heller' via grpc.io
> Am I correct in assuming that I need to call my blocking application code in a new thread and pass the reactor (along with req/resp) to that new thread such that it can call reactor->Finish() once the work is done? Yes, that's the most general recommendation, which you can find further down

[grpc-io] Re: Adding Named Pipes feasibilty.

2023-02-22 Thread 'AJ Heller' via grpc.io
If you're asking about Named Pipes on Windows, there is no support at the moment. On posix systems, if you have a raw file descriptor for a named pipe, I believe you can create a channel from it using `CreateCustomInsecureChannelFromFd`:

[grpc-io] Re: callback API and details on threading model

2023-03-29 Thread 'AJ Heller' via grpc.io
Sometime this year, gRPC C++ will switch to by default have a single auto-scaling thread pool per process, and all of gRPC's threaded activities will utilize it. Applications will have some control over this, though, by being able to provide custom EventEngine instances per channel or per

[grpc-io] gRPC-Core Release 1.52.0

2023-02-09 Thread 'AJ Heller' via grpc.io
This is the release announcement for gRPC-Core 1.52.0 (gribkoff ), covering the core library and the wrapped languages C++, C#, Objective-C, Python, PHP and Ruby. The release can be found here

[grpc-io] Re: Number of threads created in grpc internally

2023-07-12 Thread 'AJ Heller' via grpc.io
I think you'll find these threads answer your question: https://groups.google.com/g/grpc-io/c/j1A0CY0YG-A/m/W0H6UrkHAwAJ https://stackoverflow.com/a/76591101/10161 Best, -aj On Monday, July 10, 2023 at 5:04:00 AM UTC-7 Softgigant S wrote: > Hello! > > May I ask, how to setup or manipulate

[grpc-io] Re: How to custom channel(endpoint)? [C++]

2023-06-20 Thread 'AJ Heller' via grpc.io
The gRPC public API now provides a way for custom endpoint implementations to be provided to the library. It's called the EventEngine API, and you can read the generated API docs here (though I

Re: [grpc-io] grpc executor threads

2023-05-16 Thread 'AJ Heller' via grpc.io
Hello all, I want to offer a quick update. tl;dr: Jeff's analysis is correct. The executor is legacy code at this point, slated for deletion, and increasingly unused. We have been carefully replacing the legacy I/O, timer, and async execution implementations with a new public EventEngine

[grpc-io] gRPC-Core Release 1.57.0

2023-08-14 Thread 'AJ Heller' via grpc.io
This is the 1.57.0 (grounded ) release announcement for gRPC-Core and the wrapped languages C++, C#, Objective-C, Python, PHP and Ruby. Latest release notes are here . This release

[grpc-io] Re: On Windows, where are trust certificates stored?

2024-02-13 Thread 'AJ Heller' via grpc.io
I think this is a general Windows problem, nothing gRPC-specific you'd want to do here. A quick googling turned up this: https://learn.microsoft.com/en-us/skype-sdk/sdn/articles/installing-the-trusted-root-certificate On Monday, February 12, 2024 at 8:07:11 AM UTC-8 Andrew Bay wrote: > gRPC is

[grpc-io] Re: Setting gRPC internal threads' affinity

2024-02-06 Thread 'AJ Heller' via grpc.io
Dan, Replying here on the mailing list thread. > Thanks AJ! > > Using taskset is not an option for me, as my gRPC server is part of the executable that also does the more sensitive work IO load work. So what I need is an internal process differentiation between the threads' affinity. You

[grpc-io] Re: Setting gRPC internal threads' affinity

2024-02-05 Thread 'AJ Heller' via grpc.io
Hi Dan, If you're interested in CPU affinity for the entire server process on Linux, you can use `taskset` https://linux.die.net/man/1/taskset. Otherwise, you'll likely want to patch `thd.cc` and use pthread's affinity APIs, but I don't recommend it. For more advanced use cases with the C/C++

[grpc-io] Re: Using gRPC on localhost

2024-01-30 Thread 'AJ Heller' via grpc.io
Hi Dimitris, AF_UNIX support is being added to Windows platforms, you can follow the work here: https://github.com/grpc/grpc/pull/34801 Best, -aj On Sunday, January 21, 2024 at 3:27:58 PM UTC-8 Dimitris Servis wrote: > I want to use gRPC for IPC, on localhost, using C++, in particular for >

[grpc-io] Re: Using gRPC on localhost

2024-01-30 Thread 'AJ Heller' via grpc.io
Sorry, to clarify, the gRPC C/C++ library is getting support for unix sockets on Windows. As you pointed out, other languages/libraries/platforms already have that support. On Tuesday, January 30, 2024 at 10:23:10 AM UTC-8 AJ Heller wrote: > Hi Dimitris, > > AF_UNIX support is being added to

[grpc-io] Re: Plugin failed with status code

2024-03-26 Thread 'AJ Heller' via grpc.io
Did you follow the quickstart guide to build and install gRPC and protocol buffers using cmake? https://grpc.io/docs/languages/cpp/quickstart/ Best, -aj On Monday, March 25, 2024 at 11:09:41 PM UTC-7 Suraj Kottayi wrote: > How do i generate code using cmake, during configuration.?? > The issue

[grpc-io] Re: How to resolve potential grpc::ClientBidiReactor data racing

2024-03-26 Thread 'AJ Heller' via grpc.io
Hi Zhanhui, Just in case, please read through the callback API spec to refamiliarize yourself: https://github.com/grpc/proposal/blob/master/L67-cpp-callback-api.md Note that you can only have one outstanding read or write at a time. If you are calling StartWrite while a previous write's

[grpc-io] Re: Issue in cross compiling grpc for armv7l architecture

2024-04-15 Thread 'AJ Heller' via grpc.io
I don't use CMake, but I believe you can pass `-DgRPC_USE_SYSTEMD=OFF` (based on https://github.com/grpc/grpc/blob/84ee28e6956ed7cd51462aad52e64782dd5ca34b/cmake/systemd.cmake#L17) Hope this helps, -aj On Wednesday, April 10, 2024 at 7:00:30 AM UTC-7 Pragadeesh nagaraj wrote: > Need help on