All notable changes to the aimdb-core crate will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
No changes yet.
0.2.0 - 2025-11-20
- Bidirectional Connector Support: New
ConnectorBuildertrait enables connectors to support both outbound (AimDB → External) and inbound (External → AimDB) data flows - Type-Erased Router System: New
RouterandRouterBuilderinsrc/router.rsautomatically route incoming messages to correct typed producers without manual dispatch - Inbound Connector API: New
.link_from()method for configuring inbound connections (External → AimDB) with deserializer callbacks - Outbound Connector API: New
.link_to()method for configuring outbound connections (AimDB → External), replacing generic.link() - Producer Trait: New
ProducerTraitfor type-erased producer calls, enabling dynamic routing of messages to different record types - Resource ID Extraction: Added
ConnectorUrl::resource_id()method to extract protocol-specific resource identifiers (topics, keys, paths) - Producer Factory Pattern: New
ProducerFactoryFnandInboundConnectorLinktypes for creating producers dynamically at runtime - Consumer Trait for Outbound Routing: New
ConsumerTraitandAnyReadertraits insrc/connector.rsenable type-erased outbound message publishing, mirroringProducerTraitarchitecture - Outbound Route Collection: Added
AimDb::collect_outbound_routes()method to gather all configured outbound connectors with their type-erased consumers, serializers, and configs - Consumer Factory Pattern: New
ConsumerFactoryFntype alias and factory storage inOutboundConnectorLinkfor capturing types at configuration time - Type-Erased Consumer Adapter: Added
TypedAnyReaderinsrc/typed_api.rsimplementingAnyReadertrait forConsumer<T, R>
- Breaking: Connector Registration: Changed from
.with_connector(scheme, instance)to.with_connector(builder)- connectors now registered as builders - Breaking: Async Build:
AimDbBuilder::build()is now async to support connector initialization during database construction - Breaking: ConnectorBuilder Trait: Updated
build()signature to take&AimDb<R>, enabling route collection viadb.collect_inbound_routes() - Breaking: Sync Bound on Records: Added
Syncbound toAnyRecordtrait andTypedRecord<T, R>implementation. Record types must now beSend + Sync(previously onlySend). This enables safe concurrent access from multiple connector tasks in the bidirectional routing system. Types that wereSendbut notSyncmust be wrapped inArc<Mutex<_>>orArc<RwLock<_>>for interior mutability. - Breaking: Connector Naming Refactor: Renamed connector-related APIs to explicitly distinguish outbound (AimDB → External) from inbound (External → AimDB) flows:
TypedRecord::connectorsfield →outbound_connectorsTypedRecord::add_connector()→add_outbound_connector()TypedRecord::connectors()→outbound_connectors()TypedRecord::connector_count()→outbound_connector_count()AnyRecord::connector_count()→outbound_connector_count()AnyRecord::connector_urls()→outbound_connector_urls()AnyRecord::connectors()→outbound_connectors()RecordMetadata::connector_count→outbound_connector_count- Inbound methods (
inbound_connectors(),add_inbound_connector()) remain unchanged for clarity
- Deprecated
.link(): Generic.link()method deprecated in favor of explicit.link_to()and.link_from() - Builder API: Enhanced builder to validate buffer requirements for inbound connectors at configuration time
- Breaking: Outbound Consumer Architecture: Refactored outbound connector system to use trait-based type erasure:
- Removed:
TypedRecord::spawn_outbound_consumers()method (automatic spawning) - Changed:
OutboundConnectorLinknow storesconsumer_factory: Arc<ConsumerFactoryFn>instead of direct consumer - Changed: Connectors must now implement
spawn_outbound_publishers()and explicitly calldb.collect_outbound_routes() - Impact: All connectors require code changes to support outbound publishing via the new trait system
- Removed:
- Memory Management: Removed
async-traitdependency that leakedstdintono_stdbuilds, replaced with manualPin<Box<dyn Future>> - Type-Erased Routing: Fixed producer storage in collections by implementing
ProducerTraitwithBox<dyn Any>downcasting - Buffer Validation: Added validation ensuring inbound connectors have configured buffers before link creation
- Consumer Factory Downcasting: Fixed type downcasting in
typed_api.rsline 565 - changed from downcasting toArc<AimDb<R>>to downcasting toAimDb<R>then wrapping in Arc, resolving "Invalid db type in consumer factory" runtime panic
- Channel Stream: Removed obsolete channel-based stream abstraction in favor of router-based routing
- Automatic Outbound Spawning: Removed
TypedRecord::spawn_outbound_consumers()method - outbound publisher spawning now explicit viaConsumerTraitandspawn_outbound_publishers()
0.1.0 - 2025-11-06
- Initial release of AimDB async in-memory database engine
- Type-safe record system using
TypeId-based routing - Three buffer types for different data flow patterns:
- SPMC Ring Buffer: High-frequency data streams with bounded memory
- SingleLatest: State synchronization and configuration updates
- Mailbox: Commands and one-shot events
- Producer-consumer model with async task spawning
- Runtime adapter abstraction for cross-platform support
no_stdcompatibility for embedded targets- Error handling with comprehensive
DbResult<T>andDbErrortypes - Remote access protocol (AimX v1) for cross-process introspection
- Connector abstraction for external system integration
- Builder pattern API for database configuration
- Record lifecycle management with type-safe APIs