grpc

Envoy 和 Istio 的 6.18

假装没事ソ 提交于 2021-01-10 12:49:46
地球对面的时间比我们这里晚一点,我们的 618 已经开始返场了,他们还在 618。 服务网格方面,在这一天有了两个发布: Envoy 发布了移动版 Istio 发布了 1.2 Envoy Mobile Envoy Mobile 是一个库,目的是可以直接将 Envoy 的功能封装到移动应用之中, 跨平台的底层网络支持:HTTP/2、QUIC、gRPC、推送、流、重试和超时策略等底层网络技术的实现以及跨平台都是需要付出大量努力来完成的事情,Evnoy Mobile 试图在客户端以一致的跨平台的方式提供这所有功能。 xDS 支持:Envoy 的最深套路就是 xDS 了,Envoy 一旦潜入移动应用,就可以通过 xDS 的方式,在服务端对客户端的网络行为作出控制。 API 的高级支持:用注解方式为 API 提供缓存、优先级等支持 这个项目还非常早期,但是我觉得非常有意思,强悍的 Envoy 用这种方式为移动应用提供了一个可控的网络抽象的能力,目前已经提供了 Java、Swift、OC 等支持,这会不会成为一种新的边缘能力? Istio 1.2 补丁版本,没啥好说。 参考链接 https://docs.google.com/document/d/1N0ZFJktK8m01uqqgfDRVB9mpC1iEn9dqkQaa_yMn_kE/edit# https://istio.io/about

Error: Caused by: io.netty.handler.codec.http2.Http2Exception: Window size overflow for stream: 0

徘徊边缘 提交于 2021-01-05 13:08:15
问题 Error while calling a remote machine using grpc witout ssl. On first execution, works fine. On second client execution, the error occurs. On client side I'm open and close a channel on each request like that: channel = ManagedChannelBuilder.forAddress(host, port).usePlaintext().build(); stub = ApiServiceGrpc.newBlockingStub(channel); stub.CreateRequest(request); channel.shutdown().awaitTermination(5, TimeUnit.SECONDS); Server side: "io.grpc:grpc-protobuf:1.23.0" "io.grpc:grpc-stub:1.23.0" "io

Error: Caused by: io.netty.handler.codec.http2.Http2Exception: Window size overflow for stream: 0

别说谁变了你拦得住时间么 提交于 2021-01-05 13:02:12
问题 Error while calling a remote machine using grpc witout ssl. On first execution, works fine. On second client execution, the error occurs. On client side I'm open and close a channel on each request like that: channel = ManagedChannelBuilder.forAddress(host, port).usePlaintext().build(); stub = ApiServiceGrpc.newBlockingStub(channel); stub.CreateRequest(request); channel.shutdown().awaitTermination(5, TimeUnit.SECONDS); Server side: "io.grpc:grpc-protobuf:1.23.0" "io.grpc:grpc-stub:1.23.0" "io

Is it possible to use java client to call c++ server in the same process using InProcessChannel?

橙三吉。 提交于 2021-01-04 13:08:31
问题 Both grpc-java and grpc-c++ have the support for in-process channel, which is used if grpc client and server are in the same process. So I have a question, is it possible to use java client to call c++ server in the same process using in-process channel? 回答1: No. The inprocess channels in each language are language-specific. You would need to use a normal channel and a port of localhost. While it might be possible to use socketpair() to do something similar, it would require some effort to

Is it possible to use java client to call c++ server in the same process using InProcessChannel?

萝らか妹 提交于 2021-01-04 13:07:24
问题 Both grpc-java and grpc-c++ have the support for in-process channel, which is used if grpc client and server are in the same process. So I have a question, is it possible to use java client to call c++ server in the same process using in-process channel? 回答1: No. The inprocess channels in each language are language-specific. You would need to use a normal channel and a port of localhost. While it might be possible to use socketpair() to do something similar, it would require some effort to

Solve dependency issue when using gRPC cpp in bazel

淺唱寂寞╮ 提交于 2021-01-04 07:16:13
问题 I am trying to run a simple program with gRPC in dependency. I tried several examples but continuesly get the following error: ERROR: /home/git/examples/WORKSPACE:1:1: name 'git_repository' is not defined ERROR: Error evaluating WORKSPACE file This is my bazel version: ➜ git:(master) ✗ bazel version Build label: 0.23.2 And this is the workspace file content: git_repository( name = "com_github_grpc_grpc", commit = "ac0808b107d73613191b66617a547a201871a845", remote = "https://github.com/grpc

Solve dependency issue when using gRPC cpp in bazel

[亡魂溺海] 提交于 2021-01-04 07:14:48
问题 I am trying to run a simple program with gRPC in dependency. I tried several examples but continuesly get the following error: ERROR: /home/git/examples/WORKSPACE:1:1: name 'git_repository' is not defined ERROR: Error evaluating WORKSPACE file This is my bazel version: ➜ git:(master) ✗ bazel version Build label: 0.23.2 And this is the workspace file content: git_repository( name = "com_github_grpc_grpc", commit = "ac0808b107d73613191b66617a547a201871a845", remote = "https://github.com/grpc

How to pass on a traceId from gRPC's context to another thread/threadPool?

故事扮演 提交于 2021-01-01 05:05:43
问题 I am using grpc-java and have 3 services, A, B and C. I call service A and then service A calls B and C. I am using Hystrix in the calls to B and C. C in turn spawns another thread to call another service. I have ClientInterceptors and ServerInterceptors which passes around the traceId. I can see the traceIds in the Context and logs as long as it is a gRPC worker thread but lose them when the call moves to another thread - RxIoScheduler thread or Hystrix thread. How do I pass the traceId

How to pass on a traceId from gRPC's context to another thread/threadPool?

拟墨画扇 提交于 2021-01-01 05:04:46
问题 I am using grpc-java and have 3 services, A, B and C. I call service A and then service A calls B and C. I am using Hystrix in the calls to B and C. C in turn spawns another thread to call another service. I have ClientInterceptors and ServerInterceptors which passes around the traceId. I can see the traceIds in the Context and logs as long as it is a gRPC worker thread but lose them when the call moves to another thread - RxIoScheduler thread or Hystrix thread. How do I pass the traceId

Is “google/protobuf/struct.proto” the best way to send dynamic JSON over GRPC?

限于喜欢 提交于 2020-12-29 05:49:31
问题 I have a written a simple GRPC server and a client to call the server (both in Go). Please tell me if using golang/protobuf/struct is the best way to send a dynamic JSON with GRPC. In the example below, earlier I was creating Details as a map[string]interface{} and serializing it. Then I was sending it in protoMessage as bytes and was de-serializing the message on the server side. Is it the best/efficient way to do it or should I define Details as a struct in my proto file? Below is User