From 4e2decd6ac0d7d1c16d1de0d5403d14326873bd6 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 7 Aug 2018 15:11:39 -0700 Subject: [PATCH 1/3] Add package feature comparison document --- PACKAGE-COMPARISON.md | 29 +++++++++++++++++++++++++++++ README.md | 8 +++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 PACKAGE-COMPARISON.md diff --git a/PACKAGE-COMPARISON.md b/PACKAGE-COMPARISON.md new file mode 100644 index 00000000..355dc51f --- /dev/null +++ b/PACKAGE-COMPARISON.md @@ -0,0 +1,29 @@ +# Feature comparison of `grpc` and `@grpc/grpc-js` packages + +Feature | `grpc` | `@grpc/grpc-js` +--------|--------|---------- +Client | :heavy_check_mark: | :heavy_check_mark: +Server | :heavy_check_mark: | :x: +Unary RPCs | :heavy_check_mark: | :heavy_check_mark: +Streaming RPCs | :heavy_check_mark: | :heavy_check_mark: +Deadlines | :heavy_check_mark: | :heavy_check_mark: +Cancellation | :heavy_check_mark: | :heavy_check_mark: +Automatic Reconnection | :heavy_check_mark: | :heavy_check_mark: +Per-message Compression | :heavy_check_mark: | only for response messages +Channel State | :heavy_check_mark: | :heavy_check_mark: +JWT Access and Service Account Credentials | provided by the [Google Auth Library](https://www.npmjs.com/package/google-auth-library) | provided by the [Google Auth Library](https://www.npmjs.com/package/google-auth-library) +Interceptors | :heavy_check_mark: | :x: +Connection Keepalives | :heavy_check_mark: | :heavy_check_mark: +HTTP Connect Support | :heavy_check_mark: | :x: +Retries | :heavy_check_mark: | :x: +Stats/tracing/monitoring | :heavy_check_mark: | :x: +Load Balancing | :heavy_check_mark: | :x: + +In addition, all channel arguments defined in [this header file](https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/grpc_types.h) are handled by the `grpc` library. Of those, the following are handled by the `@grpc/grpc-js` library: + + - `grpc.ssl_target_name_override` + - `grpc.primary_user_agent` + - `grpc.secondary_user_agent` + - `grpc.default_authority` + - `grpc.keepalive_time_ms` + - `grpc.keepalive_timeout_ms` \ No newline at end of file diff --git a/README.md b/README.md index 9bcebd56..a9164139 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ ## Implementations +For a comparison of the features available in these two libraries, see [this document](https://github.com/grpc/grpc-node/tree/master/PACKGE-COMPARISON.md) + ### C-based Client and Server Directory: [`packages/grpc-native-core`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-native-core) (see here for installation information) @@ -15,9 +17,11 @@ This is the existing, feature-rich implementation of gRPC using a C++ addon. It Directory: [`packages/grpc-js-core`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js-core) +npm package: [@grpc/grpc-js](https://www.npmjs.com/package/@grpc/grpc-js) + **This library is currently incomplete and experimental, built on the [experimental http2 Node module](https://nodejs.org/api/http2.html).** -This library implements the core functionality of gRPC purely in JavaScript, without a C++ addon. It works on the latest version of Node.js (with the `--expose-http2` flag set) on all platforms that Node.js runs on. +This library implements the core functionality of gRPC purely in JavaScript, without a C++ addon. It works on the latest version of Node.js on all platforms that Node.js runs on. ## Other Packages @@ -25,6 +29,8 @@ This library implements the core functionality of gRPC purely in JavaScript, wit Directory: [`packages/grpc-protobufjs`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-protobufjs) +npm package: [@grpc/proto-loader](https://www.npmjs.com/package/@grpc/proto-loader) + This library loads `.proto` files into objects that can be passed to the gRPC libraries. ### gRPC Tools From ea0ceae15e766ca765f5de6b406a7e9992ff3b5d Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 7 Aug 2018 15:20:20 -0700 Subject: [PATCH 2/3] Add table of important non-feature properties --- PACKAGE-COMPARISON.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/PACKAGE-COMPARISON.md b/PACKAGE-COMPARISON.md index 355dc51f..d4203df5 100644 --- a/PACKAGE-COMPARISON.md +++ b/PACKAGE-COMPARISON.md @@ -19,6 +19,14 @@ Retries | :heavy_check_mark: | :x: Stats/tracing/monitoring | :heavy_check_mark: | :x: Load Balancing | :heavy_check_mark: | :x: +Other Properties | `grpc` | `@grpc/grpc-js` +-----------------|--------|---------------- +Binary Addon | :heavy_check_mark: | :x: +Supported Node Versions | >= 4 | ^8.11.2 or >=9.4 +Supported Electron Versions | All | >= 3 +Supported Platforms | Linux, Windows, MacOS | All +Supported Architectures | x86, x86-64, ARM | All + In addition, all channel arguments defined in [this header file](https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/grpc_types.h) are handled by the `grpc` library. Of those, the following are handled by the `@grpc/grpc-js` library: - `grpc.ssl_target_name_override` From ea8f4266bff2da6e43610109557de77678494c62 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 8 Aug 2018 10:14:16 -0700 Subject: [PATCH 3/3] Resolve some comments --- PACKAGE-COMPARISON.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PACKAGE-COMPARISON.md b/PACKAGE-COMPARISON.md index d4203df5..3396eac1 100644 --- a/PACKAGE-COMPARISON.md +++ b/PACKAGE-COMPARISON.md @@ -21,11 +21,11 @@ Load Balancing | :heavy_check_mark: | :x: Other Properties | `grpc` | `@grpc/grpc-js` -----------------|--------|---------------- -Binary Addon | :heavy_check_mark: | :x: +Pure JavaScript Code | :x: | :heavy_check_mark: Supported Node Versions | >= 4 | ^8.11.2 or >=9.4 Supported Electron Versions | All | >= 3 Supported Platforms | Linux, Windows, MacOS | All -Supported Architectures | x86, x86-64, ARM | All +Supported Architectures | x86, x86-64, ARM7+ | All In addition, all channel arguments defined in [this header file](https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/grpc_types.h) are handled by the `grpc` library. Of those, the following are handled by the `@grpc/grpc-js` library: