@startuml
participant Instrument as IRIS
participant "Event\nService" as event
participant "Metadata\nCollection\nService" as MCS
database "Metadata\nDatabase" as MDB
MCS -> event : subscribe to all events
MCS -> event : subscribe to observe events
event -> MCS : collect events
IRIS -> event : publish ExposureStart observe event
event -> MCS : receive observe event
MCS -> MDB : write snapshot of all events
MCS -> MDB : write snapshot of keyword-value pairs
IRIS -> IRIS: exposure taken
IRIS -> event : publish ExposureEnd observe event
event -> MCS : receive observe event
MCS -> MDB : write snapshot of all events
MCS -> MDB : write snapshot of keyword-value pairs
@enduml