grpc-node 源码阅读笔记[0] 简单介绍 gRPC 贴一张挂在官网的图片:https://grpc.io/docs/what-is-grpc/introduction/ ? 源码所在位置: https://github.com/grpc/grpc-node/blob/grpc%401.24.x/packages/grpc-native-core/src/client.js# 在 grpc-node 中,拦截器的执行顺序与传入顺序有关,是一个队列,先传入的拦截器先执行,如果传入了第二个参数,则先执行第二个参数对应的方法,后执行第一个参数对应的方法。 一般很少会去覆盖默认的 Channel,所以我们直接去看 grpc-node 里边的 Channel 是如何实现的。 而 grpc-node 和 grpc-js 用的是两个不同的类,所以混用的话可能会出现这个问题。
containing the common content. message CommonMessage { byte content = 1; } grpc vs grpc-js 当你打开 grpc-node https://github.com/grpc/grpc-node/blob/master/PACKAGE-COMPARISON.md 当然,推动我们更新大版本的动力是,grpc 在使用 http2 协议打包传送的数据越大 其余的迁移可以参考https://github.com/grpc/grpc-node/tree/master/packages/grpc-js callback(回包数据大小) grpc-js grpc /grpc/grpc/blob/master/doc/naming.md [4] protobuf.js: https://github.com/protobufjs/protobuf.js [5] grpc-node [7] @grpc/grpc-js 1.0.0: https://github.com/grpc/grpc-node/releases/tag/%40grpc%2Fgrpc-js%401.0.0
developers.google.com/protocol-buffers/docs/overview https://www.grpc.io/docs/guides https://github.com/grpc/grpc-node
1.8.x 以上的版本添加了 retry 重连逻辑,而 retry 逻辑不够健壮会不断重试直到服务资源 CPU 100%,详细可以看对应的 issues:https://github.com/grpc/grpc-node