Raxol.Cloud.EdgeComputing (Raxol v0.4.0)
View SourceEdge computing support for Raxol applications.
This module provides functionality for optimizing Raxol applications at the edge, allowing for improved performance, reduced latency, and offline capabilities.
Features:
- Edge processing configuration
- Offline mode and data synchronization
- Resource optimization for edge devices
- Automatic failover between edge and cloud
- Edge-specific monitoring and diagnostics
- Edge-to-cloud data streaming
Summary
Functions
Manually checks the cloud connection status and updates the system state.
Clears the edge cache.
Executes a function at the edge or in the cloud based on current mode and conditions.
Forces the system into a specific mode.
Gets metrics for the edge computing system.
Initializes the edge computing system.
Checks if the system is currently operating in offline mode.
Gets the current status of the edge computing system.
Synchronizes data between edge and cloud.
Updates the edge computing configuration.
Functions
Manually checks the cloud connection status and updates the system state.
Clears the edge cache.
Executes a function at the edge or in the cloud based on current mode and conditions.
Options
:force_edge
- Force execution at the edge even in hybrid mode (default: false):force_cloud
- Force execution in the cloud even in hybrid mode (default: false):fallback_fn
- Function to execute if primary execution fails (default: nil):timeout
- Timeout in milliseconds for the operation (default: 5000):retry
- Number of retry attempts (default: from config)
Examples
iex> execute(fn -> process_data(data) end)
{:ok, result}
Forces the system into a specific mode.
Gets metrics for the edge computing system.
Initializes the edge computing system.
Options
:mode
- Operation mode (:edge_only, :cloud_only, :hybrid) (default: :hybrid):connection_check_interval
- Time in ms between connection checks (default: 5000):sync_interval
- Time in ms between cloud syncs (default: 30000):retry_limit
- Number of retry attempts for operations (default: 5):compression_enabled
- Whether to compress data for transfer (default: true):offline_cache_size
- Maximum size in bytes for offline cache (default: 100MB):priority_functions
- List of functions that should prioritize edge execution
Examples
iex> init(mode: :hybrid)
:ok
Checks if the system is currently operating in offline mode.
Gets the current status of the edge computing system.
Synchronizes data between edge and cloud.
Options
:force
- Force immediate synchronization (default: false):selective
- List of data types to synchronize (default: all):direction
- Sync direction (:both, :to_cloud, :from_cloud) (default: :both):conflict_resolution
- Strategy for resolving conflicts (default: :latest_wins)
Examples
iex> sync(force: true)
{:ok, %{status: :completed, synced_items: 5}}
Updates the edge computing configuration.