Skip to content

Commit

Permalink
doc: detail possible approaches for events streaming in EDC
Browse files Browse the repository at this point in the history
  • Loading branch information
bscholtes1A committed Aug 21, 2023
1 parent 2e8d5fa commit 94c2705
Show file tree
Hide file tree
Showing 11 changed files with 592 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 101 additions & 0 deletions Work Content/Streaming/cross_region_optimization.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
@startuml


skinParam NoteBackgroundColor WhiteSmoke
skinParam NoteFontColor Black
skinParam ParticipantBackgroundColor WhiteSmoke
skinParam ActorBackgroundColor WhiteSmoke
skinParam AgentBackgroundColor White
skinParam AgentBorderColor SkyBlue
skinparam shadowing false
skinparam BoxPadding 10

!define ParticipantAColor f8f2ff
!define ParticipantBColor d9edff
!define VCIssuersColor D5F5E3
!define DataspaceAuthorityColor FCF3CF
!define WarningColor Business
!define LeadColor Technology

autonumber

box "VC Issuers" #VCIssuersColor
participant VcIssuersDidServer as "DID server"
end box

box "Participant A applications" #ParticipantAColor
participant ParticipantAApps as "Backend apps" #Business
participant ParticipantAStreamingProxy as "Streaming proxy" #Business
end box

box "Participant A ecosystem" #ParticipantAColor
participant ParticipantADidServer as "DID Server" #Business
participant ParticipantAIdentityHub as "Identity Hub" #Business
participant ParticipantACatalog as "Catalog" #Business
participant ParticipantAControlPlane as "Control Plane" #Business
participant ParticipantADataPlane as "Data Plane" #Business
end box

box "Event mesh" #DataspaceAuthorityColor
participant BrokerNetwork as "Broker Network" #Business
end box

box "Participant B broker" #ParticipantBColor
participant ParticipantBBroker as "Broker" #Business
end box

box "Participant B ecosystem" #ParticipantBColor
participant ParticipantBDataPlane as "Data Plane" #Business
participant ParticipantBControlPlane as "Control Plane" #Business
participant ParticipantBCatalog as "Catalog" #Business
participant ParticipantBIdentityHub as "Identity Hub" #Business
participant ParticipantBDidServer as "DID Server" #Business
end box

autonumber 1
== Negotiate access to asset ==

ParticipantAControlPlane ->> ParticipantBControlPlane : request access to asset
activate ParticipantAControlPlane
activate ParticipantBControlPlane
group Verify VCs
ParticipantBControlPlane ->> ParticipantAIdentityHub : fetch Verifiable Credentials
activate ParticipantAIdentityHub
ParticipantAIdentityHub -->> ParticipantBControlPlane : return list of VCs
deactivate ParticipantAIdentityHub
ParticipantBControlPlane ->> ParticipantBControlPlane : resolve issuers\nDID documents
ParticipantBControlPlane ->> VcIssuersDidServer : query DID documents
activate VcIssuersDidServer
VcIssuersDidServer -->> ParticipantBControlPlane : DID document containing VC verification methods
deactivate VcIssuersDidServer
ParticipantBControlPlane ->> ParticipantBControlPlane : verify VCs and\nenforce policies
end
ParticipantBControlPlane ->> ParticipantBControlPlane : generate and\nstore contract
ParticipantBControlPlane ->> ParticipantAControlPlane : send contract
ParticipantAControlPlane ->> ParticipantAControlPlane : store contract

group Initiate transfer
ParticipantAControlPlane ->> ParticipantBControlPlane : send transfer request (contains the contract id)
ParticipantBControlPlane ->> ParticipantBControlPlane : verify VCs\n(steps 3 to 9)
group Broker network dynamic configuration (how to?)
ParticipantBControlPlane ->> BrokerNetwork : configure broker in consumer area
activate BrokerNetwork
BrokerNetwork -->> ParticipantBControlPlane : grant credential for consumer
end
ParticipantBControlPlane ->> ParticipantBBroker : request synchro of the local topic to the mesh
activate ParticipantBBroker
ParticipantBBroker ->> BrokerNetwork : topic synchro

ParticipantBControlPlane ->> ParticipantAControlPlane : send credential
end

