Skip to content

Commit db84acf

Browse files
committed
Simple edits
1 parent 3dcaa22 commit db84acf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/firestore/devdocs/architecture.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ The SDK is composed of several key components that work together to provide the
1212
* **Core**:
1313
* **Event Manager**: Acts as a central hub for all eventing in the SDK. It is responsible for routing events between the API Layer and Sync Engine. It manages query listeners and is responsible for raising snapshot events, as well as handling connectivity changes and some query failures.
1414
* **Sync Engine**: The central controller of the SDK. It acts as the glue between the Event Manager, Local Store, and Remote Store. Its responsibilities include:
15-
* Coordinating client requests and remote events.
16-
* Managing a view for each query, which represents the unified view between the local and remote data stores.
15+
* Coordinating and translating client requests and remote events from the backend.
16+
* Initiating responses to user code from both remote events (backend updates) and local events (e.g. garbage collection).
17+
* Managing a "view" for each query, which represents the unified view between the local and remote data stores.
18+
* Deciding whether a document is in a "limbo" state (e.g. its state is unknown) and needs to be fetched from the backend.
1719
* Notifying the Remote Store when the Local Store has new mutations that need to be sent to the backend.
20+
* For web clients, synchronizing query and mutation states across multiple tabs.
1821
* **Local Store**: A container for the components that manage persisted and in-memory data.
1922
* **Remote Table**: A cache of the most recent version of documents as known by the Firestore backend.
2023
* **Mutation Queue**: A queue of all the user-initiated writes (set, update, delete) that have not yet been acknowledged by the Firestore backend.
@@ -61,6 +64,7 @@ All data modifications—creates, updates, and deletes—are treated as "writes.
6164

6265
A Firestore data bundle is a serialized collection of documents and query results, created on a server using the Firebase Admin SDK. Bundles are used to efficiently deliver a pre-packaged set of data to the client, which can then be loaded directly into the SDK's local cache. This is useful for:
6366

67+
* **Optimizing Server-Side Rendering (SSR)**: Bundles enable efficient hydration of client-side applications with data pre-fetched during server-side rendering, reducing initial load times and backend roundtrips.
6468
* **Seeding initial data** for an application, allowing users to have a complete offline experience on their first use.
6569
* **Distributing curated datasets** to clients in a single, efficient package.
6670

0 commit comments

Comments
 (0)