# cthesigns/omaha architecture

> Architecture diagram of the GitHub repository cthesigns/omaha, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cthesigns/omaha
- Repository: https://github.com/cthesigns/omaha

## Overview

Omaha is a Windows software updater: it checks for updates in background or on demand, downloads updates, and installs requested software. The graph follows that user-to-update workflow through the service, scheduling, update checking, downloading, and installation, and includes policy/device management and crash handling as significant supporting capabilities. The README establishes the product workflow; most implementation excerpts are absent, so internal connections are dashed and unverified rather than inferred as direct calls.

Main entry points: [`omaha/goopdate/app_manager.cc`](https://github.com/cthesigns/omaha/blob/master/omaha/goopdate/app_manager.cc) (App manager), [`omaha/core/scheduler.cc`](https://github.com/cthesigns/omaha/blob/master/omaha/core/scheduler.cc) (Scheduler), [`omaha/common/config_manager.cc`](https://github.com/cthesigns/omaha/blob/master/omaha/common/config_manager.cc) (Configuration and policy), [`omaha/common/web_services_client.cc`](https://github.com/cthesigns/omaha/blob/master/omaha/common/web_services_client.cc) (Update protocol)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Update runtime"]
  node_service["Update service<br/>[service_main.cc]"]
  node_scheduler["Scheduler<br/>[scheduler.cc]"]
  node_appmgr["App manager<br/>[app_manager.cc]"]
  node_appstate["App update states<br/>[app_state.cc]"]
end

subgraph group_delivery["Update delivery"]
  node_protocol["Update protocol"]
  node_network["Network requests"]
  node_download["Download manager"]
  node_package[("Package cache<br/>[package_cache.cc]")]
  node_installer["Install manager<br/>[install_manager.cc]"]
  node_clientinstall["Client installation<br/>[install_apps.cc]"]
end

subgraph group_policy["Policy management"]
  node_registry[("App registry")]
  node_config["Configuration and policy<br/>[config_manager.cc]"]
  node_dmclient["Device management<br/>[dm_client.cc]"]
  node_dmstorage[("DM policy storage<br/>[dm_storage.cc]")]
end

subgraph group_reliability["Reliability"]
  node_crash["Crash handling<br/>[crash_handler.cc]"]
  node_crashworker["Crash worker<br/>[crash_worker.cc]"]
end

node_user(("User or app"))

node_user -.->|"requests update"| node_service
node_service -.->|"starts scheduling"| node_scheduler
node_scheduler -.->|"dispatches checks"| node_appmgr
node_appmgr -.->|"checks updates"| node_protocol
node_protocol -.->|"sends requests"| node_network
node_network -.->|"returns response"| node_protocol
node_appmgr -.->|"tracks progress"| node_appstate
node_appmgr -.->|"requests download"| node_download
node_download -.->|"stores packages"| node_package
node_appmgr -.->|"requests install"| node_installer
node_installer -.->|"delegates install"| node_clientinstall
node_appmgr -.->|"reads app data"| node_registry
node_scheduler -.->|"reads policy"| node_config
node_config -.->|"reads settings"| node_registry
node_config -.->|"uses DM policy"| node_dmstorage
node_dmclient -.->|"persists policy"| node_dmstorage
node_crash -.->|"dispatches work"| node_crashworker

click node_service "https://github.com/cthesigns/omaha/blob/master/omaha/service/service_main.cc"
click node_scheduler "https://github.com/cthesigns/omaha/blob/master/omaha/core/scheduler.cc"
click node_appmgr "https://github.com/cthesigns/omaha/blob/master/omaha/goopdate/app_manager.cc"
click node_appstate "https://github.com/cthesigns/omaha/blob/master/omaha/goopdate/app_state.cc"
click node_protocol "https://github.com/cthesigns/omaha/blob/master/omaha/common/web_services_client.cc"
click node_network "https://github.com/cthesigns/omaha/blob/master/omaha/net/network_request_impl.cc"
click node_download "https://github.com/cthesigns/omaha/blob/master/omaha/goopdate/download_manager.cc"
click node_package "https://github.com/cthesigns/omaha/blob/master/omaha/goopdate/package_cache.cc"
click node_installer "https://github.com/cthesigns/omaha/blob/master/omaha/goopdate/install_manager.cc"
click node_clientinstall "https://github.com/cthesigns/omaha/blob/master/omaha/client/install_apps.cc"
click node_registry "https://github.com/cthesigns/omaha/blob/master/omaha/common/app_registry_utils.cc"
click node_config "https://github.com/cthesigns/omaha/blob/master/omaha/common/config_manager.cc"
click node_dmclient "https://github.com/cthesigns/omaha/blob/master/omaha/goopdate/dm_client.cc"
click node_dmstorage "https://github.com/cthesigns/omaha/blob/master/omaha/goopdate/dm_storage.cc"
click node_crash "https://github.com/cthesigns/omaha/blob/master/omaha/crashhandler/crash_handler.cc"
click node_crashworker "https://github.com/cthesigns/omaha/blob/master/omaha/crashhandler/crash_worker.cc"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_service,node_scheduler,node_appmgr,node_appstate,node_user toneBlue
class node_protocol,node_network,node_download,node_package,node_installer,node_clientinstall toneAmber
class node_registry,node_config,node_dmclient,node_dmstorage toneMint
class node_crash,node_crashworker toneRose
```

## Components

### Update runtime

- [Update service](https://github.com/cthesigns/omaha/blob/master/omaha/service/service_main.cc): `omaha/service/service_main.cc`
- [Scheduler](https://github.com/cthesigns/omaha/blob/master/omaha/core/scheduler.cc): `omaha/core/scheduler.cc`
- [App manager](https://github.com/cthesigns/omaha/blob/master/omaha/goopdate/app_manager.cc): `omaha/goopdate/app_manager.cc`
- [App update states](https://github.com/cthesigns/omaha/blob/master/omaha/goopdate/app_state.cc): `omaha/goopdate/app_state.cc`

### Update delivery

- [Update protocol](https://github.com/cthesigns/omaha/blob/master/omaha/common/web_services_client.cc): `omaha/common/web_services_client.cc`
- [Network requests](https://github.com/cthesigns/omaha/blob/master/omaha/net/network_request_impl.cc): `omaha/net/network_request_impl.cc`
- [Download manager](https://github.com/cthesigns/omaha/blob/master/omaha/goopdate/download_manager.cc): `omaha/goopdate/download_manager.cc`
- [Package cache](https://github.com/cthesigns/omaha/blob/master/omaha/goopdate/package_cache.cc): `omaha/goopdate/package_cache.cc`
- [Install manager](https://github.com/cthesigns/omaha/blob/master/omaha/goopdate/install_manager.cc): `omaha/goopdate/install_manager.cc`
- [Client installation](https://github.com/cthesigns/omaha/blob/master/omaha/client/install_apps.cc): `omaha/client/install_apps.cc`

### Policy management

- [App registry](https://github.com/cthesigns/omaha/blob/master/omaha/common/app_registry_utils.cc): `omaha/common/app_registry_utils.cc`
- [Configuration and policy](https://github.com/cthesigns/omaha/blob/master/omaha/common/config_manager.cc): `omaha/common/config_manager.cc`
- [Device management](https://github.com/cthesigns/omaha/blob/master/omaha/goopdate/dm_client.cc): `omaha/goopdate/dm_client.cc`
- [DM policy storage](https://github.com/cthesigns/omaha/blob/master/omaha/goopdate/dm_storage.cc): `omaha/goopdate/dm_storage.cc`

### Reliability

- [Crash handling](https://github.com/cthesigns/omaha/blob/master/omaha/crashhandler/crash_handler.cc): `omaha/crashhandler/crash_handler.cc`
- [Crash worker](https://github.com/cthesigns/omaha/blob/master/omaha/crashhandler/crash_worker.cc): `omaha/crashhandler/crash_worker.cc`

### Other components

- **User or app**

## Connections

- User or app → Update service: requests update
- Update service → Scheduler: starts scheduling
- Scheduler → App manager: dispatches checks
- App manager → Update protocol: checks updates
- Update protocol → Network requests: sends requests
- Network requests → Update protocol: returns response
- App manager → App update states: tracks progress
- App manager → Download manager: requests download
- Download manager → Package cache: stores packages
- App manager → Install manager: requests install
- Install manager → Client installation: delegates install
- App manager → App registry: reads app data
- Scheduler → Configuration and policy: reads policy
- Configuration and policy → App registry: reads settings
- Configuration and policy → DM policy storage: uses DM policy
- Device management → DM policy storage: persists policy
- Crash handling → Crash worker: dispatches work
