Skip to content

enhancement(core): add support for transient messages to dataspaces - #2095

Merged
tobz merged 2 commits into
mainfrom
tobz/dataspace-messages
Jul 13, 2026
Merged

enhancement(core): add support for transient messages to dataspaces#2095
tobz merged 2 commits into
mainfrom
tobz/dataspace-messages

Conversation

@tobz

@tobz tobz commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary

This PR adds support for emitting "transient" messages to dataspaces.

Currently, dataspaces (aka DataspaceRegistry) allow for assertion/retraction of "facts": values that are set (and sometimes updated) over the lifecycle of a process but are always attached to that particular process from which they were asserted, automatically removed when the process stops. In some cases, however, we want to communicate values that can live beyond the lifecycle of a process without abusing the assertion/retraction pattern... otherwise, callers would have to try and figure out when they should pay attention to retractions vs when they don't need to, which is something we'd rather not do at all.

This PR adds support for emitting "transient" messages to dataspaces to support this lifecycle-less model of communication. In Syndicated Actors, where the concept of dataspaces originates from, this is actually an officially supported pattern, so really we're just bringing our implementation of dataspaces up to parity. 😅

In no specific order:

  • we changed AssertionUpdate to DataspaceUpdate since there's now a new enum variant for messages that is unrelated to assertions
  • there's a new method, DataspaceRegistry::send, for sending transient messages
  • transient messages have the same properties -- strongly typed, carries an identifier -- as assertions, but aren't tied to a process
  • messages come in alongside assertions/retractions on a given subscription
  • messages are only sent to active subscribers: they're never stored or replayed (hence "transient")

We're not optimizing for performance here since there's no use case (yet?) that requires this to act as a high-performance event bus.

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

How did you test this PR?

New and existing tests.

References

DADP-2

tobz commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

@dd-octo-sts dd-octo-sts Bot added area/core Core functionality, event model, etc. area/observability Internal observability of ADP and Saluki. labels Jul 13, 2026
@datadog-datadog-prod-us1-2

This comment has been minimized.

@pr-commenter

pr-commenter Bot commented Jul 13, 2026

Copy link
Copy Markdown

Binary Size Analysis (Agent Data Plane)

Baseline: c480462 · Comparison: 9e4891a · diff
Analysis Configuration: stripped binaries · Pass/Fail Threshold: +5%
Sizes: 41.57 MiB (baseline) vs 41.60 MiB (comparison)
Size Change: +28.23 KiB (+0.07%)

✅ Binary size difference within threshold

Changes by Module
Module File Size Symbols
tokio +12.09 KiB 479
anon.616682f45207a0b0c5ca668317e18b01.38.llvm.4933407896587571666 +10.33 KiB 1
anon.84466f5689dfb83e51567a6b56d70585.11.llvm.4191814962711865494 -10.33 KiB 1
anon.5f2ad6b78d80e06a5486a3aa9b588cac.0.llvm.1198158128097889638 +9.50 KiB 1
anon.067697e7467f0fe52fe342a4045d2b4c.82.llvm.8321187945284259587 -9.50 KiB 1
serde_json -8.85 KiB 21
core -6.44 KiB 925
crossbeam_channel +5.40 KiB 22
&mut serde_json +4.83 KiB 1
anon.061ad657bd5d2f931b857fc07cfe4e39.2.llvm.11063963451910516310 +4.38 KiB 1
anon.08d6aa4a5b49601fe6872e18f7d05cdc.547.llvm.5257818858558998185 -4.38 KiB 1
saluki_core::runtime::state +3.91 KiB 12
axum +3.82 KiB 36
anyhow -3.67 KiB 98
anon.4b96425527629dd46c8e30f667721d3d.215.llvm.10522313277786391035 +3.37 KiB 1
anon.7b1f3bc0f707c4b3c51155b8c4fa2d7c.215.llvm.5193126962255660412 -3.37 KiB 1
anon.064e082a154a7d883e9212745d52ca87.133.llvm.6972503068399417237 -3.36 KiB 1
anon.98e0a99a2b01d69d90e0b26cac49e7ed.1616.llvm.8367001703044527826 +3.29 KiB 1
anon.4b96425527629dd46c8e30f667721d3d.518.llvm.10522313277786391035 +3.27 KiB 1
anon.b4f779bdb511619f62c8ac598cbf7a0c.424.llvm.13569147439722624680 -3.20 KiB 1
Detailed Symbol Changes
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.5% +27.6Ki  +0.1% +3.69Ki    [6256 Others]
  [NEW] +10.3Ki  [NEW]     +79    anon.616682f45207a0b0c5ca668317e18b01.38.llvm.4933407896587571666
  [NEW] +9.50Ki  [NEW]     +91    anon.5f2ad6b78d80e06a5486a3aa9b588cac.0.llvm.1198158128097889638
  +258% +5.74Ki  +271% +5.74Ki    hyper::proto::h1::conn::Conn<I,B,T>::poll_read_body::h19f77dfa67325ef9
  [NEW] +4.83Ki  [NEW] +4.64Ki    _<&mut serde_json::de::Deserializer<R> as serde_core::de::Deserializer>::deserialize_any::he783073847c1146a
  +229% +4.75Ki  +241% +4.75Ki    hyper::proto::h1::conn::Conn<I,B,T>::poll_read_body::hbf0e0380018ee30b
  [NEW] +4.38Ki  [NEW]     +74    anon.061ad657bd5d2f931b857fc07cfe4e39.2.llvm.11063963451910516310
  [NEW] +3.85Ki  [NEW] +3.73Ki    axum::routing::method_routing::MethodRouter<S,E>::merge_for_path::h80d8c445b9ef6218
  [NEW] +3.79Ki  [NEW] +3.69Ki    indexmap::map::IndexMap<K,V,S>::insert::h3c5bbc780170908e
  [NEW] +3.37Ki  [NEW] +3.28Ki    anon.4b96425527629dd46c8e30f667721d3d.215.llvm.10522313277786391035
  [NEW] +3.29Ki  [NEW]     +89    anon.98e0a99a2b01d69d90e0b26cac49e7ed.1616.llvm.8367001703044527826
  [DEL] -3.34Ki  [DEL] -3.16Ki    serde_json::value::de::_<impl serde_core::de::Deserialize for serde_json::value::Value>::deserialize::h87cc0f243fee5ce4
  [DEL] -3.36Ki  [DEL]      -2    anon.064e082a154a7d883e9212745d52ca87.133.llvm.6972503068399417237
  [DEL] -3.37Ki  [DEL] -3.28Ki    anon.7b1f3bc0f707c4b3c51155b8c4fa2d7c.215.llvm.5193126962255660412
  [DEL] -3.75Ki  [DEL] -3.65Ki    indexmap::inner::Core<K,V>::insert_full::haef698b8658cdc47
  [DEL] -4.38Ki  [DEL]     -74    anon.08d6aa4a5b49601fe6872e18f7d05cdc.547.llvm.5257818858558998185
  [DEL] -4.69Ki  [DEL] -4.61Ki    hyper::proto::h1::decode::Decoder::decode::hede0829da98fc6d9
  [DEL] -4.77Ki  [DEL] -4.59Ki    serde_json::value::de::_<impl serde_core::de::Deserialize for serde_json::value::Value>::deserialize::hc59c15a8fa69af6f
  [DEL] -5.74Ki  [DEL] -5.66Ki    hyper::proto::h1::decode::Decoder::decode::h6622434c9fd25d92
  [DEL] -9.50Ki  [DEL]     -91    anon.067697e7467f0fe52fe342a4045d2b4c.82.llvm.8321187945284259587
  [DEL] -10.3Ki  [DEL]     -79    anon.84466f5689dfb83e51567a6b56d70585.11.llvm.4191814962711865494
  +0.1% +28.2Ki  +0.0% +4.67Ki    TOTAL

