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
@@ -106,6 +107,10 @@ multi-step migration round-trip suite and a trybuild compile-fail harness.
106
107
107
108
### Added
108
109
110
+
-**Zero-allocation generated Postcard encoding (Issue #177).**`Linkable` gains a source-compatible `encode_into(&mut [u8])` fast path and generated Postcard records implement it with `postcard::to_slice`. Core reuses onebounded 256-byte scratch allocation per generated Postcard outbound route (raw builders choose their capacity) and falls back to the existing owned serializer when a value does not fit. The codec seam is gated by a 10,000-iteration allocation-counting bench (0 allocations, 0 bytes) plus
111
+
host, `no_std` Cortex-M, and codegen-drift tests. The claim intentionally excludes connector-internal payload copies and the existing boxed connector reader future. ([aimdb-core](aimdb-core/CHANGELOG.md),
-**Embassy MQTT client TLS — `mqtts://` for embedded, WP7 ([design 044](docs/design/044-embassy-mqtt-tls.md)).** The Embassy MQTT connector can now dial a broker over TLS 1.3 (`embedded-tls`, pure-Rust `rustpki` certificate verification with `rsa`/`p384` so public CA chains verify out of the box), with SNI/hostname verification, DNS resolution, and a connector-internal SNTP time source that gates the first handshake so certificate validity is always checked against real time. Behind the new `embassy-tls` feature; `MqttConnectorBuilder::new` picks the transport from the URL scheme (`mqtt://` plain, `mqtts://` TLS) and gains `with_tls(TlsOptions)` (entropy, record buffers, SNTP server) and `with_credentials(username, password)` (MQTT CONNECT auth, both transports). The plain `mqtt://` path is untouched. The `embassy-mqtt-connector-demo` example gains a `tls` feature demonstrating the full flow against the repo's `dev/mosquitto` bench broker. ([aimdb-mqtt-connector](aimdb-mqtt-connector/CHANGELOG.md))
110
115
- **Design 034 Phase 3 — sans-io KNX/IP tunneling engine shared by both transports (Issue #135, [review doc §3.7](docs/design/034-technical-debt-review.md)).** The entire tunneling lifecycle — CONNECT_REQUEST/RESPONSE handshake, TUNNELING_REQUEST/ACK sequence + pending-ACK bookkeeping, keepalive (CONNECTIONSTATE_REQUEST) scheduling, ACK-timeout sweeps, and reconnect-with-backoff — now lives **once**, in the new runtime-neutral `aimdb_knx_connector::tunnel` module (`no_std + alloc`, no tokio/embassy imports), driven as a poll-based state machine (events in, `Action`s out, `next_deadline()` for timer arming). `tokio_client.rs` (988 → ~530 lines incl. a new fake-gateway integration test) and `embassy_client.rs` (1,055 → ~450 lines) are reduced to socket shims; the previously untestable handshake/ACK/keepalive/reconnect paths now have 15 host-run unit tests plus a scripted localhost-UDP roundtrip test. Behavioral unifications: Embassy gains the 5 s CONNECT_RESPONSE timeout (previously waited forever), both shims reconnect on fatal socket errors, and the dead tokio-only per-publish ACK oneshot is dropped (it was always `None`); the CONNECT_REQUEST HPAI stays per-transport (`LocalEndpoint`: tokio = real bound address, Embassy = NAT mode). ([aimdb-knx-connector](aimdb-knx-connector/CHANGELOG.md))
**Why this change?** The new trait-based architecture provides:
642
+
631
643
- ✅ Symmetry with inbound routing (`ProducerTrait` ↔ `ConsumerTrait`)
632
644
- ✅ Testability (can mock `ConsumerTrait` without real records)
633
645
- ✅ Type safety via factory pattern (type capture at configuration time)
634
646
- ✅ Maintainability (connector logic stays in connector crate)
635
647
636
648
**Migration checklist for custom connectors:**
649
+
637
650
-[ ] Add `spawn_outbound_publishers()` method to connector implementation
638
651
-[ ] Call `db.collect_outbound_routes(protocol_name)` in `ConnectorBuilder::build()`
639
652
-[ ] Call `connector.spawn_outbound_publishers(db, routes)?` before returning
@@ -654,6 +667,7 @@ See [Connector Development Guide](docs/design/012-M5-connector-development-guide
654
667
### Added
655
668
656
669
#### Core Database (`aimdb-core`)
670
+
657
671
- Initial release of AimDB async in-memory database engine
658
672
- Type-safe record system using `TypeId`-based routing
659
673
- Three buffer types for different data flow patterns:
@@ -667,6 +681,7 @@ See [Connector Development Guide](docs/design/012-M5-connector-development-guide
667
681
- Remote access protocol (AimX v1) for cross-process introspection
668
682
669
683
#### Runtime Adapters
684
+
670
685
-**Tokio Adapter** (`aimdb-tokio-adapter`): Full-featured std runtime support
671
686
- Lock-free buffer implementations
672
687
- Configurable buffer capacities
@@ -677,6 +692,7 @@ See [Connector Development Guide](docs/design/012-M5-connector-development-guide
677
692
- Compatible with ARM Cortex-M targets
678
693
679
694
#### MQTT Connector (`aimdb-mqtt-connector`)
695
+
680
696
- Dual runtime support for both Tokio and Embassy
681
697
- Automatic consumer registration via builder pattern
682
698
- Topic mapping with QoS and retain configuration
@@ -686,6 +702,7 @@ See [Connector Development Guide](docs/design/012-M5-connector-development-guide
686
702
- Uses `mountain-mqtt` for embedded environments
687
703
688
704
#### Developer Tools
705
+
689
706
-**MCP Server** (`aimdb-mcp`): LLM-powered introspection and debugging
690
707
- Discover running AimDB instances
691
708
- Query record values and schemas
@@ -703,12 +720,14 @@ See [Connector Development Guide](docs/design/012-M5-connector-development-guide
703
720
- Clean error handling
704
721
705
722
#### Synchronous API (`aimdb-sync`)
723
+
706
724
- Blocking wrapper around async AimDB core
707
725
- Thread-safe synchronous record access
708
726
- Automatic Tokio runtime management
709
727
- Ideal for gradual migration from sync to async
710
728
711
729
#### Documentation & Examples
730
+
712
731
- Comprehensive README with architecture overview
713
732
- Individual crate documentation with examples
714
733
- 12 detailed design documents in `/docs/design`
@@ -719,6 +738,7 @@ See [Connector Development Guide](docs/design/012-M5-connector-development-guide
719
738
-`remote-access-demo`: Cross-process introspection server
720
739
721
740
#### Build & CI Infrastructure
741
+
722
742
- Comprehensive Makefile with color-coded output
723
743
- GitHub Actions workflows:
724
744
- Continuous integration (format, lint, test)
@@ -730,28 +750,33 @@ See [Connector Development Guide](docs/design/012-M5-connector-development-guide
730
750
- Dev container setup for consistent development environment
731
751
732
752
### Design Goals Achieved
753
+
733
754
- ✅ Sub-50ms latency for data synchronization
734
755
- ✅ Lock-free buffer operations
735
756
- ✅ Cross-platform support (MCU → edge → cloud)
736
757
- ✅ Type safety with zero-cost abstractions
737
758
- ✅ Protocol-agnostic connector architecture
738
759
739
760
### Known Limitations
761
+
740
762
- Kafka and DDS connectors planned for future releases
741
763
- CLI tool is currently skeleton implementation
742
764
- Performance benchmarks not yet included
743
765
- Limited to Unix domain sockets for remote access (no TCP yet)
744
766
745
767
### Dependencies
768
+
746
769
- Rust 1.75+ required
747
770
- Tokio 1.47+ for std environments
748
771
- Embassy 0.9+ for embedded environments
749
772
- See `deny.toml` for approved dependency licenses
750
773
751
774
### Breaking Changes
775
+
752
776
None (initial release)
753
777
754
778
### Migration Guide
779
+
755
780
Not applicable (initial release)
756
781
757
782
---
@@ -763,6 +788,7 @@ Not applicable (initial release)
763
788
AimDB v0.1.0 establishes the foundational architecture for async, in-memory data synchronization across MCU → edge → cloud environments. This release focuses on core functionality, dual runtime support, and developer tooling.
764
789
765
790
**Highlights:**
791
+
766
792
- 🚀 Dual runtime support: Works on both standard library (Tokio) and embedded (Embassy)
767
793
- 🔒 Type-safe record system eliminates runtime string lookups
768
794
- 📦 Three buffer types cover most data patterns
@@ -771,6 +797,7 @@ AimDB v0.1.0 establishes the foundational architecture for async, in-memory data
# B1 + B2 — latency (time/iter) and throughput (msgs/sec), one Criterion suite
57
62
cargo bench -p aimdb-bench --bench b1_b2_tokio
58
63
@@ -91,6 +96,7 @@ Criterion writes HTML reports to `target/criterion/`.
91
96
`b0_alloc_tokio` does not use Criterion. It runs a fixed warmup + batch cycle and writes JSON results to `aimdb-bench/target/bench-results/b0_alloc_tokio.json` (the path is anchored to the crate dir, so it is the same regardless of the directory you run from).
@@ -103,6 +109,9 @@ The committed baseline lives in `data/baselines/b0_alloc_tokio.json`. When a cha
103
109
104
110
`b0_alloc_embassy` mirrors this against the Embassy buffer backend and writes `data/baselines/b0_alloc_embassy.json` — also **0 allocs/msg** across all three profiles, confirming the Embassy `poll_recv` path is allocation-free on the host. The on-target B3 bench (`examples/embassy-bench-stm32h5`) re-checks the same 0-alloc claim against the real embedded allocator.
105
111
112
+
`b0_alloc_linkable` warms up for 1,000 iterations, then measures 10,000 generated-shape postcard `Linkable::encode_into` calls into one stack buffer.
113
+
The required result is **0 allocation calls and 0 allocated bytes**. It isolates the codec seam: `SerializedReader` still returns a boxed future, dynamic topics may allocate and connector implementations may copy payload ownership after the core pump lends them the scratch slice.
114
+
106
115
> **Embassy eager registration (design 039 F8/F9).** An Embassy `SpmcRing` reader registers its embassy `Subscriber` eagerly, at `subscribe()` time — matching Tokio's `broadcast` — so no separate priming step is needed before the first `push`.
107
116
108
117
**Noise reduction:** a `new_current_thread()` Tokio executor is used so there are no work-stealing threads and Tokio's scheduler does not allocate per-poll in the hot path.
@@ -127,5 +136,3 @@ Use them as a comparison point, not a regression gate. If they regress, `b0_allo
127
136
- Criterion p99 can vary ±5–10% on noisy CI runners. Use p50 medians for trend comparisons.
128
137
- Always specify `--release` or debug build consistently when comparing runs; optimizations differ by 5–50×.
129
138
-`b_alloc_pipeline` uses a paced source: per-message pace tokens and notification channels. The coordination overhead is included in the measured window.
0 commit comments