Search documentation of macula

# macula_platform_system (macula v0.44.2)

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_gossip_pid()

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()

Check if gossip is enabled.

start_link(Config)

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.