Expand description
Advanced experimental features (collaboration, intelligent caching,
performance monitoring). TODO: atomize this 648-LOC single file into a
directory; for now consumers spell IPC::AdvancedFeatures::* directly.
§Advanced IPC features
Performance counters, message-cache, realtime collaboration
session tracking, and the four mountain_* Tauri commands
that surface them. The Features::Struct aggregator + impl
lives in Features.rs (tightly-coupled cluster); the DTOs
and Tauri commands live in their own siblings.
Modules§
- Cached
Message - Single TTL-bound cache entry: payload, insertion timestamp (UNIX seconds), and time-to-live in seconds.
- Collaboration
Permissions - Per-session capability flags for the realtime collaboration
surface. The four bits gate edit / view / comment / share
actions on a
CollaborationSession::Struct. - Collaboration
Session - Realtime collaboration session record - id, participant list, currently-active document URIs, last activity tick, and the permission slot.
- Features
AdvancedFeaturesaggregator - holds the runtime handle, cumulativePerformanceStats::Struct, the realtime collaboration-session map, and theMessageCache::Struct. Spawns three monitor tasks (monitor_performance,cleanup_cache,monitor_collaboration_sessions) onstart_monitoring. The 12-method impl is kept in one file - tightly-coupled cluster.- Initialize
Advanced Features - Bootstrap helper - construct
Features::Struct, stash a clone in Tauri state, spawn the monitor tasks. Called fromBinary/Register/AdvancedFeaturesRegister.rs. - Message
Cache - Message cache state - id →
CachedMessage::Structtable plus hit / miss counters and a derived size accessor. - Performance
Stats - Cumulative IPC counters - sent / received message totals,
rolled-up average processing time, peak rate, error count,
and uptime tick. Returned by
mountain_get_performance_stats. - mountain_
create_ collaboration_ session mountain_create_collaboration_sessionTauri command - create a freshCollaborationSession::Structwith the requested permissions.- mountain_
get_ cache_ stats mountain_get_cache_statsTauri command - returns theMessageCache::Structsnapshot (entries + hit / miss counters).- mountain_
get_ collaboration_ sessions mountain_get_collaboration_sessionsTauri command - returns every activeCollaborationSession::Struct.- mountain_
get_ performance_ stats mountain_get_performance_statsTauri command - returns the cumulativePerformanceStats::Struct.