nodejs-firestore icon indicating copy to clipboard operation
nodejs-firestore copied to clipboard

feat: Use REST

Open schmidt-sebastian opened this issue 2 years ago • 2 comments

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • [ ] Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • [ ] Ensure the tests and linter pass
  • [ ] Code coverage does not decrease (if any source code was changed)
  • [ ] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

schmidt-sebastian avatar Mar 14 '22 21:03 schmidt-sebastian

@schmidt-sebastian this is cool, is your intention to default to gRPC, and document REST?

bcoe avatar Mar 16 '22 22:03 bcoe

@bcoe I haven't decided yet. We need to fix one more issue with queries and then compare performance data to see what mode should be the default.

schmidt-sebastian avatar Mar 16 '22 22:03 schmidt-sebastian

@MarkDuckworth It works now! When I throw new Error('...') in node_modules/@grpc/grpc-js/build/src/index.js and run npm run system-test:rest, only a handful of tests that actually require gRPC fail, most tests pass.

Note: I'm using the pre-released version of google-gax because of the bug. I will remove the package.json change when gax is released later today.

The main change is in the client factory here: https://github.com/googleapis/nodejs-firestore/pull/1698/files#diff-33330e7a0daf2387ffc6f936c4d6cb4dd23b4b404446a5e34d2cab779e47cb50R552

alexander-fenster avatar Aug 31 '22 15:08 alexander-fenster

Hello! Sorry for reviving an old pull request, but was this data published anywhere?

We need to fix one more issue with queries and then compare performance data to see what mode should be the default.

hspak avatar Feb 02 '23 04:02 hspak

Performance data was not published. From what I have seen, internal tests and customer reports indicate a speedup when using preferRest in the cold start of functions. However, I cannot give specific numbers.

We did not change the default mode, which is still gRPC.

MarkDuckworth avatar Feb 02 '23 21:02 MarkDuckworth