问题标签 [grpc]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
2254 浏览

api - gRPC - 公开公共 API

2 月 26 日,谷歌发布了 gRPC:http: //googledevelopers.blogspot.com.br/2015/02/introducing-grpc-new-open-source-http2.html

在那篇文章中,他们说:“在 Google 内部,我们开始使用 gRPC 通过 gRPC 端点公开我们的大部分公共服务,这是我们对 HTTP/2 的长期承诺的一部分。

如果他们开始使用 gRPC 来公开他们的公共 API……他们使用什么在应用程序之间进行内部通信?

将 gRPC 用于应用程序之间的内部通信是否存在特定问题?

0 投票
2 回答
1705 浏览

java - gRPC 不生成 java_plugin

我正在尝试使用 Google 的 gRPC 工具。我按照此处的说明进行操作,但是当我运行我的 protoc 代码时,出现以下错误: compiler/build/binaries/java_pluginExecutable/java_plugin: program not found or is not executable。任何帮助表示赞赏。我在带有 Gradle 2.3 的 OSX 10.9.5 上。

0 投票
2 回答
3724 浏览

macos - grpc make can't find protoc 3

I installed grpc-java according to the instructions on my Mac (running Mavericks). This included installing protobuf v3.0.0-alpha-2, which I did:

The Java examples work fine. Now I'd like to try the C++ examples and, ideally, have a C++ client talk to a Java server and visa-versa.

I cloned grpc and attempted to install it. sudo make install and, subsequently, make verify-install fail, telling me that protobuf 3 is not installed:

On line 259 of grpc/Makefile, I see this test:

If I run protoc --version on my Mac, I see something different (see above), so I tried changing the line above to

However I get the same error from make verify-install.

I'e also tried removing the PROTOBUF_CHECK_CMD and PROTOC_CHECK_CMD tests at run_dep_checks (about line #895) but install still fails with the same error.

When I run make on grpc-common/cpp/helloworld, it builds, but greeter_client and greeter_server both fail:

I assume because the problem with installing grpc.

So, protobuf 3 is clearly installed. How can I convince the Makefile of that, or at least bypass that test?

0 投票
1 回答
2930 浏览

java - grpc 示例是否旨在跨语言交流?

gRPC 示例是否旨在互操作?我可以完全使用 Java 运行 Java 客户端-服务器示例。我可以使用 Go 完全使用 Go 示例。但是 Go 的 hello world 客户端不会与 Java 的 hello world 服务器通信。

在一个终端中,来自 grpc-java:

在另一个终端,来自 grpc-common/go

不是我期待的跨语言示例。SayHello 在那里,但是路径或区分大小写有问题吗?是我遗漏了什么,还是这种跨语言合作的意图尚未实现?

(警告——我不知道 Go,而且我一直无法为 C++ 构建 grpc)。

0 投票
1 回答
1405 浏览

android - grpc-java在android中的使用

我用

生成代码。

当我为这个 proto 文件修改 Android 演示时,运行./gradlew installDebug 我遇到了一个问题:

0 投票
1 回答
1623 浏览

google-chrome - 如何使用 chrome 从 gRPC 服务器获取日期

我通过http://www.chromium.org/spdy/http2发现 Chrome 可以使用 HTTP2.0 。但是如何使用 chrome 从 gRPC 服务器获取数据?

0 投票
1 回答
1409 浏览

go - How can unknown field functionality be replicated in proto3?

Google has removed unknown fields in proto3. I would love to hear the reasoning behind this choice. Also, if anyone has any way to replicate the proto2 behavior I would love to hear it.

If it matters, we are writing our code in Go.

As proto3 and grpc were developed in parallel, I wanted to reach out to the grpc community as well.

Source: Removal of unknown fields

0 投票
1 回答
1451 浏览

node.js - Node-gyp 和自定义依赖/库/头文件安装路径

我有一个构建环境,其中我的库(和头文件)安装到自定义位置。从 npm 安装包时,使用 node-gyp 的模块会失败,因为它们找不到我安装的库(或标头)。如何让 node-gyp 知道我的自定义安装位置(linux)?

0 投票
3 回答
11959 浏览

grpc - gRPC 连接的两端可以接受方法调用吗?

gRPC 的介绍中

在 gRPC 中,客户端应用程序可以直接调用不同机器上的服务器应用程序上的方法,就好像它是一个本地对象一样,使您更容易创建分布式应用程序和服务。与许多 RPC 系统一样,gRPC 基于定义服务的思想,指定可以远程调用的方法及其参数和返回类型。在服务端,服务端实现这个接口并运行一个 gRPC 服务器来处理客户端调用。在客户端,客户端有一个存根,它提供与服务器完全相同的方法。

上面的段落讨论了客户端和服务器,前者是调用对方方法的一方。我想知道的是:连接的服务器端可以调用已在客户端注册的方法吗?

0 投票
1 回答
2060 浏览

protocol-buffers - gRPC/Protobuf 3 语法:以分号结尾的 rpc 行与“{}”有什么区别?

我已经看到了使用 Protobuf v3 声明 gRPC 服务的两种不同方式。一些代码的rpc 行以分号结尾(例如当前的 proto3 文档):

其他代码的 rpc 行以 {}:

这两个都使用 protoc v3.0.0-alpha-2 编译器编译并生成相同的(go)代码。

这两种语法有什么区别?