data_publisher(3)

NAME
data_publisher - A behavior for building eventually consistent, replicated data stores across distributed nodes.

DESCRIPTION

This module provides the infrastructure for:

    • Replicating data across all nodes running the same scope

    • Automatic peer discovery

    • Subscription-based notifications for data changes

    • Version translation for rolling upgrades

Implementing modules define how data is stored, updated, and how changes are calculated and propagated. This is a generalization of the pg module.

DATA TYPES

global_view() :: dynamic().
local_data() :: dynamic().
options() :: #{standalone => boolean(), dynamic() => dynamic()}.
scope() :: atom().
state() :: #state{}.
subscribe_result() :: dynamic().
subscription() :: dynamic().
subscriptions() :: #{subscription() => #{reference() => pid()}}.
update() :: dynamic().
version() :: dynamic().

FUNCTIONS

CALLBACKS