enhancement(core): add dataspaces for decoupled, cross-process state#1178
enhancement(core): add dataspaces for decoupled, cross-process state#1178
Conversation
e8b5919 to
52f0a8a
Compare
b284244 to
75a8e2c
Compare
Binary Size Analysis (Agent Data Plane)Target: ddb45ed (baseline) vs d8bbc70 (comparison) diff
|
| Module | File Size | Symbols |
|---|---|---|
core |
+8.06 KiB | 107 |
saluki_core::runtime::state |
+5.71 KiB | 3 |
saluki_core::runtime::supervisor |
+2.39 KiB | 10 |
memory_accounting::allocator::AllocationGroupRegistry |
+2.28 KiB | 1 |
[Unmapped] |
+1.93 KiB | 1 |
saluki_core::runtime::process |
-1.52 KiB | 9 |
[sections] |
+453 B | 8 |
tokio |
+377 B | 29 |
alloc |
+295 B | 113 |
agent_data_plane::cli::run |
-152 B | 1 |
saluki_core::observability::metrics |
-120 B | 1 |
std |
-114 B | 27 |
saluki_context::resolver::ContextResolverBuilder |
+95 B | 1 |
unicode_segmentation |
+88 B | 1 |
saluki_common::cache::Telemetry |
-80 B | 1 |
saluki_context::resolver::Telemetry |
-80 B | 1 |
saluki_core::pooling::PoolMetrics |
-60 B | 1 |
saluki_core::topology::interconnect |
-59 B | 2 |
stats_mutexes_node |
-48 B | 1 |
url |
+44 B | 3 |
Detailed Symbol Changes
FILE SIZE VM SIZE
-------------- --------------
[NEW] +10.7Ki [NEW] +10.6Ki std::sys::backtrace::__rust_begin_short_backtrace::h548b3772a163180a
[NEW] +10.6Ki [NEW] +10.5Ki <saluki_core::data_model::event::Event as core::clone::Clone>::clone.9951
+0.7% +10.4Ki +0.5% +5.35Ki [568 Others]
[NEW] +9.28Ki [NEW] +9.15Ki saluki_core::runtime::supervisor::Supervisor::run_inner::_{{closure}}::hda4922d194f52fe3
[NEW] +5.52Ki [NEW] +5.38Ki <hickory_proto::rr::record_data::RData as core::clone::Clone>::clone.8398
[NEW] +5.13Ki [NEW] +5.00Ki <hickory_proto::rr::record_data::RData as core::clone::Clone>::clone.11202
[NEW] +4.85Ki [NEW] +4.72Ki saluki_core::runtime::state::dataspace::DataspaceRegistry::retract_all_for_process::h0f5ee79d3ecb5ce2
[NEW] +4.71Ki [NEW] +4.59Ki <rustls::error::Error as core::clone::Clone>::clone.9929
[NEW] +4.71Ki [NEW] +4.59Ki <rustls::error::Error as core::clone::Clone>::clone.11217
[NEW] +4.62Ki [NEW] +4.48Ki saluki_core::runtime::supervisor::Supervisor::run_with_process_shutdown::_{{closure}}::h35f81bdadcdc76de
[NEW] +3.83Ki [NEW] +3.71Ki <webpki::error::Error as core::fmt::Debug>::fmt.11395
[NEW] +3.66Ki [NEW] +3.54Ki <rustls::error::Error as core::fmt::Debug>::fmt.9554
[DEL] -3.66Ki [DEL] -3.54Ki <rustls::error::Error as core::fmt::Debug>::fmt.9534
[DEL] -3.83Ki [DEL] -3.71Ki <webpki::error::Error as core::fmt::Debug>::fmt.11365
[DEL] -4.71Ki [DEL] -4.59Ki <rustls::error::Error as core::clone::Clone>::clone.11187
[DEL] -4.71Ki [DEL] -4.59Ki <rustls::error::Error as core::clone::Clone>::clone.9909
[DEL] -5.13Ki [DEL] -5.00Ki <hickory_proto::rr::record_data::RData as core::clone::Clone>::clone.11172
[DEL] -5.52Ki [DEL] -5.38Ki <hickory_proto::rr::record_data::RData as core::clone::Clone>::clone.8378
[DEL] -9.47Ki [DEL] -9.34Ki saluki_core::runtime::supervisor::Supervisor::run_inner::_{{closure}}::h0938ec543ef1cbd3
[DEL] -10.6Ki [DEL] -10.5Ki <saluki_core::data_model::event::Event as core::clone::Clone>::clone.9931
[DEL] -11.0Ki [DEL] -10.9Ki std::sys::backtrace::__rust_begin_short_backtrace::h80c871e1f134c750
+0.1% +19.4Ki +0.1% +14.1Ki TOTAL
Regression Detector (Agent Data Plane)Regression Detector ResultsRun ID: faf45b67-4ff7-4625-b4b3-ca34d3719981 Baseline: ddb45ed Optimization Goals: ✅ No significant changes detected
|
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ➖ | otlp_ingest_logs_5mb_memory | memory utilization | +3.13 | [+2.91, +3.34] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | +0.93 | [-3.48, +5.35] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | -0.03 | [-0.15, +0.09] | 1 | (metrics) (profiles) (logs) |
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ➖ | dsd_uds_1mb_3k_contexts_cpu | % cpu utilization | +3.81 | [-51.56, +59.17] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_memory | memory utilization | +3.16 | [+2.92, +3.39] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_cpu | % cpu utilization | +3.13 | [-2.97, +9.23] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_memory | memory utilization | +3.13 | [+2.91, +3.34] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_cpu | % cpu utilization | +3.03 | [+0.84, +5.22] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_cpu | % cpu utilization | +2.77 | [-28.29, +33.82] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_cpu | % cpu utilization | +1.56 | [-4.98, +8.10] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | +0.93 | [-3.48, +5.35] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_medium | memory utilization | +0.47 | [+0.28, +0.66] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_throughput | ingress throughput | +0.41 | [+0.29, +0.54] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_memory | memory utilization | +0.24 | [-0.10, +0.58] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_memory | memory utilization | +0.19 | [-0.06, +0.43] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_memory | memory utilization | +0.17 | [-0.01, +0.36] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_memory | memory utilization | +0.13 | [-0.12, +0.38] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_low | memory utilization | +0.08 | [-0.11, +0.27] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_memory | memory utilization | +0.03 | [-0.14, +0.20] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_throughput | ingress throughput | +0.00 | [-0.14, +0.15] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_throughput | ingress throughput | +0.00 | [-0.13, +0.13] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_throughput | ingress throughput | +0.00 | [-0.06, +0.06] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_throughput | ingress throughput | +0.00 | [-0.02, +0.02] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_throughput | ingress throughput | +0.00 | [-0.02, +0.02] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_throughput | ingress throughput | -0.00 | [-0.02, +0.02] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_throughput | ingress throughput | -0.00 | [-0.06, +0.05] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_memory | memory utilization | -0.01 | [-0.17, +0.16] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_throughput | ingress throughput | -0.01 | [-0.04, +0.02] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_ultraheavy | memory utilization | -0.02 | [-0.16, +0.12] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | -0.03 | [-0.15, +0.09] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_memory | memory utilization | -0.06 | [-0.24, +0.12] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_idle | memory utilization | -0.12 | [-0.16, -0.09] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_heavy | memory utilization | -0.19 | [-0.32, -0.06] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_cpu | % cpu utilization | -0.26 | [-1.78, +1.25] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_memory | memory utilization | -0.52 | [-0.69, -0.36] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_cpu | % cpu utilization | -1.02 | [-3.22, +1.17] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_cpu | % cpu utilization | -1.15 | [-3.46, +1.16] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_cpu | % cpu utilization | -3.92 | [-60.06, +52.22] | 1 | (metrics) (profiles) (logs) |
Bounds Checks: ✅ Passed
| perf | experiment | bounds_check_name | replicates_passed | observed_value | links |
|---|---|---|---|---|---|
| ✅ | quality_gates_rss_dsd_heavy | memory_usage | 10/10 | 113.95MiB ≤ 140MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_low | memory_usage | 10/10 | 34.23MiB ≤ 50MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_medium | memory_usage | 10/10 | 55.97MiB ≤ 75MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_ultraheavy | memory_usage | 10/10 | 171.49MiB ≤ 200MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_idle | memory_usage | 10/10 | 21.28MiB ≤ 40MiB | (metrics) (profiles) (logs) |
Explanation
Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%
Performance changes are noted in the perf column of each table:
- ✅ = significantly better comparison variant performance
- ❌ = significantly worse comparison variant performance
- ➖ = no significant change in performance
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
75a8e2c to
cc926a0
Compare
52f0a8a to
97b3a4d
Compare
cc926a0 to
2eacb9c
Compare
97b3a4d to
90a9af1
Compare
90a9af1 to
8a17cac
Compare
2eacb9c to
32b6e9b
Compare
32b6e9b to
999e501
Compare
8a17cac to
46ef9d0
Compare
46ef9d0 to
b24c86d
Compare
1aef500 to
0c296be
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7654fa2 to
c6d3919
Compare
7379960 to
217c8d0
Compare
…ate management in processes
217c8d0 to
d8bbc70
Compare

