Skip to main content

Module AdvancedFeatures

Module AdvancedFeatures 

Source
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§

CachedMessage
Single TTL-bound cache entry: payload, insertion timestamp (UNIX seconds), and time-to-live in seconds.
CollaborationPermissions
Per-session capability flags for the realtime collaboration surface. The four bits gate edit / view / comment / share actions on a CollaborationSession::Struct.
CollaborationSession
Realtime collaboration session record - id, participant list, currently-active document URIs, last activity tick, and the permission slot.
Features
AdvancedFeatures aggregator - holds the runtime handle, cumulative PerformanceStats::Struct, the realtime collaboration-session map, and the MessageCache::Struct. Spawns three monitor tasks (monitor_performance, cleanup_cache, monitor_collaboration_sessions) on start_monitoring. The 12-method impl is kept in one file - tightly-coupled cluster.
InitializeAdvancedFeatures
Bootstrap helper - construct Features::Struct, stash a clone in Tauri state, spawn the monitor tasks. Called from Binary/Register/AdvancedFeaturesRegister.rs.
MessageCache
Message cache state - id → CachedMessage::Struct table plus hit / miss counters and a derived size accessor.
PerformanceStats
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_session Tauri command - create a fresh CollaborationSession::Struct with the requested permissions.
mountain_get_cache_stats
mountain_get_cache_stats Tauri command - returns the MessageCache::Struct snapshot (entries + hit / miss counters).
mountain_get_collaboration_sessions
mountain_get_collaboration_sessions Tauri command - returns every active CollaborationSession::Struct.
mountain_get_performance_stats
mountain_get_performance_stats Tauri command - returns the cumulative PerformanceStats::Struct.