deactivate ParticipantBControlPlane
deactivate ParticipantAControlPlane

== Streaming ==

activate ParticipantAApps
ParticipantAApps ->> BrokerNetwork : subscribe to topic\n(using credentials)
BrokerNetwork --> ParticipantAApps : events

@enduml
Binary file added Work Content/Streaming/http_push.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
93 changes: 93 additions & 0 deletions Work Content/Streaming/http_push.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
@startuml

skinParam NoteBackgroundColor WhiteSmoke
skinParam NoteFontColor Black
skinParam ParticipantBackgroundColor WhiteSmoke
skinParam ActorBackgroundColor WhiteSmoke
skinParam AgentBackgroundColor White
skinParam AgentBorderColor SkyBlue
skinparam shadowing false
skinparam BoxPadding 10

!define ParticipantAColor f8f2ff
!define ParticipantBColor d9edff
!define VCIssuersColor D5F5E3
!define DataspaceAuthorityColor FCF3CF
!define WarningColor Business
!define LeadColor Technology

autonumber

box "VC Issuers" #VCIssuersColor
participant VcIssuersDidServer as "DID server"
end box

box "Participant A applications" #ParticipantAColor
participant ParticipantAApps as "Ingestion endpoint" #Business
end box

box "Participant A ecosystem" #ParticipantAColor
participant ParticipantADidServer as "DID Server" #Business
participant ParticipantAIdentityHub as "Identity Hub" #Business
participant ParticipantACatalog as "Federated Catalog" #Business
participant ParticipantAControlPlane as "Control Plane" #Business
participant ParticipantADataPlane as "Data Plane" #Business
end box

box "Participant B ecosystem" #ParticipantBColor
participant ParticipantBDataPlane as "Data Plane" #Business
database ParticipantBTopic as "Topic" #Business
participant ParticipantBControlPlane as "Control Plane" #Business
participant ParticipantBCatalog as "Federated Catalog" #Business
participant ParticipantBIdentityHub as "Identity Hub" #Business
participant ParticipantBDidServer as "DID Server" #Business
end box

autonumber 1
== Negotiate access to asset ==

ParticipantAControlPlane ->> ParticipantBControlPlane : request access to asset
activate ParticipantAControlPlane
activate ParticipantBControlPlane
group Verify VCs
ParticipantBControlPlane ->> ParticipantAIdentityHub : fetch Verifiable Credentials
activate ParticipantAIdentityHub
ParticipantAIdentityHub -->> ParticipantBControlPlane : return list of VCs
deactivate ParticipantAIdentityHub
ParticipantBControlPlane ->> ParticipantBControlPlane : resolve issuers\nDID documents
ParticipantBControlPlane ->> VcIssuersDidServer : query DID documents
activate VcIssuersDidServer
VcIssuersDidServer -->> ParticipantBControlPlane : DID document containing VC verification methods
deactivate VcIssuersDidServer
ParticipantBControlPlane ->> ParticipantBControlPlane : verify VCs and\nenforce policies
end
ParticipantBControlPlane ->> ParticipantBControlPlane : generate and\nstore contract
ParticipantBControlPlane ->> ParticipantAControlPlane : send contract
ParticipantAControlPlane ->> ParticipantAControlPlane : store contract

group Initiate transfer
ParticipantAControlPlane ->> ParticipantBControlPlane : send transfer request (contains the \ningestion endpoint to which events must be pushed)
ParticipantBControlPlane ->> ParticipantBControlPlane : verify VCs\n(steps 2 to 7)
ParticipantBControlPlane ->> ParticipantBDataPlane : send transfer request
ParticipantBDataPlane -->> ParticipantBControlPlane : acknowledge transfer started
ParticipantBControlPlane -->> ParticipantAControlPlane : acknowledge transfer started
end

deactivate ParticipantBControlPlane
deactivate ParticipantAControlPlane

== Streaming ==

activate ParticipantBDataPlane
ParticipantBDataPlane ->> ParticipantBDataPlane : starts Kafka\nconsumer

group Streaming loop
ParticipantBDataPlane ->> ParticipantBTopic : consumes events
activate ParticipantBTopic
ParticipantBTopic -->> ParticipantBDataPlane : events
deactivate ParticipantBTopic
ParticipantBDataPlane ->> ParticipantAApps : push events through http
activate ParticipantAApps
end

