Skip to content

5.14 System Dependency Map

A system never reads another system's data: it calls the other system's API, or reacts to its events. This page draws every path between the interfaces and the systems that the contracts define, so that the rule can be checked by reading one picture. It is generated from the contracts by uv run docs-interfaces: REST edges from the audience and callers of each operation, gRPC edges from the callers of each service, event edges from producer to consumers.

5.14.1 How to Read It

  • Solid arrows are synchronous calls (REST, gRPC), labelled with the number of operations or calls; dashed arrows are events, labelled with how many event types flow.
  • Interfaces call systems and own nothing: the Organization Dashboard, the Console and the installed clients appear only as callers.
  • Besides the systems, the database box is reached only by developers through the Dev ORM of one system, with a just-in-time grant on that system's tables; every system, and its Dev ORM, touches only its own tables. No contract gives a system a path into another system's tables, which is the check this page exists for. Where the deployment today puts two systems in one database, the rule holds at the level of tables (see System Overview).
  • Every system calls access and farm: for the snapshots that bootstrap its cached copies of memberships and entitlements, and for the catalogs it publishes to them. Since D2 farm is a dependency of every product, which is the price of that decision. Those are the edges that make the picture dense.

The path that would have broken the rule, the parsers of a separate ingestion system writing canonical data into the database of farm, no longer exists: D1 of the Open Decisions merged ingestion into farm, so the parsers write their own system's tables.

flowchart LR subgraph interfaces [Interfaces] direction TB norganization_dashboard[Organization Dashboard] nconsole[Console] nfarm_sync_client_and_installed_clients[Farm sync client and installed clients] npublic_readers[Public readers] ndevelopers[Developers] end subgraph platform [Moonitoring Platform] direction TB naccess[access] nfarm[farm] nmoochat[moochat] nai_gateway[ai-gateway] nai_model_platform[ai-model-platform] ngrant[grant] nreleases[releases] nnews[news] nstatus[status] ndatabases[(Cloud SQL, one database per system)] end nconsole -->|REST 49| naccess nconsole -->|REST 3| nai_gateway nconsole -->|REST 26| nai_model_platform nconsole -->|REST 143| nfarm nconsole -->|REST 47| ngrant nconsole -->|REST 27| nmoochat nconsole -->|REST 12| nnews nconsole -->|REST 67| nreleases nconsole -->|REST 12| nstatus nfarm_sync_client_and_installed_clients -->|REST 10| nfarm nfarm_sync_client_and_installed_clients -->|REST 6| nreleases norganization_dashboard -->|REST 76| naccess norganization_dashboard -->|REST 134| nfarm norganization_dashboard -->|REST 21| ngrant norganization_dashboard -->|REST 17| nmoochat norganization_dashboard -->|REST 3| nreleases npublic_readers -->|REST 3| naccess npublic_readers -->|REST 6| ngrant npublic_readers -->|REST 5| nreleases npublic_readers -->|REST 1| nstatus naccess -->|events 5 · gRPC 1| nai_gateway naccess -->|events 13 · gRPC 1| nai_model_platform naccess -->|events 14 · gRPC 1| nfarm naccess -->|events 13 · gRPC 1| ngrant naccess -->|events 13 · gRPC 1| nmoochat naccess -->|events 2 · gRPC 1| nnews naccess -->|events 13 · gRPC 1| nreleases naccess -->|gRPC 1| nstatus nai_gateway -->|gRPC 1| naccess nai_gateway -->|gRPC 4| nfarm nai_gateway -.->|events 1| ngrant nai_gateway -.->|events 1| nmoochat nai_model_platform -->|gRPC 1| naccess nai_model_platform -->|events 2 · gRPC 6| nfarm nfarm -->|events 1 · gRPC 4| naccess nfarm -->|gRPC 1| nai_gateway nfarm -->|events 10 · gRPC 3| nai_model_platform nfarm -->|events 6 · gRPC 1| ngrant nfarm -->|events 13 · gRPC 1| nmoochat nfarm -->|gRPC 1| nnews nfarm -->|events 7 · gRPC 2| nreleases nfarm -->|gRPC 1| nstatus ngrant -->|gRPC 1| naccess ngrant -->|gRPC 4| nai_gateway ngrant -->|gRPC 2| nfarm ngrant -.->|events 3| nmoochat nmoochat -->|gRPC 2| naccess nmoochat -->|events 1 · gRPC 5| nai_gateway nmoochat -->|gRPC 1| nai_model_platform nmoochat -->|gRPC 3| nfarm nmoochat -->|gRPC 1| ngrant nmoochat -->|gRPC 1| nnews nmoochat -->|gRPC 1| nreleases nmoochat -->|gRPC 1| nstatus nnews -->|gRPC 1| naccess nnews -->|gRPC 2| nfarm nreleases -->|gRPC 1| naccess nreleases -->|events 4 · gRPC 2| nfarm ndevelopers -->|each system's Dev ORM, just-in-time, approved| ndatabases naccess ---|own tables only| ndatabases nfarm ---|own tables only| ndatabases nmoochat ---|own tables only| ndatabases nai_gateway ---|own tables only| ndatabases nai_model_platform ---|own tables only| ndatabases ngrant ---|own tables only| ndatabases nreleases ---|own tables only| ndatabases nnews ---|own tables only| ndatabases nstatus ---|own tables only| ndatabases
From To REST gRPC Events
Console access 49
Console ai-gateway 3
Console ai-model-platform 26
Console farm 143
Console grant 47
Console moochat 27
Console news 12
Console releases 67
Console status 12
Farm sync client and installed clients farm 10
Farm sync client and installed clients releases 6
Organization Dashboard access 76
Organization Dashboard farm 134
Organization Dashboard grant 21
Organization Dashboard moochat 17
Organization Dashboard releases 3
Public readers access 3
Public readers grant 6
Public readers releases 5
Public readers status 1
access ai-gateway 1 5
access ai-model-platform 1 13
access farm 1 14
access grant 1 13
access moochat 1 13
access news 1 2
access releases 1 13
access status 1
ai-gateway access 1
ai-gateway farm 4
ai-gateway grant 1
ai-gateway moochat 1
ai-model-platform access 1
ai-model-platform farm 6 2
farm access 4 1
farm ai-gateway 1
farm ai-model-platform 3 10
farm grant 1 6
farm moochat 1 13
farm news 1
farm releases 2 7
farm status 1
grant access 1
grant ai-gateway 4
grant farm 2
grant moochat 3
moochat access 2
moochat ai-gateway 5 1
moochat ai-model-platform 1
moochat farm 3
moochat grant 1
moochat news 1
moochat releases 1
moochat status 1
news access 1
news farm 2
releases access 1
releases farm 2 4