-
Notifications
You must be signed in to change notification settings - Fork 54
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
Feature Request: Support for Firestore in Native Mode #129
Comments
Doesn't Firestore Native use a completely different protocol than Datastore? Also yeah gstore-node should work with Firestore in Datastore mode because the API is fully backwards-compatible with the GDS API. |
Hi, Am I wrong? |
Can you confirm that this repo is the "native" mode of firestore? https://github.com/googleapis/nodejs-firestore ? It seems that it might be possible to add an adapter. But then I am still not seeing the use case for Webapps (real time update would be lost). Could you elaborate your use case? 👍 |
Hi @sebelga , have you thought about this anymore? We're starting a new project and really want to use gstore-node. Since this a new project we wanted to jump directly to FireStore native rather than using Firestore in Datastore mode. We're not planning on using the Mobile API's however according to this (https://cloud.google.com/datastore/docs/firestore-or-datastore#choosing_a_database) we cannot switch from Datastore mode to Native mode without starting a new project. |
Hi @william-lpa I didn't look more into it as I didn't get an answer to my previous comments 😊 Could you confirm if what I was mentioning is correct? It seems to me that Firestore web client goes directly from the browser to the DB (no Node.js server). It then probably opens a Websocket connection for live updates (?) |
Hi @sebelga you are correct that Firebase products were originally to be used directly by the client. However with cloud functions you can now use the classical frontend-backend split with a nodejs backend (cloud functions) that access the DB. It also looks like Firestore is better and has more features than Google Datastore, I wouldn't be suprised if it replaces Datastore in the future. In any case I definitely have use for a cloud firestore nodejs ODM. So +1 for me. |
Thanks for the feedback @delamart I will look more into it then 👍 |
Hi, Could you share your thoughts in the issues I opened around the API to support both databases? cheers! |
Hi, The data modelling structures for Native mode are a bit different (collections>documents>collections>documents>....) than those used for Datastore mode (kind>entity) so I'm leaning towards rather creating something dedicated to handling Firestore's nested modelling perspective (code name 'fstore-node' ;-). However before going down that road it would be great to explore the uses cases maybe through some pseudo code as to how "fstore-node" (or an adaptor on gstore-node) would be expected to work. If anyone has any ideas please add them into the thread and I'll work through it. |
I think you're right that it should probably be a separate package. As I started working on this, I realized that the naming conventions of Firestore are quite different from Datastore. This means that probably the docs should reflect that? 🤔 As I didn't feel much interest in it I didn't think the amount of work was worth the effort. |
This would be great, as Datastore is ultimately being deprecated and transitioned to Firestore. I would assume Gstore will still work with Firestore in Datastore mode, but as far as I can tell there is no sound ORM solution for Firestore in native mode.
The text was updated successfully, but these errors were encountered: