orchestrator_core 0.1.0
orchestrator_core: ^0.1.0 copied to clipboard
Event-Driven Orchestrator architecture for Dart/Flutter. Separate UI state management from business logic execution with SignalBus and Dispatcher pattern.
Changelog #
All notable changes to this project will be documented in this file.
0.1.0 - 2025-12-25 #
Features: Unified Data Flow & Caching #
- New: Unified Data Flow architecture supporting Placeholder -> Cache (SWR) -> Process -> Cache Write.
- New:
DataStrategyconfiguration for Jobs.placeholder: Emit temporary data immediately (Skeleton UI).cachePolicy: Configure caching behavior (TTL, Key, Revalidate, Force Refresh).
- New: 3 Ways of Cache Management:
- Config:
CachePolicy(forceRefresh: true)for Pull-to-Refresh. - Utility:
InvalidateCacheJobfor system-wide clearing (e.g. Logout). - Side-Effect: Methods
invalidateKey/invalidateMatchinginBaseExecutor.
- Config:
- New:
CacheProviderinterface with defaultInMemoryCacheProvider. - New: Events
JobPlaceholderEventandJobCacheHitEvent.
0.0.3 - 2024-12-24 #
Architecture (Scoped Bus) #
- New: Support Scoped Bus for isolated module communication.
- Create isolated bus:
SignalBus.scoped(). - Access global bus:
SignalBus.instance. - Inject bus into Orchestrator:
MyOrchestrator(bus: myScopedBus).
- Create isolated bus:
- Breaking Change:
BaseJobis no longerconst/@immutable.- Added
SignalBus? busfield toBaseJobfor explicit context tracking. - This allows Executors to automatically route events to the correct bus without hidden magic.
- Added
- Improved:
BaseExecutornow dynamically resolves the target bus based on the Job's context.
0.0.2 - 2024-12-24 #
Added #
- Safety: Smart Circuit Breaker (Loop Protection by Event Type)
- Prevent infinite loops by blocking specific looping events
- Default limit: 50 events/sec (configurable globally)
- New: Support per-type limit override via
OrchestratorConfig.setTypeLimit<T>(limit) - Self-healing every 1 second
- Safety: Type Safety Isolation (try-catch in event handlers)
- Safety / Casting:
JobSuccessEvent.dataAs<T>()for safe data casting - UI Helper:
BaseOrchestrator.isJobTypeRunning<T>()to prevent UI race conditions - Config: Added
OrchestratorConfig.maxEventsPerSecond
0.0.1 - 2024-12-24 #
Added #
- Initial release
BaseJobandBaseEventmodelsSignalBus- Singleton broadcast stream for event communicationDispatcher- Type-based job routing with O(1) lookupBaseExecutor- Abstract executor with error boundary, timeout, retry, cancellationBaseOrchestrator- State machine with Active/Passive event routingCancellationToken- Token-based task cancellationRetryPolicy- Configurable retry with exponential backoffOrchestratorLogger- Flexible logging system