elara-runtime
Runtime engine for the ELARA Protocol - providing node orchestration, event loop processing, and stream management.
Features
- Event Loop: Async event processing with tokio
- Node Orchestration: Multi-node session management
- Stream Processing: Real-time media stream handling
- Session Management: Secure session lifecycle
- Feed Processing: Text and media feed handling
Quick Start
use ;
use NodeId;
// Create node configuration
let config = NodeConfig ;
// Create and start node
let mut node = new.await?;
// Start event loop
node.run.await?;
Architecture
Event Processing Loop
Event → Validation → Processing → State Update → Propagation
↓ ↓ ↓ ↓ ↓
Network → Invariants → Business → CRDT Merge → Network
Input Check Logic Apply Output
Node Components
- Core Engine: Event processing and state management
- Network Layer: UDP transport with STUN/TURN
- Crypto Layer: Identity and session security
- Time Engine: Dual clock synchronization
- State Field: Distributed state reconciliation
- Stream Manager: Media stream lifecycle
Session Management
Stream Processing
Stream Types
- Text Streams: Chat messages, typing indicators
- Voice Streams: Audio frames with degradation
- Visual Streams: Video keyframes and deltas
- Presence Streams: Availability and status
Stream Lifecycle
Start → Active → Update → ... → Update → End
↓ ↓ ↓ ↓ ↓
Create Process Transform Process Cleanup
Configuration
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.