Is Firestore Supported?

Question
Is there a recommended way to get started with a Firestore DB?

Answer
Direct integration with Firestore is not currently supported, but it should be possible to build an ad hoc integration using Firestore’s real-time updates feature.

First, you can create a Write API based collection on Rockset.

Then, you can set up a listener on your entire Firestore collection (e.g. by omitting the where clause).

Whenever the listener detects that a document has been added, modified, or removed, you can send a corresponding POST or DELETE request to the Rockset API. (There is also a PATCH API, but it is probably simpler to use POST for modified objects as well, because Rockset will automatically merge documents with the same _id.) If the ID field for Firestore objects is called something other than _id, you should make sure to convert it to _id when you send the API request.

Note that there should only be one instance of the app running the listener to prevent double writes, and it should be private to prevent exposing your Rockset API key. If the app restarts, the listener will “contain added events for all existing documents” the first time it fires. This is good, because it means you will send a POST request for all existing documents, so you won’t miss any updates during the time the app was down.