Skip to content

Commit 63b43ff

Browse files
committed
more system work
1 parent 717cec8 commit 63b43ff

11 files changed

Lines changed: 1106 additions & 1044 deletions

File tree

internal-packages/run-engine/README.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,15 @@ graph TD
211211
ESS[ExecutionSnapshotSystem]
212212
WS[WaitpointSystem]
213213
BS[BatchSystem]
214+
ES[EnqueueSystem]
214215
215216
%% Core Dependencies
216217
RE --> DS
217218
RE --> RAS
218219
RE --> ESS
219220
RE --> WS
220221
RE --> BS
222+
RE --> ES
221223
222224
%% System Dependencies
223225
DS --> ESS
@@ -227,6 +229,11 @@ graph TD
227229
RAS --> WS
228230
RAS --> BS
229231
232+
WS --> ESS
233+
WS --> ES
234+
235+
ES --> ESS
236+
230237
%% Shared Resources
231238
subgraph Resources
232239
PRI[(Prisma)]
@@ -236,15 +243,17 @@ graph TD
236243
RL[RunLocker]
237244
EB[EventBus]
238245
WRK[Worker]
246+
RCQ[ReleaseConcurrencyQueue]
239247
end
240248
241249
%% Resource Dependencies
242250
RE -.-> Resources
243-
DS -.-> PRI & LOG & TRC & RQ & RL
251+
DS -.-> PRI & LOG & TRC & RQ & RL & EB & WRK
244252
RAS -.-> PRI & LOG & TRC & RL & EB & RQ & WRK
245253
ESS -.-> PRI & LOG & TRC & WRK & EB
246-
WS -.-> PRI & LOG & TRC & WRK & EB
254+
WS -.-> PRI & LOG & TRC & WRK & EB & RCQ
247255
BS -.-> PRI & LOG & TRC & WRK
256+
ES -.-> PRI & LOG & TRC & WRK & EB & RQ
248257
```
249258

250259
## System Responsibilities
@@ -274,13 +283,20 @@ graph TD
274283
- Manages waitpoints for task synchronization
275284
- Handles waitpoint completion
276285
- Coordinates blocked runs
286+
- Manages concurrency release
277287

278288
### BatchSystem
279289

280290
- Manages batch operations
281291
- Handles batch completion
282292
- Coordinates batch-related task runs
283293

294+
### EnqueueSystem
295+
296+
- Handles enqueueing of runs
297+
- Manages run scheduling
298+
- Coordinates with execution snapshots
299+
284300
## Shared Resources
285301

286302
- **Prisma**: Database access
@@ -290,11 +306,13 @@ graph TD
290306
- **RunLocker**: Run locking mechanism
291307
- **EventBus**: Event communication
292308
- **Worker**: Background task execution
309+
- **ReleaseConcurrencyQueue**: Manages concurrency token release
293310

294311
## Key Interactions
295312

296-
1. **RunEngine** orchestrates all systems and holds shared resources
297-
2. **DequeueSystem** works closely with **RunAttemptSystem** for task execution
298-
3. **RunAttemptSystem** coordinates with **WaitpointSystem** and **BatchSystem** for run completion
299-
4. **ExecutionSnapshotSystem** is used by all other systems to track state
300-
5. All systems share common resources but have specific responsibilities
313+
1. **RunEngine** orchestrates all systems and manages shared resources
314+
2. **DequeueSystem** works with **RunAttemptSystem** for task execution
315+
3. **RunAttemptSystem** coordinates with **WaitpointSystem** and **BatchSystem**
316+
4. **WaitpointSystem** uses **EnqueueSystem** for run scheduling
317+
5. **ExecutionSnapshotSystem** is used by all other systems to track state
318+
6. All systems share common resources through the `SystemResources` interface

0 commit comments

Comments
 (0)