Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

Commit d98d09c

Browse files
committed
update docs
1 parent 5ac4374 commit d98d09c

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

docs/architecture.png

207 KB
Loading
-64.1 KB
Binary file not shown.

docs/design_doc.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@
1414

1515
**75% Goals:**
1616
- Able to break down a physical plan into a distributed QUERY plan.
17-
- Achieve both inter-QUERY and intra-QUERY parallelism.
18-
- Provide job status.
1917
- End-to-end correctness/performance testing framework.
18+
- Provide job status.
2019

2120
**100% Goals:**
22-
- Implement data shuffling between QUERY stages.
21+
- Achieve both inter-QUERY and intra-QUERY parallelism.
2322
- Cost-based and dynamic priority scheduling for better fairness.
24-
- Data-locality optimizations.
2523
- Able to abort/cancel a QUERY.
2624

2725
**125% Goals:**
@@ -30,16 +28,18 @@
3028

3129
# Architectural Design
3230

33-
![Project Proposal Architecture](project_proposal_arch.png "Project Proposal Architecture Diagram")
31+
![Project Proposal Architecture](architecture.png "Project Proposal Architecture Diagram")
32+
3433

3534
**Architectural Components:**
3635
- **DAG Parser:** Parses a Datafusion ExecutionPlan into a DAG of stages, where each stage consists of tasks that can be completed without shuffling intermediate results. After decomposing the work, it then enqueues tasks into a work queue in a breadth-first manner.
37-
- **Work Queue:** A concurrent queue (initially FIFO) where tasks are enqueued by the DAG Parser. Each QUERY submitted by the optimizer also has a cost, allowing for heuristic adjustments to the ordering.
36+
- **Work Queue:** A concurrent queue where tasks are enqueued by the DAG Parser. Each QUERY submitted by the optimizer also has a cost, allowing for heuristic adjustments to the ordering.
3837
- **Work Threads (tokio):** Tokio threads are created for each executor node to handle communications.
3938
- **QueryID Table:** An in-memory data structure mapping QueryIDs to a DAG of remaining QUERY fragments and cost estimates retrieved from the optimizer.
4039
- **Executors:** Each executor is connected to the scheduler and the other executors via gRPC (tonic).
41-
- **Intermediate Results**: Intermediate results are stored as a thread-safe HashMap<TaskKey, Vec<RecordBatch> in shared memory. All executors will be able to access intermediate results without having to serialize/deserialize data.
40+
- **Intermediate Results**: Intermediate results are stored as a thread-safe hashmap in shared memory. All executors will be able to access intermediate results without having to serialize/deserialize data.
4241

42+
![Task Dispatch Loop](task_dispatch_loop.png "Task Dispatch Loop")
4343
**Workflow:**
4444
1. Receives Datafusion ExecutionPlans from Query Optimizer and parses them into DAG, then stores in QueryID Table.
4545
2. Leaves of DAG are added to work queue that work threads can pull from.
@@ -62,6 +62,8 @@ Individual components within the scheduler will be unit tested using Rust’s te
6262

6363
The end-to-end testing framework is composed of three primary components: the mock frontend, the mock catalog, and the mock executors.
6464

65+
66+
![E2E Testing Architecture](e2e-testing-arch.png)
6567
### 1. Frontend
6668
The `MockFrontend` class is responsible for:
6769
- Establishing and maintaining a connection with the scheduler.
@@ -106,12 +108,12 @@ These consist of DataFusion executors and gRPC clients that execute tasks, recei
106108
### Performance Benchmarking
107109
To assess the scheduler's capacity to handle complex OLAP queries and maintain high throughput, we intend to use the integration test framework to simultaneously submit all 22 TPC-H queries across a cluster of executors. We will collect the following metrics:
108110

111+
- **Speedup from Scaling Out Executors**: Measure the speedup gained from increasing the number of executors.
109112
- **Execution Time for Each Query**: Measure the duration from submission to completion for each query.
110113
- **Busy-Idle Time Ratio for Each Executor**: Record periods of activity and inactivity for each executor throughout the test.
111114

112115
Additionally, we plan to develop data visualization tools in Python to present the results more effectively.
113116

114-
![E2E Testing Architecture](e2e_testing_arch.png)
115117

116118
## Future Composability with Other Components
117119
The mock optimizer and executor can be directly replaced with alternative implementations without necessitating any additional changes to the system. While the catalog, cache, and storage layers are not directly integrated into the testing system, we plan to encapsulate most of the logic within the mock catalog to simplify future integration.

docs/task_dispatch_loop.png

226 KB
Loading

0 commit comments

Comments
 (0)