Search documentation of macula

# API Reference macula v#0.44.2

View Source

## Modules

macula

Macula - Main API for distributed workloads on Macula platform.

macula_advertisement_manager

Advertisement manager GenServer - manages DHT service advertisements.

macula_app

macula public API

macula_app_monitor

Macula App Monitor

macula_authorization

Mesh Authorization Module for UCAN/DID-based access control.

macula_authorization_audit

Authorization Audit Logging Module.

macula_bootstrap_health

Bootstrap Health Monitor - Tracks system health metrics.

macula_bootstrap_registry

Bootstrap Registry - Thin wrapper around macula_routing_server DHT.

macula_bootstrap_server

Bootstrap Server - Main GenServer for bootstrap node operations.

macula_bootstrap_system

Macula Bootstrap System - Supervision tree for bootstrap nodes.

macula_bridge_cache

Macula Bridge Cache - Caches results from parent DHT queries.

macula_bridge_mesh

Macula Bridge Mesh - Manages mesh formation with peer bridges.

macula_bridge_node

Macula Bridge Node - Manages connection to parent mesh level.

macula_bridge_system

Macula Bridge System - Supervision tree for Bridge Nodes.

macula_cache

Generic LRU cache implementation. Provides least-recently-used eviction with configurable max size.

macula_cert

Macula Self-Sovereign Certificate System

macula_cert_system

Macula Certificate System Supervisor

macula_client_behaviour

Behaviour defining the client API contract for Macula connections

macula_cluster

Cluster management utilities for Macula platform.

macula_cluster_controller

Macula Cluster Controller

macula_cluster_gossip

Macula UDP Multicast Gossip Cluster Strategy.

macula_cluster_static

Macula Static Cluster Strategy.

macula_cluster_strategy

Macula Cluster Strategy for libcluster.

macula_connection

Macula Connection - QUIC Transport Layer (v0.7.0+).

macula_connection_dispatch

Message dispatch logic extracted from macula_connection.

macula_connection_pool

Connection pool manager for endpoint connections.

macula_console

Macula Console Formatter - Beautiful colored terminal output.

macula_content

Public API facade for Macula content-addressed storage system.

macula_content_chunker

Content chunking module for Macula content-addressed storage.

macula_content_dht

DHT integration for Macula content-addressed storage.

macula_content_hasher

Content hashing module for Macula content-addressed storage.

macula_content_manifest

Content manifest module for Macula content-addressed storage.

macula_content_store

Content store module for Macula content-addressed storage.

macula_content_system

Supervisor for Macula content-addressed storage system.

macula_content_transfer

Content transfer module for Macula content-addressed storage.

macula_core_types

Core type definitions and encoding/decoding for Macula. Provides fundamental types like node IDs, realm IDs, and addresses.

macula_crdt

Conflict-Free Replicated Data Types (CRDTs) for shared state.

macula_did_cache

DID Parsing Cache Module.

macula_direct_routing

Direct Routing Table - Bypass bootstrap for known subscriber endpoints.

macula_discovery

Generic DHT-based service discovery. Provides cache-integrated lookup and announcement operations. Used by both pub/sub and RPC discovery layers.

macula_dist

QUIC Distribution Carrier for Erlang.

macula_dist_bridge

Supervised bridge process for relay distribution tunnels.

macula_dist_bridge_sup

Supervisor for distribution relay bridge processes.

macula_dist_discovery

EPMD Replacement using Macula DHT Discovery.

macula_dist_mdns_advertiser

Macula Distribution mDNS Advertiser.

macula_dist_relay

Relay-routed Erlang distribution.

macula_dist_system

Macula Distribution System Supervisor.

macula_gatekeeper

Gatekeeper module for validating mesh application admissions.

macula_gateway

Macula Gateway - HTTP/3 Message Router & Orchestrator

macula_gateway_clients

Clients Worker GenServer - tracks connected clients.

macula_gateway_dht

DHT Query Handler Module - handles DHT message forwarding to routing server.

macula_gateway_diagnostics

Macula Gateway Diagnostics Service

macula_gateway_health

Macula Gateway Health Check Server

macula_gateway_mdns_advertiser

Macula Gateway mDNS Advertiser.

macula_gateway_mdns_discovery

Macula Gateway mDNS Discovery.

macula_gateway_mesh

Mesh Connection Manager GenServer - manages peer-to-peer QUIC connections.

macula_gateway_pubsub

Pub/Sub Handler GenServer - manages topic subscriptions and message routing.

macula_gateway_pubsub_router

Macula Gateway Pub/Sub Router - DHT-Routed Message Distribution

