| 1 | # Data plane module |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | This module covers the Data Plane Framework (DPF), which is the entity in charge of performing the actual data transfer |
| 6 | between consumer and provider. This DPF is developed in such a way that it can support a myriad of deployment |
| 7 | topologies. |
| 8 | |
| 9 | ## Scope |
| 10 | |
| 11 | The Data Plane Framework is designed to only work with: |
| 12 | |
| 13 | - finite data transfers, |
| 14 | - small payload, latent non-finite transfers such as events. |
| 15 | |
| 16 | High-volume or latency-sensitive streaming (non-finite) data transfers should be handled by other implementations that |
| 17 | delegate to specialized third-party infrastructure such as Kafka. |
| 18 | |
| 19 | ## Principles |
| 20 | |
| 21 | ### Minimal state |
| 22 | |
| 23 | All state pertaining to a transfer process are maintained by the Control Plane as part of the `TransferProcess`. The |
| 24 | only state that is maintained by the DPF is if a transfer process has been completed. This requires the Control Plane to |
| 25 | issue retries in the event of failure. |
| 26 | |
| 27 | ### No transformation |
| 28 | |
| 29 | The DPF is not an ETL tool. It does not contain any facilities for data transformations or processing. This is expected |
| 30 | to be handled by the Control Plane as part of the provisioning state. |
| 31 | |
| 32 | ### Do not reinvent the wheel |
| 33 | |
| 34 | The DPF relies on existing data transfer technology such as S3, Azure Object Storage, FTP, etc. As a rule of thumb: the |
| 35 | DPF should not contain any wire protocol implementations. |
| 36 | |
| 37 | ### Flexible Deployment |
| 38 | |
| 39 | It must be possible to: |
| 40 | |
| 41 | - deploy the DPF to a K8S cluster, |
| 42 | - deploy the DPF remotely from the Control Plane, |
| 43 | - deploy the DPF in the same process as the Control Plane for demo and testing purposes, |
| 44 | |
| 45 | ### Extensible |
| 46 | |
| 47 | The DPF is built using the EDC modularity and extensibility system. |
| 48 | |
| 49 | ## Design |
| 50 | |
| 51 | ### Data Plane Manager |
| 52 | |
| 53 | The DataPlaneManager (DPM) enqueues `DataFlowRequest`, which may originate from an ingress such as an HTTP endpoint. The |
| 54 | queue implementation will be a bounded, in-memory data structure that provides support for backpressure when the system |
| 55 | is overloaded. However, since the queue is in-memory, the client control plane submitting the request will be |
| 56 | responsible for re-submitting a request in the event of failure. |
| 57 | |
| 58 | The DPM implementation has a configurable number of workers that dequeue requests for processing (data transfer). This |
| 59 | processing operation will complete asynchronously. When a result is returned, an entry for the process indicating |
| 60 | success or failure is made using extensible storage. This allows the Control Plane to query the DPF for the status ( |
| 61 | COMPLETED or ERROR) of a process. No other state is maintained by the DPF. |
| 62 | |
| 63 | The DPM also contains transfer methods that take a `DataSource` and `DataSink`, respectively, These can be used to |
| 64 | provide an ad-hoc transfer source or destination. For example, user code may dequeue a message to memory and send it to |
| 65 | a destination using an `InputStreamDataSource` that wraps the in-memory message. Similarly, user code may wish to |
| 66 | transfer data from a source to a provided `OutputStreamDataSink`. |
| 67 | |
| 68 | ### Pipeline Service |
| 69 | |
| 70 | When a DPM worker dequeues a request, it will delegate to the `transfer` method of the `PipelineService`. |
| 71 | |
| 72 | The implementation of this service is straightforward: it connects a sink with its source, both of which are |
| 73 | instantiated by extensible factories. This design allows for scalable, _n_-way data transfers since all data are |
| 74 | directly streamed from its origin to the terminus. |
| 75 | |
| 76 | ### Pull Streaming |
| 77 | |
| 78 | The DPF design is based on a pull streaming model, i.e. a `DataSink` pulls data from a `DataSource`. This allows the |
| 79 | sink to control the rate of transfer and potentially parallelize operation. Moreover, optimizations can be made such as |
| 80 | copy-in-place when the source and sink are the same infrastructure such as object storage hosted by a single cloud |
| 81 | provider. |
| 82 | |
| 83 | Implementations may support random data access for parallel transfers of large files. For example, both AWS S3 and Azure |
| 84 | Object Storage have facilities for ranged gets. |
| 85 | |
| 86 | `DataSink` implementations will provide the ability to configure parallel transfers, e.g. controlling the number of |
| 87 | threads to perform ranged gets. |