@tobz tobz added the type/enhancement An enhancement in functionality or support. label Jul 13, 2026
@tobz
tobz marked this pull request as ready for review July 13, 2026 13:39
@tobz
tobz requested a review from a team as a code owner July 13, 2026 13:39

@webern webern left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. 👍

@tobz
tobz force-pushed the tobz/dataspace-messages branch from 81cdfc5 to 1e66828 Compare July 13, 2026 13:50
@pr-commenter

pr-commenter Bot commented Jul 13, 2026

Copy link
Copy Markdown

Regression Detector (Agent Data Plane)

Run ID: 0037e60f-9d4e-4128-b1f7-85aaa68c447f
Baseline: c4804620 · Comparison: 9e4891a4 · diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment (5)

Experiments configured erratic: true are tagged (ignored) and skipped when determining which experiments regressed or improved. Experiments which are detected as erratic at runtime are tagged (erratic) to flag that the run's sample dispersion was high, but their regression / improvement signal still counts.

experiment goal Δ mean % links
quality_gates_rss_dsd_low memory ⚪ +0.40 metrics profiles logs
quality_gates_rss_idle memory ⚪ +0.09 metrics profiles logs
quality_gates_rss_dsd_medium memory ⚪ -0.04 metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory ⚪ -0.14 metrics profiles logs
quality_gates_rss_dsd_heavy memory ⚪ -0.28 metrics profiles logs
Bounds Checks: ✅ Passed (5)
experiment check replicates observed links
quality_gates_rss_dsd_heavy memory_usage 10/10 ✅ 132 MiB ≤ 140 MiB metrics profiles logs
quality_gates_rss_dsd_low memory_usage 10/10 ✅ 43.1 MiB ≤ 50 MiB metrics profiles logs
quality_gates_rss_dsd_medium memory_usage 10/10 ✅ 64.9 MiB ≤ 75 MiB metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 ✅ 191 MiB ≤ 200 MiB metrics profiles logs
quality_gates_rss_idle memory_usage 10/10 ✅ 28.9 MiB ≤ 40 MiB metrics profiles logs
Explanation

A change is flagged as a regression when |Δ mean %| > 5.00% in the regressing direction for its optimization goal AND SMP marks the experiment as a regression (is_regression: true). Improvements use the matching criteria for the improving direction. Experiments configured erratic: true (tagged (ignored)) are skipped outright; experiments detected as erratic at runtime (tagged (erratic)) still count, since that flag describes sample dispersion rather than directional certainty. The Δ mean % cell is colored accordingly: 🟢 = improvement, 🔴 = regression, ⚪ = neutral. Reduction in CPU or memory is an improvement; reduction in ingress throughput is a regression.

@tobz
tobz force-pushed the tobz/dataspace-messages branch from 1e66828 to 9e4891a Compare July 13, 2026 16:58
@tobz
tobz merged commit 5e5efc9 into main Jul 13, 2026
82 checks passed
@tobz
tobz deleted the tobz/dataspace-messages branch July 13, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Core functionality, event model, etc. area/observability Internal observability of ADP and Saluki. type/enhancement An enhancement in functionality or support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants