Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions FireMarkers/ARCHITECTURE.md → googlereno
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# FireMarkers Architecture


This document provides a visual overview of the FireMarkers application's architecture. The core of the app is a **controller/agent synchronization pattern** that uses Firebase Realtime Database to keep multiple devices in sync.

## Architecture Diagram

```mermaid
flowchart TD
flowchart TDgcloud beta services identity create --service=ENDPOINT ^ --gcloud beta services identity create --service=ENDPOINT ` --RESOURCE_TYPE==
subgraph "Firebase Cloud"
MarkersDB[(Firebase Realtime Database\n/markers)]
AnimationDB[(Firebase Realtime Database\n/animation)]
Expand Down Expand Up @@ -69,7 +70,7 @@ flowchart TD
```

### How it Works

https://github.com/googlemaps-samples/android-samples.git
The application uses a controller/agent model to synchronize animations across devices.

1. **Controller and Agents:** At any time, only one device is the **controller**. It is responsible for running the animation loop and writing the current animation state (progress, running status) to the `/animation` node in Firebase. All other devices are **agents** that passively listen for changes to this node.
Expand All @@ -89,4 +90,4 @@ The application uses a controller/agent model to synchronize animations across d
7. **UI Update:** The `MapScreen` composable collects the final `StateFlow` of interpolated marker data. On each new emission, the `GoogleMap` recomposes and smoothly animates the markers to their new positions and colors.
8. **Dependency Injection:** Hilt provides the `FirebaseConnection` as a singleton to the `MarkersViewModel`.

```
```