macula_gateway_quic_server

QUIC Transport Layer Gen_Server

macula_gateway_rpc

RPC Handler GenServer - manages RPC handler registration and call routing.

macula_gateway_rpc_router

RPC Router Module - handles routed RPC messages (CALL/REPLY).

macula_gateway_system

Gateway Root Supervisor - top-level supervisor for gateway subsystem.

macula_gateway_workers_sup

Gateway Workers Supervisor - supervises gateway worker processes.

macula_gossip

Gossip protocol for CRDT state replication.

macula_id

ID generation utilities for Macula. Provides functions for generating various types of IDs.

macula_local_client

Local client for in-VM workloads to connect to macula_gateway

macula_membership_detector

SWIM failure detector (pure logic, no GenServer). Orchestrates member list, gossip, and protocol timing.

macula_membership_gossip

Gossip dissemination for SWIM protocol. Tracks membership updates and provides them for piggybacking. Uses exponential decay: log(N) messages per update.

macula_membership_list

Membership list for SWIM protocol. Maintains cluster membership view with fast concurrent access. Uses map-based storage (could be ETS in production).

macula_membership_member

Member record and state transitions for SWIM protocol. Represents a single node in the membership list.

macula_mri

Macula Resource Identifier (MRI) - Core Module

macula_mri_ets

MRI ETS Storage Adapter

macula_mri_graph

MRI Graph Behaviour

macula_mri_registry

MRI Type Registry

macula_mri_store

MRI Storage Behaviour

macula_multi_relay

Multi-relay client — maintains N concurrent relay connections.

macula_names

Shared naming utilities for hierarchical dot-separated names. Used by both pub/sub topics and RPC procedure names. Supports DNS-style reverse notation: org.domain.service.method

macula_node

Node identity and metadata management. Represents a single node in the Macula mesh.

macula_peer

Macula Peer - Mesh Participant API (v0.7.0+).

macula_peer_connection_pool

Peer Connection Pool - Reuses QUIC connections to remote peers.

macula_peer_connector

Peer Connector - Establishes direct QUIC connections to remote peers (v0.8.0+).

macula_peer_discovery

Peer Discovery - DHT-based gateway discovery and P2P mesh formation.

macula_peer_system

Peer System Supervisor - supervises the peer subsystem.

macula_peers_sup

Macula Peers Supervisor.

macula_ping_pong

Macula Ping/Pong - Async RPC Health Check Demo

macula_platform_system

Macula Platform System Supervisor.

macula_protocol

Behaviour defining the protocol that Macula mesh applications must implement.

macula_protocol_decoder

Protocol message decoder for Macula mesh. Decodes binary wire format to message maps.

macula_protocol_encoder

Protocol message encoder for Macula mesh. Encodes message maps to binary wire format.

macula_protocol_types

Protocol message type definitions and constants for Macula mesh. Defines all message types that can be sent over QUIC streams.

macula_provider_selector

Provider selection strategies for multi-provider RPC load balancing.

macula_pubsub_cache

LRU cache for remote subscriber lists. Caches DHT query results to avoid repeated lookups. Wraps macula_cache with subscriber-specific logic.

macula_pubsub_delivery

Message routing and delivery to local and remote subscribers. Combines local registry and remote discovery for full fan-out.

macula_pubsub_dht

DHT operations for pub/sub - handles subscription advertisement and discovery.

macula_pubsub_discovery

DHT integration for finding remote subscribers. Uses Kademlia DHT to publish and discover subscriptions. Wraps macula_discovery with pub/sub-specific types.

macula_pubsub_handler

PubSub handler GenServer - facade that orchestrates pub/sub operations.

macula_pubsub_qos

QoS (Quality of Service) manager for pub/sub.

macula_pubsub_registry

Local subscription registry for pub/sub. Maps topic patterns to local subscribers (callback PIDs).

macula_pubsub_routing

Pub/Sub routing for multi-hop DHT-routed pub/sub. Handles wrapping, unwrapping, and routing of PUBLISH messages through the Kademlia DHT mesh.

macula_pubsub_server

Pub/Sub GenServer - manages subscriptions and message delivery. Ties together registry, cache, discovery, and delivery layers.

macula_pubsub_subscription

Subscription management for pub/sub.

macula_pubsub_topic

Topic utilities for pub/sub system. Handles topic validation, pattern matching, and normalization. Supports MQTT-style wildcards: * (single-level) and # (multi-level).

macula_quic

Main API module for Macula QUIC transport. Provides a simplified wrapper around the quicer library.

macula_quic_cert

