Repository navigation
docs(query-engine): design engine boundaries for ASAPPlanner plans - #935
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y decisions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ispatcher Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ngest waits Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…isions 34-39 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dPlan decisions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…solve functions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
left a comment
There was a problem hiding this comment.
Overall the interfaces LGTM! Minor changes commented.
I can see when we actually implement these, there will be some missing fields.
| put(SummaryKey, SummaryState); get(plan, summary, range); evict_before(plan, summary, ts); | ||
| earliest_timestamp_per_summary() -> Map<summary, ts>; // was get_earliest_timestamp_per_aggregation_id | ||
| } | ||
| struct SummaryKey { plan: PlanId, summary: PhysicalASAPNodeId, window: (i64, i64) } |
There was a problem hiding this comment.
What does summarykey mean? SummaryId?
There was a problem hiding this comment.
It was the key of one stored window, which was confusing. I split it into SummaryId { plan, node } and SummaryWindowKey { summary, window }.
There was a problem hiding this comment.
SummaryId-> ViewId(plan (plan is a sub-DAG), node (what is node))?
There was a problem hiding this comment.
Reworked; see the view store model (decisions 43–44). It is now three concepts: ViewDefinitionId (the physical computation), ViewInputDataScope (the data that went in), ViewInstance (the state). Happy to do a call.
There was a problem hiding this comment.
Store keys are now (ViewDefinitionId, ViewInputDataScope), not plan and node. The definition id should be a physical view id from ASAPPlanner: ProjectASAP/ASAPPlanner#1429 (decision 44).
|
|
||
| ```rust | ||
| // main: the deployment owns the stores and injects them (decision 8). | ||
| let summaries = Arc::new(InMemorySummaryStore::new()); |
There was a problem hiding this comment.
Can we change the store definition to be "SummaryStore" and "RawDataStore", and make them internally decide whether in memory, or have the on disk part?
There was a problem hiding this comment.
Agreed. The traits are the boundary, and whether data is in memory or on disk is up to the implementation (decision 8). Caveat: a durable store would need summary ids that survive a restart.
There was a problem hiding this comment.
Caveat: a durable store would need summary ids that survive a restart. need explain of this.
There was a problem hiding this comment.
That caveat is gone. A physical ViewDefinitionId is the same across restarts, so a durable store can key recovered instances by it. Recovery itself is deferred (decision 8).
|
|
||
| trait RawDataStore { append(Source, SampleBatch); read(Source, range); evict(retention, now); } | ||
|
|
||
| enum SampleBatch { |
There was a problem hiding this comment.
Can we reuse the term from current ASAPPlanner? If the SampleBatch refers to data sources?
There was a problem hiding this comment.
Renamed to RawDataBatch, after ASAPPlanner's read_raw_data. It holds raw input only (decision 13).
There was a problem hiding this comment.
Do we need a table definition here? I think no.
There was a problem hiding this comment.
Agreed, removed. v1 only has TimeSeries.
…ind traits; generic ingest handler Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
…executor value types Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
… pipeline (I9) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
… (I11), T7 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
…stance); wait for ASAPPlanner physical view id Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
…capability matching Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
|
View identity, logical vs physical ids: findings and proposal (replies to the threads on lines 126, 128, 132 and 139, and ProjectASAP/ASAPPlanner#1429) How ASAPPlanner layers identity today (checked against
Lifted selection: walking down from a Findings:
Proposal for the data plane (v1):
Proposed for ASAPPlanner (none blocks v1): reframe #1429 as "a plan-independent id at the logical-candidate level (the sub-DAG with its θ and window widths), for reusing views across plans", and document Also:
I'll update the doc (terms, interface sketch, decisions 38, 43–44, step order) once we agree. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4jq8TFcKGchhF7Hfb
Design doc for the traits and boundaries ASAPQuery needs in order to run plans from ASAPPlanner (
InstallablePlan) and retire asap-planner-rs. Adapters, fallback clients and ingest decoders stay; the precompute engine andSimpleEnginemove behind newIngestEngine/QueryEnginetraits.Covers interfaces before → after, the new interfaces, recorded decisions, tabled questions (T1–T4) and open questions (Q3). It is limited to boundaries; engine implementations are out of scope.
The doc is the source of truth and will be updated as decisions change.
🤖 Generated with Claude Code