Re: [grpc-io] Error with building io.grpc.ManagedChannelRegistry

2024-05-28 Thread 'Eric Anderson' via grpc.io
The problem here is maven-assembly-plugin breaks SPI "services," because by default it fails to combine some magic files together. This causes the dns name resolver to not be found, and can prevent some transports and load balancers also to not be found. You need to configure it to use the

Re: [grpc-io] gRPC 1.55 Throughput Drop when Client Send Rate Increase

2024-05-14 Thread 'Eric Anderson' via grpc.io
On Sun, May 12, 2024 at 11:03 AM Yunhao Bai wrote: > When we are performing performance test and try to test the throughput for > the gRPC server, we find there is a very strange behavior: When we increase > the rate for unary RPC call to the gRPC server (e.g., from 15k rps to 50 > rps), we see

Re: [grpc-io] What is the suggested way to use onError on StreamObserver?

2024-04-23 Thread 'Eric Anderson' via grpc.io
On Sat, Apr 13, 2024 at 9:23 AM Debraj wrote: > I did not quite understand the statement - "*It will respond > with Status.UNKNOWN and interceptors might get confused"* . > > Let's say I do not have the try - catch in the purge() method and I have > a ServerInterceptor like below. > If you

Re: [grpc-io] GRPC client getting error while connecting to service UNAVAILABLE

2024-04-22 Thread 'Eric Anderson' via grpc.io
+grpc-io error:UNAVAILABLE isn't a format that grpc-java uses. This may be your own logging. You'll need to find it and include more information from the Status. In particular, status.getDescription() and sometimes getCause() have useful information. On Sat, Apr 20, 2024 at 2:03 AM shobhit

Re: [grpc-io] [grpc-Java] Query regarding ping deadline exceeded

2024-04-19 Thread 'Eric Anderson' via grpc.io
On Fri, Apr 12, 2024 at 11:53 AM R Chinmay wrote: > In both cases we receive a generic log with status DEADLINE_EXCEEDED. I see "[grpc-Java]" in the email subject. Are you actually using grpc-java? gRPC Java provides a lot of information in the string part of the status. > 1. Can you provide

Re: [grpc-io] GRPC client getting error while connecting to service UNAVAILABLE

2024-04-19 Thread 'Eric Anderson' via grpc.io
On Thu, Apr 18, 2024 at 1:28 PM shobhit agarwal wrote: > suddenly it started failing with error:UNAVAILABLE while service was up > and running > What was the error message? -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this

Re: [grpc-io] gRPC-Java Netty server handling of CONTINUATION frames

2024-04-11 Thread 'Eric Anderson' via grpc.io
Netty (and by extension gRPC Netty) is not affected. On Thu, Apr 11, 2024 at 1:56 PM jamesne...@gmail.com < jamesnether...@gmail.com> wrote: > Hi, > > Given the recent news around vulnerabilities in the handling of of HTTP/2 > CONTINUATION frames: > > >

Re: [grpc-io] What is the suggested way to use onError on StreamObserver?

2024-04-11 Thread 'Eric Anderson' via grpc.io
If validator.validate() and service.purge() can throw, then you want a try-catch. You must call onCompleted() or onError() on the observer for the RPC to complete (and thus release its memory). gRPC does have some handling for exceptions thrown by the service method, but it is a worst-case backup.

Re: [grpc-io] Channel Management from server side

2024-04-03 Thread 'Eric Anderson' via grpc.io
On Wed, Mar 27, 2024 at 7:15 AM Darshan J Gowda wrote: > Question: > We discussed some on Gitter. https://app.gitter.im/#/room/#grpc_grpc:gitter.im/$h_WHhXb5S4tREY8Z12CS5VXwaoot6ELcnn51vtW2LmE > >1. > >Is there a way for server to end a channel of a particular client if >it wishes

Re: [grpc-io] Versioning: New features for existing RPCs

2024-03-20 Thread 'Eric Anderson' via grpc.io
Other options in no particular order: 1. Have a repeated extensions field of type Any. An unknown message type should cause the server to fail the RPC. This is nicer than (b) because you can't forget to change the version when expecting a new feature, and it allows servers to

Re: [grpc-io] URGENT: Sending async response over grpc

2024-03-20 Thread 'Eric Anderson' via grpc.io
+grpc-io, so Go folks can answer On Tue, Mar 19, 2024 at 9:05 PM Abhijeet Tiwari wrote: > Hey, thanks a lot for the response! > > My server is actually written in golang. > I also wanted to know that I'll have to use a combination of for loop with > some time.Sleep() maybe to keep the server

Re: [grpc-io] who else is looking for an active (discord) community?

2024-03-19 Thread 'Eric Anderson' via grpc.io
The "Unofficial gRPC Community" Discord server from the last discussion was essentially a failed experiment. People joined, but there was not a *single* discussion. Gitter actually has some activity, so it isn't dead but rather

Re: [grpc-io] URGENT: Sending async response over grpc

