@startuml 15_archi_config_nominale
skinparam componentStyle rectangle
skinparam backgroundColor white
skinparam defaultTextAlignment center

title C1 — Topologie nominale\n2 natifs · 2 indexeurs · 2 nœuds

package "Couche 1 — Mesh natif" #E8F4FD {
  component "Native A\n(hub autoritaire)" as NA #AED6F1
  component "Native B\n(hub autoritaire)" as NB #AED6F1
  NA <--> NB : heartbeat /opencloud/heartbeat/1.0 (20s)\n+ gossip PubSub oc-indexer-registry
}

package "Couche 2 — Indexeurs" #E9F7EF {
  component "Indexer A\n(DHT server)" as IA #A9DFBF
  component "Indexer B\n(DHT server)" as IB #A9DFBF
}

package "Couche 3 — Nœuds" #FEFBD8 {
  component "Node 1" as N1 #FAF0BE
  component "Node 2" as N2 #FAF0BE
}

' Enregistrements (one-shot, 60s)
IA -[#117A65]--> NA : subscribe signé (60s)\n/opencloud/native/subscribe/1.0
IA -[#117A65]--> NB : subscribe signé (60s)
IB -[#117A65]--> NA : subscribe signé (60s)
IB -[#117A65]--> NB : subscribe signé (60s)

' Heartbeats indexeurs → natifs (long-lived, 20s)
IA -[#27AE60]..> NA : heartbeat (20s)
IA -[#27AE60]..> NB : heartbeat (20s)
IB -[#27AE60]..> NA : heartbeat (20s)
IB -[#27AE60]..> NB : heartbeat (20s)

' Heartbeats nœuds → indexeurs (long-lived, 20s)
N1 -[#E67E22]--> IA : heartbeat long-lived (20s)\n/opencloud/heartbeat/1.0
N1 -[#E67E22]--> IB : heartbeat long-lived (20s)
N2 -[#E67E22]--> IA : heartbeat long-lived (20s)
N2 -[#E67E22]--> IB : heartbeat long-lived (20s)

note as Legend
  Légende :
  ──► enregistrement one-shot (signé)
  ···► heartbeat long-lived (20s)
  ──► heartbeat nœud → indexeur (20s)
end note

@enduml
