-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding downloadable_model and more downloadable_model python binding
- Loading branch information
Showing
17 changed files
with
1,203 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
```mermaid | ||
graph TD | ||
A[DownloadableTransitModel] --> B[ModelConfig] | ||
A --> C[NavitiaConfig] | ||
A --> D[Downloader] | ||
A --> E[Arc<RwLock<Model>>] | ||
A --> F[Arc<Mutex<String>>] | ||
subgraph Initialization | ||
G[Start] --> H[initialize_model] | ||
H --> I[get_remote_version] | ||
I --> J[Navitia API] | ||
H --> K[run_download] | ||
K --> L[Downloader] | ||
H --> M[ntfs::read] | ||
end | ||
subgraph Background Updater | ||
N[start_background_updater] --> O[check_and_update] | ||
O --> P[get_remote_version] | ||
O --> Q{Version Newer?} | ||
Q -->|Yes| R[run_download] | ||
Q -->|No| S[Return false] | ||
R --> T[ntfs::read] | ||
T --> U[Atomic Model Swap] | ||
U --> V[Version Update] | ||
end | ||
subgraph External Components | ||
J -->|HTTP GET| W((Navitia Server)) | ||
L -->|Storage| X[(S3/File System)] | ||
M --> Y[NTFS Parser] | ||
end | ||
subgraph Concurrency | ||
E -.->|RwLock| Z[Thread-safe Reads] | ||
E -.->|Write Lock| AA[Atomic Updates] | ||
F -.->|Mutex| AB[Version Safety] | ||
N --> AC[Tokio Spawn] | ||
end | ||
style A fill:#f9f,stroke:#333 | ||
style B fill:#ccf,stroke:#333 | ||
style C fill:#ccf,stroke:#333 | ||
style D fill:#cfc,stroke:#333 | ||
style J fill:#fcc,stroke:#333 | ||
style L fill:#fcc,stroke:#333 | ||
style W fill:#cff,stroke:#333 | ||
style X fill:#cff,stroke:#333 | ||
style Y fill:#cff,stroke:#333 | ||
``` |
Oops, something went wrong.