2024-03-19 Thread 'Eric Anderson' via grpc.io
On Wed, Mar 13, 2024 at 1:11 PM Abhijeet Tiwari wrote: > 1) let's say a java based client that has opened a server streaming rpc > 2) after this, we are to receive some info through a webhook on our > server, but it might take some time > 3) we have to send this info received over webhook to the

Re: [grpc-io] GRPC_ARG_HTTP2_MAX_PING_STRIKES in Java

2024-02-20 Thread 'Eric Anderson' via grpc.io
Yeah, app_requested looks part of normal server.shutdown() flow. But it probably isn't the true cause of the error. What is probably happening is the RPC isn't completing in time and then you call server.shutdownNow(), which closes the connection. That connection closure is what actually causes

Re: [grpc-io] Re: [gRPC-Java] Degradation with larger number of Repeated elements

2024-02-20 Thread 'Eric Anderson' via grpc.io
I've not forgotten about your issue. It is likely not grpc-java related, so I've been trying to find some time to make a Java client and show it doesn't have the same change in performance. On Tue, Feb 20, 2024 at 7:22 AM Asha M.J wrote: > Could someone please help here? > > On Friday,

Re: [grpc-io] GRPC_ARG_HTTP2_MAX_PING_STRIKES in Java

2024-02-06 Thread 'Eric Anderson' via grpc.io
Java does not have a setting for adjusting the maximum ping strikes. Why do you need to adjust it? Typically adjusting it higher doesn't change whether the connection would get killed. It just delays it a little bit. On Wed, Jan 31, 2024 at 2:52 PM James M wrote: > Hi, > > In Java, is there a

Re: [grpc-io] TCP connections per channel

2024-01-17 Thread 'Eric Anderson' via grpc.io
On Wed, Jan 17, 2024 at 12:50 PM Kumaran Loganathan < kumaranloganatha...@gmail.com> wrote: > How many TCP connections does a channel create and manage provided the DNS > resolution of the server resolves to one ip address? Technically, this is a decision that the client-side LB policy makes.

[grpc-io] gRPC-Java 1.60.0 Released

2023-12-05 Thread 'Eric Anderson' via grpc.io
The v1.60.0 release is now available. API Changes - api: Stabilize ForwardingServerBuilder, ForwardingChannelBuilder2, and ForwardingChannelBuilder. Note that ForwardingChannelBuilder is stabilized (no changes will be made to it),

[grpc-io] gRPC-Java v1.59.1 Released

2023-11-28 Thread 'Eric Anderson' via grpc.io
The v1.59.1 release is now available. - netty: Implement Http2Headers.isEmpty(). This fixes compatibility with Netty 4.1.101.Final. - netty: Add NettyServerBuilder.maxRstFramesPerWindow(). This can be used to limit impact of

Re: [grpc-io] Grpc - Java server side streaming handling backpressure

2023-11-28 Thread 'Eric Anderson' via grpc.io
On Thu, Nov 16, 2023 at 2:44 PM Vivek Shindhe wrote: > But this leads to a thread block situation, while the main thread is > waiting to restart again the "onReadyHandler" is never invoke which blocks > the publishing to the stream. Seems you already have an understanding of the situation.

Re: [grpc-io] Grpc Java server test for ServerInterceptors

