Mountain/RunTime/ApplicationRunTime/mod.rs
1//! # ApplicationRunTime (RunTime)
2//!
3//! ## RESPONSIBILITIES
4//!
5//! Main runtime struct that provides effect execution and lifecycle management
6//! capabilities for the Mountain application. Acts as the central coordinator
7//! between the Echo scheduler and application services.
8//!
9//! ## ARCHITECTURAL ROLE
10//!
11//! Core execution engine in Mountain's architecture that bridges declarative
12//! effect system with high-performance task execution through Echo scheduler.
13//!
14//! ## KEY COMPONENTS
15//!
16//! - **ApplicationRunTime**: Main runtime struct holding Scheduler and
17//! Environment
18//!
19//! ## ERROR HANDLING
20//!
21//! All errors are propagated through Result types with detailed context.
22//! Shutdown operations use error recovery to continue cleanup even when
23//! individual services fail.
24//!
25//! ## LOGGING
26//!
27//! Uses log crate with appropriate severity levels:
28//! - `info`: Initialization, successful completion
29//! - `debug`: Detailed operation steps
30//! - `warn`: Recoverable errors during shutdown
31//! - `error`: Failed operations
32//!
33//! ## PERFORMANCE CONSIDERATIONS
34//!
35//! - Uses Arc for shared state to minimize cloning
36//! - Scheduler handles parallel execution efficiently
37//! - Shutdown operations are optimized to complete quickly
38//!
39//! ## TODO
40//!
41//! Medium Priority:
42//! - [ ] Add effect execution metrics
43//! - [ ] Implement effect cancellation support
44//! - [ ] Add effect execution tracing
45//!
46//! Low Priority:
47//! - [ ] Add effect prioritization levels beyond Normal
48//! - [ ] Implement circuit breaker pattern for failing effects
49
50// --- Main struct definition ---
51
52/// Main runtime struct definition.
53pub mod RuntimeStruct;
54
55// --- Re-export main struct ---
56pub use RuntimeStruct::ApplicationRunTime;