@enduml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 101 additions & 0 deletions Work Content/Streaming/server_to_server_synchronization.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
@startuml


skinParam NoteBackgroundColor WhiteSmoke
skinParam NoteFontColor Black
skinParam ParticipantBackgroundColor WhiteSmoke
skinParam ActorBackgroundColor WhiteSmoke
skinParam AgentBackgroundColor White
skinParam AgentBorderColor SkyBlue
skinparam shadowing false
skinparam BoxPadding 10

!define ParticipantAColor f8f2ff
!define ParticipantBColor d9edff
!define VCIssuersColor D5F5E3
!define DataspaceAuthorityColor FCF3CF
!define WarningColor Business
!define LeadColor Technology

autonumber

box "VC Issuers" #VCIssuersColor
participant VcIssuersDidServer as "DID server"
end box

box "Participant A applications" #ParticipantAColor
participant ParticipantAApps as "Backend apps" #Business
end box

box "Participant A ecosystem" #ParticipantAColor
participant ParticipantADidServer as "DID Server" #Business
participant ParticipantAIdentityHub as "Identity Hub" #Business
participant ParticipantACatalog as "Catalog" #Business
participant ParticipantAControlPlane as "Control Plane" #Business
participant ParticipantADataPlane as "Data Plane" #Business
end box

box "Participant A broker" #ParticipantAColor
participant ParticipantABroker as "Broker" #Business
end box

box "Participant B broker" #ParticipantBColor
participant ParticipantBBroker as "Broker" #Business
end box

box "Participant B ecosystem" #ParticipantBColor
participant ParticipantBDataPlane as "Data Plane" #Business
participant ParticipantBControlPlane as "Control Plane" #Business
participant ParticipantBCatalog as "Catalog" #Business
participant ParticipantBIdentityHub as "Identity Hub" #Business
participant ParticipantBDidServer as "DID Server" #Business
end box

autonumber 1
== Negotiate access to asset ==

ParticipantAControlPlane ->> ParticipantBControlPlane : request access to asset
activate ParticipantAControlPlane
activate ParticipantBControlPlane
group Verify VCs
ParticipantBControlPlane ->> ParticipantAIdentityHub : fetch Verifiable Credentials
activate ParticipantAIdentityHub
ParticipantAIdentityHub -->> ParticipantBControlPlane : return list of VCs
deactivate ParticipantAIdentityHub
ParticipantBControlPlane ->> ParticipantBControlPlane : resolve issuers\nDID documents
ParticipantBControlPlane ->> VcIssuersDidServer : query DID documents
activate VcIssuersDidServer
VcIssuersDidServer -->> ParticipantBControlPlane : DID document containing VC verification methods
deactivate VcIssuersDidServer
ParticipantBControlPlane ->> ParticipantBControlPlane : verify VCs and\nenforce policies
end
ParticipantBControlPlane ->> ParticipantBControlPlane : generate and\nstore contract
ParticipantBControlPlane ->> ParticipantAControlPlane : send contract
ParticipantAControlPlane ->> ParticipantAControlPlane : store contract

group Initiate transfer
group Provision broker (optional)
ParticipantAControlPlane ->> ParticipantABroker : provision
activate ParticipantABroker
ParticipantABroker -->> ParticipantAControlPlane : aknowledge is provisioned
end
ParticipantAControlPlane ->> ParticipantBControlPlane : send transfer request (contains the contract id)
ParticipantBControlPlane ->> ParticipantBControlPlane : verify VCs\n(steps 2 to 7)
ParticipantBControlPlane ->> ParticipantBBroker : configure broker for new consumer
activate ParticipantBBroker
ParticipantBBroker -->> ParticipantBControlPlane : grant credential for consumer
end

deactivate ParticipantBControlPlane
deactivate ParticipantAControlPlane

== Streaming ==

ParticipantABroker ->> ParticipantBBroker : synchronize topic(s)
ParticipantBBroker --> ParticipantABroker : events

ParticipantAApps ->> ParticipantABroker : subscribe to topic
activate ParticipantAApps
ParticipantABroker -->> ParticipantAApps : events

@enduml
Loading

0 comments on commit 94c2705

Please sign in to comment.