-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FR] Admin version of the Firestore Lite SDK #1879
Comments
I found a few problems with this issue:
|
As a note, this issue does not just affect cloud functions, but rather affects anything that needs to be cold-started. Reproduction samples work the same way on Docker containers hosted virtually anywhere, or when rebuilding an application during a live reload - the library itself appears to be the culprit, not the hosting environment. |
This would definitely help a lot of developers, however in our case we use a lot of transactions which seem to potentially be beyond the scope of a "lite" SDK. If we could get, either in addition to or instead of this, an official Google-maintained equivalent of https://github.com/bountyrush/nodejs-firestore it could help with that case. We really just want the speed of REST with the DX of the Admin SDK. |
Thanks for creating the issue, indeed it would definitely help a lot of us ! |
I'm also interested in this, parsing an access token and calling firestore in a single request can take ages when cold on AWS lambda |
Much needed. Thank you. |
I'm the developer for REST api implementation - https://github.com/bountyrush/nodejs-firestore I thought of giving a try with lite web js sdk but the links are broken for source code. Can someone point at the right link? |
This was posted to the public issue but repeating here for visibility.
|
I'm seeing a significant performance boost from this, which is very exciting. It will be even better if it ends up in firebase-admin, which will simplify usage and help prevent problems like this: googleapis/nodejs-firestore#760 |
@jamesdaniels now that preferRest is in google-cloud/firestore v6.2, can we get an update on exposing that option in firebase-admin? Should I open a new ticket for that, since this has evolved a bit? |
This feature is now available in |
Amazing ;)
|
We need to reopen this again. Now that J |
PSA: Please continue discussion on this topic at #2572 |
+1 |
The problem
There is a longstanding issue with extremely slow cold-start times when using the official Nodejs Firestore library in serverless environments: https://issuetracker.google.com/issues/158014637. It appears that the underlying issue is very difficult to address (hence the unresolved years-old P1/S1 issue), and a proper interim fix is long overdue.
One solution is to use the Firestore REST API directly. This dramatically improves cold start times, but at the cost of a seriously degraded developer experience. There has been at least one attempt by a Firestore user to create an unofficial wrapper library (https://github.com/bountyrush/nodejs-firestore). This library works, but is maintained by a single developer, and is not a replacement for an official library for obvious reasons.
The solution
A lightweight wrapper library that adds a friendly interface to the Firestore REST API for simple CRUD operations would do a lot to ameliorate the three year old cold start bug. Essentially a Nodejs equivalent of the Firestore Lite SDK. A Google employee has suggested that this library might even be able to share significant code with Firestore Lite: https://issuetracker.google.com/issues/158014637#comment183
The text was updated successfully, but these errors were encountered: