@startuml S-ENDA dgaAPI Container diagram
!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/release/1-0/C4_Container.puml

LAYOUT_LEFT_RIGHT

System_Ext(geonorge, "Portals", "External portals harvest metadata on various standards")
System_Ext(user, "Advanced Users", "Advanced users harvest metadata with OpenSearch")
System_Ext(eventengine, "Event Engine", "")

System_Boundary(dgaAPI, "S-ENDA Find Node") {

Container(mmd_web_registrar, "MMD Web Registrar", "", "Provides functionality to register discovery metadata online.")
Container(mmd_cli_registrar, "MMD CLI Registrar", "", "Provides functionality to register discovery metadata from a Command Line Interface (CLI).")

Container(updater, "MMD Updater", "", "Provides functionality to compare provided and existing content, delete content, and create and update content in the discovery and configuration metadata store.")
Container(csapi, "Catalog Service API", "pyCSW", "Indexes the metadata store to allow fast search.")
Container(data_store, "Metadata Store", "MMD XML", "Serves as the authoritative source of discovery and configuration metadata.")

Container(usage_stats, "Usage Statistics", "", "Provides functionality to display dataset usage statistics.")
Container(prod_status, "Production status", "", "Provides functionality to display dataset production status.")


Rel(updater, eventengine, "Listens in order to get last updated info", "CloudEvents")
Rel(prod_status, eventengine, "Listens in order to get last updated info", "CloudEvents")


Rel(mmd_web_registrar, updater, "Provides discovery metadata")
Rel(mmd_cli_registrar, updater, "Provides discovery metadata")

Rel(updater, csapi, "Read", "CSW: MMD")
Rel(csapi, data_store, "Synchronize")

Rel(updater, data_store, "Create/update/delete")


}

Rel(geonorge, csapi, "Harvests", "CSW: ISO19139 (INSPIRE), Geo-DCAT-AP, DIF")
Rel(user, csapi, "Harvests", "OpenSearch")


@enduml