Macula QUIC certificate utilities. Provides functions for generating and validating self-signed certificates for QUIC connections via OpenSSL command-line tool.

macula_quic_conn_callback

QUIC connection callback module for Macula. Implements quicer_connection behavior to handle connection lifecycle.

macula_quic_stream_acceptor

QUIC stream acceptor process. Dedicated process that waits for incoming streams on a connection and forwards them to the gateway for processing.

macula_realm

Realm management and validation. Realms provide logical isolation boundaries in the mesh. Realm names follow reverse DNS notation (e.g., "org.example.mesh").

macula_realm_trust

Realm Trust Management for Hybrid Trust Model

macula_registry_manifest

Macula Registry Package Manifest

macula_registry_server

Macula Registry Server

macula_registry_store

Macula Registry Store

macula_registry_system

Macula Registry System Supervisor

macula_registry_verify

Macula Registry Signature Verification

macula_relay

Macula Relay Server — hub-spoke message routing via pg + gproc.

macula_relay_client

Macula Relay Client — connects to relay servers via QUIC.

macula_relay_handler

Relay handler — one process per connected node.

macula_relay_node

Peer Relay Node.

macula_relay_registry

Distributed Relay Registry.

macula_root

Macula Application Root Supervisor.

macula_routing_bucket

K-bucket for Kademlia routing table. Stores up to k nodes with LRU eviction policy.

macula_routing_dht

Core DHT algorithms for Kademlia routing. Implements iterative lookup, store, and find operations. Pure functions - no GenServer, designed to be called by macula_routing_server.

macula_routing_network

Network transport and escalation operations for DHT routing. Extracted from macula_routing_server to reduce module size. Handles peer-to-peer store propagation, network queries, bridge escalation, and value replication.

macula_routing_nodeid

Node ID utilities for Kademlia DHT. 256-bit node identifiers with XOR distance metric.

macula_routing_protocol

DHT protocol message encoding/decoding. Maps DHT operations to/from message format.

macula_routing_server

GenServer managing Kademlia DHT routing table and operations. Integrates all routing components: table, DHT algorithms, protocol.

macula_routing_storage

Pure functional helpers for DHT provider storage operations. Extracted from macula_routing_server to reduce module size. Handles provider lists, deduplication, expiry, and ETS mirroring.

macula_routing_table

Routing table for Kademlia DHT. Manages 256 k-buckets organized by XOR distance.

macula_rpc_async

Async RPC Module (NATS-style Request/Reply)

macula_rpc_cache

LRU cache for RPC procedure results. Caches results of idempotent procedures to avoid repeated execution. Wraps macula_cache with RPC-specific logic and TTL handling.

macula_rpc_dht

DHT integration for finding RPC service providers. Uses Kademlia DHT to publish and discover RPC registrations. Wraps macula_discovery with RPC-specific types.

macula_rpc_executor

RPC call execution with timeout handling. Executes local handlers and remote calls via QUIC.

macula_rpc_failover

RPC Failover Strategy Module

macula_rpc_handler

RPC handler GenServer - manages RPC calls, replies, and failover.

macula_rpc_names

Name validation and utilities for RPC procedures. Uses reverse DNS notation: org.domain.service.procedure

macula_rpc_registry

Local RPC procedure registration registry. Maps URIs to handler functions. Supports multiple handlers per URI (for load balancing).

macula_rpc_router

RPC call routing strategies. Selects which provider to use for a call (local or remote).

macula_rpc_routing

RPC routing for multi-hop DHT-routed RPC. Handles wrapping, unwrapping, and routing of RPC messages through the Kademlia DHT mesh.

macula_rpc_server

RPC server managing registrations and calls. GenServer that integrates registry, cache, discovery, router, and executor.

macula_rpc_service_interests

RPC Service Interests Module (Pull-based Discovery)

macula_security_scanner

Macula Security Scanner

macula_service_registry

Decentralized service advertisement registry using DHT.

macula_stream_acceptor

Dedicated process for accepting QUIC streams on a connection.

macula_subscriber_cache

DHT Subscriber Cache - Caches topic→subscribers mappings for fast pub/sub.

macula_time

Time utilities for Macula. Provides functions for timestamps, durations, and timeouts.

macula_tls

TLS Certificate Management and Verification Module (v0.11.0+)

macula_trust_store

Macula Certificate Trust Store

macula_ucan_revocation

UCAN Revocation Module.

macula_uri

Macula URI parsing and construction. Format: macula://realm/node_id Example: macula://org.example.mesh/0123456789abcdef...

macula_utils

Common utility functions for Macula.