Elffuss BraidHub

kikocis/EDC public

main · 2.9 KiBRenderedRawPermalink
1# Transfer Process
2
3## Data Flows Supported by the EDC
4
5- Consumer pull
6- Provider push
7
8### Consumer pull
9
10![alt text](diagrams/transfer-data-plane-consumer-pull.png)
11
121. Provider and consumer agree to a contract (not displayed in the diagram)
132. Consumer initiates the transfer process by sending a `DataRequest` with destination type `HttpProxy`
143. Provider Data Plane Selector is queried to find a suitable instance
154. Provider Control Plane build a `DataAddress` which type `EDR`, whose:
16 - endpoint corresponds to the public API of the selected Data Plane
17 - auth key is `Authorization`
18 - auth code is a signed token generated by the Control Plane with claims:
19 - `dad` containing the encrypted `DataAddress` of the actual data source (provider ecosystem)
20 - `cid` claim containing the contract id
215. This `DataAddress` is sent to the consumer Control Plane through DSP protocol
226. Consumer Control Plane converts the `DataAddress` into a `EndpointDataReference` object and dispatch it through the `EndpointDataReferenceReceiverRegistry`
23
24Once this process is completed, the consumer backend applications can use the received `EndpointDataReference` in order
25to query data from the provider Data Plane, by simply providing the provided token in the request header.
26
27> **_NOTE:_** For a Data Plane instance to be eligible for the Consumer Pull transfer, it must:
28> - contains `HttpProxy` in the `allowedDestTypes`
29> - contain a `property` which key `publicApiUrl`, which contains the actual URL of the Data Plane public API.
30
31### Provider push
32
33![alt text](diagrams/transfer-data-plane-provider-push.png)
34
351. Provider and consumer agree to a contract (not displayed in the diagram)
362. Consumer initiates the transfer process, i.e. sends `DataRequest` with any destination type other than `HttpProxy`
373. Provider Control Plane retrieves the `DataAddress` of the actual data source and creates a `DataFlowRequest` based on the received `DataRequest` and this data address
384. Provider Control Plane asks the selector which Data Plane instance can be used for this data transfer
395. Selector returns an eligible Data Plane instance (if any)
406. Provider Control Plane sends the `DataFlowRequest` to the selected Data Plane instance through its control API (see `DataPlaneControlApi`)
417. Provider Data Plane validates the incoming request
428. If request is valid, Provider Data Plane returns acknowledgement
439. `DataPlaneManager` of the Provider Data Plane processes the request: it creates a `DataSource`/`DataSink` pair based on the source/destination data addresses
4410. Provider Data Plane fetches data from the actual data source (see `DataSource`)
4511. Provider Data Plane pushes data to the consumer services (see `DataSink`)
46
47## Transfer Process State Machine
48
49### Consumer
50![Transfer Process Consumer State Machine](diagrams/transfer-process-consumer-states.png)
51
52### Provider
53![Transfer Process Provider State Machine](diagrams/transfer-process-provider-states.png)