macula_platform_system (macula v0.20.3)

View Source

Macula Platform System Supervisor.

This supervisor manages the platform layer services that provide distributed coordination primitives for workloads.

Platform Services (v0.15.0+): - CRDT-based shared state (LWW-Register, OR-Set, G-Counter, PN-Counter) - Gossip-based state synchronization (macula_gossip) - Coordination Primitives (locks, barriers, etc. - future)

Architecture: macula_root ├── [infrastructure: routing, bootstrap, gateway, peers] └── macula_platform_system (this module) └── macula_gossip (CRDT state synchronization)

Configuration: - gossip_enabled: Enable gossip protocol (default: true) - gossip_push_interval: Push interval in ms (default: 1000) - gossip_anti_entropy_interval: Anti-entropy interval in ms (default: 30000) - gossip_fanout: Number of peers per gossip round (default: 3)

Note: Ra/Raft was removed in v0.14.0. Macula uses CRDTs for eventually-consistent state management without leader election. See architecture/ROADMAP.md for details.

Summary

Functions

Get the PID of the gossip server.

Initialize the platform system supervisor. Starts the gossip server if enabled (default: true).

Check if gossip is enabled.

Start the platform system supervisor.

Functions

get_gossip_pid()

-spec get_gossip_pid() -> {ok, pid()} | {error, not_started}.

Get the PID of the gossip server.

init(Config)

Initialize the platform system supervisor. Starts the gossip server if enabled (default: true).

is_gossip_enabled()

-spec is_gossip_enabled() -> boolean().

Check if gossip is enabled.

start_link(Config)

-spec start_link(map()) -> {ok, pid()} | {error, term()}.

Start the platform system supervisor.