Summary
This PR introduces support for dataspaces, a process-centric approach for eventually consistent sharing of data.
Preface
Dataspaces are a novel approach to communicating between processes in an actor system. While pure message passing is simple and generally straightforward to understand, it falls down in a number of areas: of note, specificity (what part of the "conversation" a process cares about), discoverability (joining the conversation as a late comer), and context (knowing what has already been said prior to joining). In the literature, dataspaces make up the foundation of what the author calls "conversational concurrency." In Saluki, we very much intend for it to provide much of the same thing: message passing without message passing.
In
saluki-core, we have a burgeoning runtime system that, if you squint, looks a lot like Erlang/OTP, but importantly: we are not Erlang. Rust does not, and never will, have the requisite parts -- language and VM -- to elegantly provide an actor system, including message passing. Attempts to build actor systems in Rust generally stumble (IMO) when it comes to the message passing/coordination bit because it looks weird, and requires a lot of contortions to get around the fact that the language and runtime are just not designed for message passing actors. We still have a need for processes to coordinate with each other, though.What are dataspaces?
Dataspaces are a way to meet our message passing-style needs in the runtime system. In simple terms, dataspaces represent a collection of tuples -- owner, identifier, data -- that are pushed into the dataspace by processes and then queried by other processes. There are a number of specific terms, features, and constraints of dataspaces that make them particularly powerful:
1", or "give me assertionsapi-routes-*", etc)A real example: dynamic API routes
This has all been a bit theoretical, so let's ground dataspaces in a concrete use case: dynamic API routes. This is actually something that upstack PRs add support for, but let's chat about it briefly here.
ADP has API endpoints which expose routes tied to various subsystems: memory bounds/allocation tracking, health status, DSD stats tracking, and more. These API routes need to be registered when we're setting up the process very early on, and have no way to be changed later on. This means we have to often expose specific bits of data from subsystems deep in the program just to be able to properly attach their API routes, leading to a more fragile design than necessary. This doesn't change even if we reverse the flow from collecting all API routes and adding them at process start to pushing the API route add logic down to all the places that care about it. Additionally, we would also need to add in all of the synchronization for handling concurrent calls to add/remove API routes, as well as consider how to handle scenarios where a component that added API routes has gone away and is no longer able to handle those API calls.
Dataspaces allow us to elegantly solve this problem:
At no point do the API server processes or the subsystem processes have to know (or care) about where the other one lives, or how to get to them: they communicate through the dataspace, and all of the comings and goings are tracked there. They don't need to build their own signaling mechanisms for handling failure. Additionally, we now also get a new side benefit: if the API server processes die, and get restarted, they can subscribe and immediately get a snapshot of the current state of the world in terms of asserted API routes, and almost immediately recover.
Decoupled, eventually consistent, simple.
Change Type
How did you test this PR?
A slew of new unit tests.
References
AGTMETRICS-400