2023-11-28 Thread 'Eric Anderson' via grpc.io
On Mon, Nov 27, 2023 at 3:02 PM John Wilson wrote: > Is this implementation correct? > Looks fine. Is this thread safe? > Context is immutable (although the values could be mutable, but then you'd be responsible for synchronization). And the "current" Context is stored in a ThreadLocal. So,

Re: [grpc-io] Switching from direct executor to threaded executor after rate limiting

2023-11-22 Thread 'Eric Anderson' via grpc.io
On Tue, Nov 14, 2023 at 11:44 AM Krishna Sai Veera Reddy < krishnasaiveerareddy...@gmail.com> wrote: > >Is there a problem with running it on another thread? > This basic rate limiter just increments/decrements a counter and nothing > more so it seems wasteful to use a thread to do this. >

Re: [grpc-io] Switching from direct executor to threaded executor after rate limiting

2023-11-14 Thread 'Eric Anderson' via grpc.io
On Wed, Nov 8, 2023 at 9:46 AM Krishna Sai Veera Reddy < krishnasaiveerareddy...@gmail.com> wrote: > I am implementing a gRPC service and have a use-case where I need to rate > limit RPC calls but would like the rate limiting server interceptor to run > directly on the network thread as it is

Re: [grpc-io] Interrupted exception when using blocking call with stubs reuse

2023-11-14 Thread 'Eric Anderson' via grpc.io
gRPC does not interrupt threads. So if you are seeing thread interruption, that is triggered by your code. Also, without the full exception, there's not much to go on (and interruption is generally hard to figure out even with the full exception). Stubs and channels are thread-safe, so you don't

Re: [grpc-io] Re: How to look up server?

2023-09-25 Thread 'Eric Anderson' via grpc.io
IServiceManager looks to be only for Binder, so it doesn't make sense to use it with a plain HTTP/2. You'd need to know the port the server is running on for that. But your high-level goals are unclear. So you'd have to give more background on your use-case for me to give a better reply, as you

Re: [grpc-io] Java 8 / Java 11 support timeline in gRPC?

2023-09-06 Thread 'Eric Anderson' via grpc.io
Yeah... It's been hard to have clear messaging here, because we've been trying to figure it out. The messaging is mostly avoiding over-promising, but where "in practice" fits in is still murky. gRFC P5 says we could have "dropped" Java 8 already. That's obviously not happened. v1.57.0 did have

Re: [grpc-io] gRPC netty NoRouteToHostException

2023-08-28 Thread 'Eric Anderson' via grpc.io
It is unlikely this is related to overloading the backends, unless some monitoring system thinks the backends are broken and reboots/replaces them. This is a network error, where packets can't be sent from your client to the server. For example, if someone unplugged a network cable, this is the

Re: [grpc-io] Re: After the channel is created, it takes 1000+ms to transition from IDEL state to CONNECTING state.How can i reduce the time required to change state?

2023-08-28 Thread 'Eric Anderson' via grpc.io
This was also discussed on Stack Overflow . I filed https://github.com/grpc/grpc-java/issues/10517 for the delayed transition to CONNECTING. It won't change performance any,

Re: [grpc-io] gRPC netty NoRouteToHostException

2023-08-14 Thread 'Eric Anderson' via grpc.io
You get that exception because all backends failed to be connected to. I expect this is a server deployment-approach problem. Does the service do a rolling restart? The only thing the client can do to avoid the error is use stub.withWaitForReady(). But that implies you care more about reliability

[grpc-io] gRPC-Java v1.57.1 Released

2023-08-02 Thread 'Eric Anderson' via grpc.io
The v1.57.1 release is now available. Bug fixes - Fix compatibility with Java 8. This fixes the NoSuchMethodError for ByteBuffer methods present in 1.57.0 (#10441 ) - xds: Remove

Re: [grpc-io] using native java 11 alpn with gprc-java?

2023-07-12 Thread 'Eric Anderson' via grpc.io
TL;DR: you can use gRPC fine without native dependencies, but you might see lesser performance. OpenJDK backported the "Java 9 ALPN API" to Java 8, so you don't need netty-tcnative at all for ALPN. We still use it because it provides a large performance impact on Java 8, and it may provide some

[grpc-io] Re: GRPC Server Reflection

2023-07-05 Thread 'Eric Anderson' via grpc.io
What language are you using? Why would the gRPC server reflection have any dependency injection? On Saturday, July 1, 2023 at 9:43:05 AM UTC-7 chand...@codeprism.in wrote: > What could be causing the issue where dependency injection is not properly > initializing when invoking rpc call using

Re: [grpc-io] Client-Side xDS Not Handling Removed Endpoints

2023-05-19 Thread 'Eric Anderson' via grpc.io
There's a 15 minute timer for localities. See gRFC A56 Priority LB Policy . Which localities are provided by control planes can be unstable, so old localities are preserved for a while in case the

Re: [grpc-io] gRPC client side request throttling

2023-05-19 Thread 'Eric Anderson' via grpc.io
This has been responded to at https://github.com/grpc/grpc-java/issues/10164 On Thu, May 11, 2023 at 8:05 AM Bhuvi Viji wrote: > Hi, > > Currently we are doing some performance testing with our gRPC based > server and client apps and below are the Observations with the test results > and Need

[grpc-io] gRPC Java v1.55.1 Released

2023-05-09 Thread 'Eric Anderson' via grpc.io
The v1.55.1 release is now available. The 1.55.0 release failed. There were no artifacts published for it. API Changes - services: Rename MetricRecorder.setQps/clearQps to setQpsMetric/ clearQpsMetric (#10031

Re: [grpc-io] gRPC message validation question

2023-05-04 Thread 'Eric Anderson' via grpc.io
On Thu, May 4, 2023 at 7:29 AM Brad Post wrote: > Okay thanks, but then what is the recommended way of "defending" bad > requests. > Ignore this case and just validate requests like you normally would if it were the proper type. You can use this as a reminder that if you persist client-created

Re: [grpc-io] gRPC message validation question

2023-05-03 Thread 'Eric Anderson' via grpc.io
No, there is no validation. The type arguments are implicit given the method, and there's no communication that would tell you that there is a mis-match. The only time you'd need such a thing is if you change the request/response message in the proto, so "don't do that." Instead, create a new

Re: [grpc-io] how to make a grpc call using http2

2023-05-02 Thread 'Eric Anderson' via grpc.io
I took a look at this with Java server, and it actually works without issue. So, yeah, I think any issue you experienced was the server trying to decode the JSON message as a protobuf. To test this with Java, you can use the HelloJsonServer. Add

[grpc-io] gRPC-Java 1.50.3 Released

2023-04-13 Thread 'Eric Anderson' via grpc.io
The v1.50.3 release is now available. Bug Fixes - core: Free unused MessageProducer in RetriableStream (#9853 ), fixing a Netty buffer memory leak for cancelled RPCs -- You received

Re: [grpc-io] io.grpc.internal.ManagedChannelImpl$NameResolverListener handleErrorInSyncContext

2023-03-24 Thread 'Eric Anderson' via grpc.io
> java.net.UnknownHostException: Host sconosciuto (voloOK) The host name does not exist. Check the spelling, search path, or which DNS server your machine is configured to use. You can use `ping` to check if DNS resolution is working as you expect. On Wed, Mar 22, 2023 at 7:41 AM VALENTINA FERRO

Re: [grpc-io] Re: How does gRPC maintain sessions securely?

2023-03-21 Thread 'Eric Anderson' via grpc.io
gRPC's security model is generally the same as in HTTP. A streaming RPC is simply one HTTP exchange, where the HTTP request and HTTP response can overlap in time. Since you've used HTTP for a while, I'll note that gRPC does not support OAuth HMACs nor "authenticate on first request" like NTLM. >

Re: [grpc-io] grpc vs rest benchmark

2023-02-27 Thread 'Eric Anderson' via grpc.io
I hate to sound like a broken record, but without the code, there's little I can do. I don't know what you are benchmarking, so I can't explain the results. I'm glad to hear that using a fixed thread pool helped, although I don't know what the previous code was doing (whether you were using the

Re: [grpc-io] Routing a grpc server to a url without port with Apache

2023-02-24 Thread 'Eric Anderson' via grpc.io
Right, that's what I was discussing. You can't generally configure gRPC clients to use a path prefix. I'd suggest routing by service name, but some people route by Content-Type (which is technically wrong from an HTTP perspective, but doesn't generally hurt much and is very easy). On Fri, Feb 24,

Fwd: [grpc-io] grpc vs rest benchmark

2023-02-23 Thread 'Eric Anderson' via grpc.io
Oops. Failed to cc the mailing list. There was a reply to this saying the JVM was warm. I maintained that without the actual benchmark code it is hard to diagnose. -- Forwarded message - From: Eric Anderson Date: Tue, Feb 21, 2023 at 9:08 AM Subject: Re: [grpc-io] grpc vs rest

Re: [grpc-io] Routing a grpc server to a url without port with Apache

2023-02-23 Thread 'Eric Anderson' via grpc.io
(Sorry for the moderation delay here. The spam detection kicked in; false positives are pretty rare so it isn't checked super regularly. I approved just one of the duplicate emails.) The problem here is probably the "/rpc". gRPC doesn't use the /rpc prefix. It uses /package.Service/Method, so

[grpc-io] gRPC-Java 1.45.3

2023-01-18 Thread 'Eric Anderson' via grpc.io
The v1.45.3 release is now available. This release is unrelated to the recent xDS bug release fixes that impacted 1.51 and 1.52. Bug Fixes - core: Fix retry causing memory leak for canceled RPCs. (#9360

[grpc-io] Re: grpc-java xDS regression in 1.51.0, 1.51.1, 1.52.0

2023-01-18 Thread 'Eric Anderson' via grpc.io
grpc-java 1.51.3 and 1.52.1 are released which have the fix for this issue. If you use the latest patch release of any grpc minor version, then there is no longer risk of being impacted (earlier versions were before the bug, and later versions now have patch releases with the fix). On Wed, Jan

[grpc-io] grpc-java xDS regression in 1.51.0, 1.51.1, 1.52.0

2023-01-11 Thread 'Eric Anderson' via grpc.io
We have discovered a regression in grpc-xds starting with 1.51.0 where resources might stop receiving updates. The trigger could happen hours or days after the binary had started. xDS users should avoid 1.51.0, 1.51.1, and 1.52.0. We suggest using 1.50.x until patch releases with the fix are

[grpc-io] gRPC-Java 1.50.0 released

2022-10-12 Thread 'Eric Anderson' via grpc.io
The v1.50.0 release in now available. New Features - okhttp: Added connection management features to okhttp server, including maxConnectionIdle(), permitKeepAliveTime(), and permitKeepAliveWithoutCalls() (#9494

[grpc-io] gRPC-Java 1.41.3 Released

2022-10-07 Thread 'Eric Anderson' via grpc.io
The v1.41.3 release is now available. Dependencies - Bump protobuf to 3.19.6 -- 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

[grpc-io] gRPC-Java 1.36.3 Released

2022-10-07 Thread 'Eric Anderson' via grpc.io
The v1.36.3 release is now available. Dependencies - Bump protobuf to 3.16.3 -- 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

[grpc-io] Protobuf Java DoS CVE-2022-3171

2022-10-04 Thread 'Eric Anderson' via grpc.io
Protobuf versions prior to 3.21.7 suffer from CVE-2022-3171 . Notably, the fix requires regenerating code, so make sure your protoc version is upgraded and you verify important dependencies have rebuilt their

Re: [grpc-io] breaking functionality with netty-handler upgrade | 5.0.0.Alpha2

2022-08-30 Thread 'Eric Anderson' via grpc.io
On Tue, Aug 30, 2022 at 12:28 AM vivek Baranwal wrote: > I have upgraded netty-handler jar version recently from 4.1.77.Final > to 5.0.0.Alpha2 but looks like my GRPC call is getting failed in between > because of this upgrade. > You can't upgrade gRPC to Netty 5. The netty namespace is

Re: [grpc-io] extracting master-key for wireshark using JsseProvider

2022-08-29 Thread 'Eric Anderson' via grpc.io
On Mon, Aug 29, 2022 at 9:39 AM Eric Anderson wrote: > You can use `-Dio.netty.transport.noNative=true` or > `-Dio.grpc.netty.shaded.io.netty.transport.noNative=true` to disable > loading tcnative, depending on whether you are using grpc-netty or > grpc-netty-shaded, respectively. > Oops.

Re: [grpc-io] extracting master-key for wireshark using JsseProvider

2022-08-29 Thread 'Eric Anderson' via grpc.io
On Fri, Aug 26, 2022 at 6:00 AM Elhanan Maayan wrote: > if i understand correctly if i wish to extract the master key for > wireshark sniffing > i need to use this: > GrpcSslContexts.configure(sslContextBuilder, Security.getProvider > ("SunJSSE")); > FYI, there was a PR

Re: [grpc-io] Help understand DNS resolution between client and Nginx Ingress

2022-08-25 Thread 'Eric Anderson' via grpc.io
On Sun, Aug 21, 2022 at 10:32 AM Staniel Yao wrote: > I think it's because the MAX_CONNECTION_AGE is only affecting the > connection between Nginx and backend and doesn't affect the client > connection to Nginx itself. Am I right on this? > Correct. The necessary configuration would be in

Re: [grpc-io] Cache response in ServerInterceptor

2022-08-01 Thread 'Eric Anderson' via grpc.io
> > at > com.alibaba.csp.sentinel.adapter.grpc.SentinelGrpcServerInterceptor$1.close(SentinelGrpcServerInterceptor.java:77) > ~[sentinel-grpc-adapter-1.7.1.jar:?] > at > com.opay.ccp.proxy.interceptor.IdempotentInterceptors.interceptCall(IdempotentInterceptors.java:71) > ~[classes/:?] >

Re: [grpc-io] Cache response in ServerInterceptor

2022-07-25 Thread 'Eric Anderson' via grpc.io
That interceptor looks fine. Note that the issue could be in a different interceptor. On Fri, Jul 22, 2022 at 7:03 PM jinxiang lang wrote: > java.lang.IllegalStateException: java.lang.IllegalStateException: call > already closed > ... > Caused by: java.lang.IllegalStateException: call

Re: [grpc-io] Guaranteed in-order delivery of streamed messages?

2022-07-25 Thread 'Eric Anderson' via grpc.io
gRPC guarantees that when you receive a message on the stream you have received all previous messages on that stream. Messages can be lost in cases you wouldn't be surprised, like if you get an error. On Mon, Jul 25, 2022 at 2:41 PM Davor Cubranic wrote: > The core concepts document states "

[grpc-io] gRFC A54: Restrict Control-Plane Status Codes

2022-07-22 Thread 'Eric Anderson' via grpc.io
This is the discussion thread for https://github.com/grpc/proposal/pull/314 Abstract: The gRPC control plane has no need to use many of the status codes yet communicates with external services whose status codes may accidentally be copied to the data plane. This gRFC restricts the allowed status

Re: [grpc-io] gRPC java: what is the best practice to overcome the setter challenge

2022-07-22 Thread 'Eric Anderson' via grpc.io
On Thu, Jul 7, 2022 at 5:30 AM Vahab Jabrayilov wrote: > Since, they don't have any setters associated with them I cannot use those > classes in my main logic; > "Can't" is a bit strong. You could use the immutable objects in your logic, but I'd agree that produces a very different code

Re: [grpc-io] Cache response in ServerInterceptor

2022-07-22 Thread 'Eric Anderson' via grpc.io
If it is just based on the metadata token (which is suspicious), then just respond in-line: String token = headers.get(CLIENT_HEADER_KEY); RespT resp = (RespT) select(token); if (resp != null) { call.sendHeaders(new Metadata()); call.sendMessage(resp); call.close(Status.OK, new Metadata());

Re: [grpc-io] gRPC Java: snapshots

2022-07-19 Thread 'Eric Anderson' via grpc.io
v1.48.0 was scheduled for last week, but there were some testing delays that delayed it to this week. The build will likely happen today or tomorrow with the announcement the day after. There's some evidence of the release process in-progress. On Mon,

Re: [grpc-io] gRPC Java: snapshots

2022-06-28 Thread 'Eric Anderson' via grpc.io
I assume you are wanting to test the Netty upgrade. I don't recall if the version we upgraded to has the linker fix. In any case, I've published a snapshot build to https://oss.sonatype.org/content/repositories/snapshots/ On Tue, Jun 28, 2022 at 6:44 AM Паша Варченко wrote: > I'm looking for a

Re: [grpc-io] Using gRPC for server client communication in a java desktop app

2022-06-22 Thread 'Eric Anderson' via grpc.io
On Tue, Jun 21, 2022 at 4:51 AM Rohm wrote: > Hello, I would like to hear what you people think about approach mentioned > in the title in general. Nothing is strange about this use-case. gRPC would be fine. REST and gRPC are very similar for this use case, from a networking perspective. - In

Re: [grpc-io] Accessing NettyServiceHandler for grpc-java

2022-06-22 Thread 'Eric Anderson' via grpc.io
On Tue, Jun 14, 2022 at 6:39 PM Doug DesCombaz wrote: > Some issues: > 1) I don't think I can use the NettyServerBuilder() because it expects a > shadowed version of the event loops. In other words, the GRPC project > brings in the Netty code and repackages, so many classes can't be used >

Re: [grpc-io] Is gRPC actually compatible with HTTP semantics?

2022-05-04 Thread 'Eric Anderson' via grpc.io
On Thu, Apr 28, 2022 at 10:03 PM Samuel Williams < space.ship.travel...@gmail.com> wrote: > Hello, I'm the maintainer of an HTTP client/server covering HTTP/1 & 2. I assume this is related to https://github.com/socketry/async-http/pull/92 . I saw the thread, but it seemed to resolve reasonably

[grpc-io] gRPC Java v1.46.0 Released

2022-04-28 Thread 'Eric Anderson' via grpc.io
The v1.46.0 release is now available. Bug Fixes - netty: Fixed incompatibility with Netty 4.1.75.Final that caused COMPRESSION_ERROR (#9004 ) - xds: Fix LBs blindly propagating control

Re: [grpc-io] Spec clarification about multi-value custom metadata -> HTTP/2 headers

2022-04-25 Thread 'Eric Anderson' via grpc.io
On Thu, Apr 14, 2022 at 4:13 PM Peter Wiese wrote: > Per the gRPC over HTTP/2 spec > https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests > > I read that as either form is acceptable. If that is true my other > question is if a gRPC server receives headers in either form are

Re: [grpc-io] writing a grpc-based interface specification

2022-04-25 Thread 'Eric Anderson' via grpc.io
Depending on what you mean by "formal," https://github.com/googleapis/googleapis may be a good reference. If that's not what you're looking for, describe more of what you mean by "formal." (There are a couple different usages that vary by circumstance.) On Thu, Apr 21, 2022 at 5:56 AM Stefan

Re: [grpc-io] Re: serverCallStreamObserver.isCancelled() cannot detect client disconnection for gRPC version higher than 1.41.0

2022-04-18 Thread 'Eric Anderson' via grpc.io
On Fri, Apr 15, 2022 at 10:09 PM 'Wen Bo (Bill) Li' via grpc.io < grpc-io@googlegroups.com> wrote: > If this is the new approach, what would be the new best practice in terms > of code implementation on detecting client disconnection (using the > workaround you provided above)? > It's not really

Re: [grpc-io] Re: serverCallStreamObserver.isCancelled() cannot detect client disconnection for gRPC version higher than 1.41.0

2022-04-15 Thread 'Eric Anderson' via grpc.io
I've reproduced similar behavior, but I'm missing a piece to get it working. I am getting the same (apparently broken) behavior on v1.30.0, v1.40.0, and v1.41.0. So I'll need to fitz with it more. I've attached my seems-broken-all-the-time "reproduction." v1.41.0 has in its release notes

Re: [grpc-io] Issue in Reactive gRPC streaming: Sending GOAWAY failed:'Connection reset by peer'. Forcing shutdown of the connection. Broken pipe

2022-04-13 Thread 'Eric Anderson' via grpc.io
On Sat, Apr 9, 2022 at 12:53 AM pranjul tayal wrote: > With BloomRPC server is working fine. But when I am connecting server with > client then on CLI of client it shows "io.grpc.StatusRuntimeException: > UNAVAILABLE: io exception". > On CLI of server it shows "Debugger failed to attach:

Re: [grpc-io] GRPC Call blockingUnaryCall

2022-04-13 Thread 'Eric Anderson' via grpc.io
What are you accomplishing via the NameResolverFactory? The deprecation notice and the linked issue provide some guidance. But if you share your specific use case I can point you to the replacement approach. On Tue, Apr 12, 2022 at 8:45 AM EDMONDO SENA wrote: > Using

Re: [grpc-io] GRPC Call blockingUnaryCall

2022-04-12 Thread 'Eric Anderson' via grpc.io
It typically does a DNS resolution, connects to the addresses one-by-one until it finds one that works, does a TLS handshake, and the RPC exchange which includes the server's only latency. 15 seconds is a long time. I'd either expect the server is slow to respond or the networking is poor (e.g.,

Re: [grpc-io] I'm using Jetpack compose. How do I use grpc to print a value to the screen?

2022-04-08 Thread 'Eric Anderson' via grpc.io
gRPC can't print a value to the screen, but you can use gRPC to get a value that you then print on the screen. Generally grpc communication is done asynchronously and then the UI is updated once you have a result. You may be interested in the gRPC Kotlin documentation

Re: [grpc-io] Which term should I use: Interceptor or Middleware?

2022-04-08 Thread 'Eric Anderson' via grpc.io
We generally use the term interceptor, and that is the term used in the Go API itself. So interceptor means something pretty precise. On client-side Auth is commonly not implemented using an interceptor and instead may use PerRPCCredentials. But on server-side, authn/authz is an interceptor. If

Re: [grpc-io] GRPC Get Server Address

2022-04-08 Thread 'Eric Anderson' via grpc.io
What programming language are you using? On Fri, Apr 8, 2022 at 7:55 AM Mingyu Lu wrote: > Hi, > I am using GRPC with UNIX domain socket. I'd like to have one server > listen on two sockets A and B. > If requests come from A, I'd like to do something but if from B, I want to > do something

[grpc-io] gRPC Java v1.45.1 Released

2022-03-30 Thread 'Eric Anderson' via grpc.io
The v1.45.1 release is now available.Bug Fixes - netty: Fixed incompatibility with Netty 4.1.75.Final that caused COMPRESSION_ERROR (#9004 ) - xds: Fix LBs blindly propagating control

Re: [grpc-io] Re: How to correctly handle UNAVAILABLE: Abrupt GOAWAY returned from nginx

2022-03-14 Thread 'Eric Anderson' via grpc.io
On Sat, Mar 12, 2022 at 10:13 PM 'sanjay...@google.com' via grpc.io < grpc-io@googlegroups.com> wrote: > Upgrading to grpc 1.41 is definitely worth trying because of this > https://github.com/grpc/grpc-java/pull/8359 . > I agree, although that fix was backported to v1.40.0 (but use newer

Re: [grpc-io] combination of protoc version, protobuf-java, and grpc-java

2022-03-07 Thread 'Eric Anderson' via grpc.io
It sounds like you aren't using Maven or Gradle. For the generated code, if generating code with version X of protoc or the gRPC plugin, you need to use the corresponding Java components (runtime) at version X or later. You are using protoc 3.19.0, so you need to use protobuf-java 3.19.0 or

Re: [grpc-io] Interpretation of "updates_only" flag in the gnmi subscription request

2022-02-16 Thread 'Eric Anderson' via grpc.io
On Wed, Feb 16, 2022 at 4:36 AM Ashutosh Maheshwari < ashutosh.maheshw...@gmail.com> wrote: > Referring to the grpc specification of updates_only flag here - > https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-specification.md > > I would like to learn from the creator and users

Re: [grpc-io] Java 8 end of life for gRPC ?

2022-02-14 Thread 'Eric Anderson' via grpc.io
On Fri, Jan 28, 2022 at 7:19 AM 'Russell Shaw' via grpc.io < grpc-io@googlegroups.com> wrote: > Our company uses Java8 on Z/OS The TL;DR for all this stuff is probably: For Google Cloud users, overall I'd expect service-specific issues to crop up more than gRPC compatibility issues. For

Re: [grpc-io] call forwarding/chaining in grpc

2022-02-11 Thread 'Eric Anderson' via grpc.io
I have made a "grpc proxy" example in Java , which I've shared a few times

Re: [grpc-io] client StreamObserver is always getting messages in sequence

2022-02-11 Thread 'Eric Anderson' via grpc.io
On Tue, Feb 8, 2022 at 10:15 PM mayank kulshreshtha wrote: > the expectation was that the messages which i will receive in observer > will be out of order > StreamObserver (and ClientCall.Listener) are not thread-safe, so gRPC serializes callbacks into them. as ClientCallImpl.class has >

[grpc-io] gRPC Java v1.41.2 Released

2022-01-07 Thread 'Eric Anderson' via grpc.io
gRPC Java 1.41.2 is released and is available on Maven Central. It will take additional time to be indexed by search.maven.org, but it is in the repository. https://github.com/grpc/grpc-java/releases/tag/v1.41.2 Bug Fixes - core: fix a race condition when calling ManagedChannel.enterIdle() (

[grpc-io] Re: gRPC Java 1.42.2 Released

2022-01-07 Thread 'Eric Anderson' via grpc.io
Correction: Protobuf was upgraded to 3.18.2, not 3.19.2. On Thu, Jan 6, 2022 at 3:15 PM Eric Anderson wrote: > gRPC Java 1.42.2 is released and is available on Maven Central. It will > take additional time to be indexed by search.maven.org, but it is in the > repository. > >

[grpc-io] gRPC Java 1.42.2 Released

2022-01-06 Thread 'Eric Anderson' via grpc.io
gRPC Java 1.42.2 is released and is available on Maven Central. It will take additional time to be indexed by search.maven.org, but it is in the repository. https://github.com/grpc/grpc-java/releases/tag/v1.42.2 Bug Fixes - census: fixed a bug which in rare cases, a NullPointerException may

[grpc-io] gRPC Java v1.43.2 Released

2022-01-06 Thread 'Eric Anderson' via grpc.io
gRPC Java 1.43.2 is released and is available on Maven Central. It will take additional time to be indexed by search.maven.org, but it is in the repository. https://github.com/grpc/grpc-java/releases/tag/v1.43.2 Dependencies - Upgraded Protobuf to 3.19.2 to avoid CVE-2021-22569. See the

[grpc-io] Java/Kotlin: Protobuf DoS CVE-2021-22569

2022-01-06 Thread 'Eric Anderson' via grpc.io
All older versions of protobuf-java are vulnerable to a DoS when parsing a malicious protobuf message. Users of protobuf-java and protobuf-kotlin, which includes non-Android grpc-java and non-Android grpc-kotlin users, should upgrade to protobuf-java 3.16.1, 3.18.2, or 3.19.2. See the protobuf

[grpc-io] Re: gRFC P5: JDK Version Support Policy

2022-01-04 Thread 'Eric Anderson' via grpc.io
Bumping now that people are likely coming back online, to avoid being lost in holiday inboxes. On Thu, Dec 23, 2021 at 9:33 AM Eric Anderson wrote: > I've created a gRFC for the JDK version support policy: > https://github.com/grpc/proposal/pull/283 > > *gRPC Java users running Java 7 or Java 8

[grpc-io] gRFC P5: JDK Version Support Policy

2021-12-23 Thread 'Eric Anderson' via grpc.io
I've created a gRFC for the JDK version support policy: https://github.com/grpc/proposal/pull/283 *gRPC Java users running Java 7 or Java 8 should definitely read.* Those that don't have Java 17 plans yet should also take a look. The important part is the Proposal section, which is short. The

Re: [grpc-io] Custom HTTP headers with each packet

2021-12-09 Thread 'Eric Anderson' via grpc.io
What language is your server written in? gRPC's Metadata is sent as HTTP headers, so you want to add Metadata to each response. On Mon, Dec 6, 2021 at 9:43 PM gamer boii wrote: > My grpc server is reading a pcap file and sending it to a backend client. > Now, I want to add some custom HTTP

Re: [grpc-io] which port range is GRPC used.

2021-12-09 Thread 'Eric Anderson' via grpc.io
gRPC uses HTTP/2, so 80/443 would be the "standard" ports. But using a port under 1024 is annoying and unnecessary in data centers, so I think people just "choose a port." For a public-facing service, 443 would be the normal port. On Mon, Dec 6, 2021 at 11:01 PM Bhushan Patil wrote: > Hi, > I

Re: [grpc-io] [grpc-java] Change response headers based on response message?

2021-11-17 Thread 'Eric Anderson' via grpc.io
On Mon, Nov 15, 2021 at 8:30 AM Mansfield Mark wrote: > I'm trying to build an auth flow (email + OTP -> JWT) between a grpc-web > client and a grpc-java server, with an Envoy proxy between the two. I can't really speak to grpc-web too much. But I can help with the Java side. Just to make

Re: [grpc-io] GRPC client interceptors in Java and fault injection

2021-11-15 Thread 'Eric Anderson' via grpc.io
On Mon, Nov 15, 2021 at 12:55 AM Christopher Meiklejohn < christopher.meiklej...@gmail.com> wrote: > To achieve this, I've made a custom interceptor that throws an exception > (or, creates a Status of a particular type like FAILED_PRECONDITION, and > converting that to an exception) and throwing

Re: [grpc-io] What kind of header is expected to avoid having this UNKNOWN/UnsupportedOperationException issue?

2021-10-14 Thread 'Eric Anderson' via grpc.io
You are experiencing https://github.com/grpc/grpc-java/issues/7953, where grpc-java was incompatible with Netty 4.1.60+. It was fixed in grpc-java v1.35.1, v1.36.1, and 1.37 (all released back in March/April). It seems strange that you didn't try v1.33.1 and v1.36.2, or the latest version. Another

Re: [grpc-io] When is the right timing to free applicaiton‘s data buffer passed to Stream io?

2021-10-12 Thread 'Eric Anderson' via grpc.io
There is no way to know when the buffer is safe to reuse. Because of races between sending and notifications, you can't even safely use the buffer after the RPC is complete. The problem has been discussed some before , but there is no current

[grpc-io] gRPC-Java 1.41.0 Released

2021-09-24 Thread 'Eric Anderson' via grpc.io
gRPC Java 1.41.0 is released and is available on Maven Central. https://github.com/grpc/grpc-java/releases/tag/v1.41.0 API Changes - stub: Mark Stub-based MetadataUtils methods deprecated (#8395 ). The interceptor-based versions have been

Re: [grpc-io] how to get metadata in grpc impl

2021-09-08 Thread 'Eric Anderson' via grpc.io
I responded to your question on Gitter . I said: I don't think I understand. You are wanting to get CUSTOM_HEADER_KEY's > "customRespondValue" within sendPing()? It is really weird that the service would want to read response headers. So

  1   2   3   4   >