You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a1fe4b2
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/design.md
+91-23Lines changed: 91 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -339,8 +339,8 @@ the landed crates (§5.1) as follows:
339
339
|`core::lower` (L1→L2→L3) |`asap-frontend-*` (L1→L2) + `asap-l2::convert_root` (L2→L3, with the binder + column resolution) | landed, split per language |
|`core::optimizer` (L4 framework) |`asap-plan`|partial (CSE + the L3→L4 `implement_tree` pass (see §3 terminology) + `boundary`, #98; rule engine planned) |
343
-
|`core::cost`|`asap-plan::cost_model`|stub|
342
+
|`core::optimizer` (L4 framework) |`asap-plan`|landed, but not as a general rule engine — see §6.4 below for what's actually there vs. the general `OptimizerRule`/`RuleEngine` this section originally sketched (never built; superseded by the narrower `boundary`/`bind`/`CostModel` design, #98) |
343
+
|`core::cost`|`asap-plan::cost_model`|landed (the `CostModel` trait + `DefaultCostModel`; deliberately narrow — see §6.4)|
Deployment models compose rule sets by picking from the shared library + adding their own:
862
+
`DeploymentConstraints` and the `Executor`/`StageId` registration
863
+
sketch that used to follow this belong to the L5 discussion — see
864
+
`core::physical` below, also never built.
802
865
803
-
```rust
804
-
// in deployment-model-asaplifecycle
805
-
useasap_plan::optimizer::{RuleEngine, rules::*};
806
-
fnrule_set() ->Vec<Box<dynOptimizerRule>> {
807
-
vec![
808
-
Box::new(BindKllOnQuantile),
809
-
Box::new(BindCmsOnCount),
810
-
Box::new(FusionPassthrough),
811
-
// DC-specific additions:
812
-
Box::new(StageAwarePushDown), // pushes ops to edge when possible
813
-
Box::new(TransmissionCostRewrite), // uses TCO model to defer aggregation
814
-
]
815
-
}
816
-
```
817
-
818
-
Core also ships `DeploymentConstraints` as a trait object; each deployment model supplies a concrete impl with its deployment's memory budgets, network topology, available sketch backends, and the registered `Executor` list (one entry per concrete runtime instance, each tagged with its `StageId`). The executor list is populated from the deployment model's discovery channel — OpAMP for DC lifecycle, static config for single-backend query, the in-process `SessionContext` itself for fusion.
866
+
</details>
819
867
820
868
### `core::physical` — Layer 5 framework
821
869
870
+
**Status: planned, not yet built.** No `asap-physical` crate (or
871
+
equivalent) exists in this workspace today — the sketch below is the
872
+
intended design for L5 (stage allocation + emission), not a
873
+
description of shipped code. §6.0's crate map lists `core::physical`
874
+
as `—` / planned for exactly this reason. Treat the trait/struct names
875
+
below as a target to design against, not an API to depend on.
876
+
822
877
```rust
823
878
pubtraitPhysicalPlanner {
824
879
typeTopology:TopologyDescriptor;
@@ -933,6 +988,19 @@ impl PhysicalPlanner for LifecyclePlanner {
933
988
934
989
### `core::plan` — shared traits bridging layers
935
990
991
+
**Status: planned, not yet built — and a naming collision worth
992
+
flagging.** This `core::plan` (a cross-layer `DeploymentModel` trait
993
+
composing L4 rules + L5 topology + emission + constraints) is a
994
+
*different thing* from the real, landed `asap-plan` crate
995
+
(`crates/plan`), which §6.0's crate map lists under `core::optimizer`
996
+
(L4 only — see that section above for what's actually there). Neither
997
+
`DeploymentModel` nor the `OptimizerRule`/`PhysicalPlanner`/
998
+
`PlanEmitter`/`DeploymentConstraints` types it references exist
999
+
anywhere in this workspace today; this section predates the crate
1000
+
split and was never reconciled with it. Read as a target design for
1001
+
how a deployment model might eventually compose L4+L5+emission, not a
0 commit comments