macula_dist (macula v0.14.3)
View SourceQUIC Distribution Carrier for Erlang.
This module implements the Erlang distribution carrier interface using QUIC transport via quicer. It replaces inet_tcp_dist to enable distributed Erlang over QUIC with:
- Built-in TLS 1.3 encryption (mandatory) - NAT-friendly UDP-based transport - Connection migration support - Stream multiplexing for message priorities - Decentralized discovery (no EPMD required)
Usage
Start the VM with: erl -proto_dist macula -no_epmd -start_epmd false
Or in vm.args: -proto_dist macula -no_epmd -start_epmd false -macula_dist_port 4433
Architecture: net_kernel - macula_dist - quicer - UDP/QUIC - remote node
Node naming convention: port@ip (e.g., 4433@192.168.1.100)
Summary
Functions
Accept incoming connections. Called in a loop by net_kernel.
Accept a distribution connection. This is called when a connection is being accepted from a remote node.
Return address information for this distribution.
Return child specifications for the distribution supervisor. Called by net_sup during startup.
Close a distribution connection.
Check if a string is a valid node name.
Listen for incoming distribution connections. Returns a "listen handle" used by accept/1.
Check if this module should handle distribution to the given node. Returns true if the node name is in port@host format.
Setup an outgoing distribution connection. Called when this node wants to connect to another node.
Split a node name into port and host. Node name format: port@host (e.g., 4433@192.168.1.100)
Functions
Accept incoming connections. Called in a loop by net_kernel.
Accept a distribution connection. This is called when a connection is being accepted from a remote node.
-spec address() -> #net_address{address :: term(), host :: term(), protocol :: term(), family :: term()}.
Return address information for this distribution.
-spec childspecs() -> [supervisor:child_spec()].
Return child specifications for the distribution supervisor. Called by net_sup during startup.
-spec close(term()) -> ok.
Close a distribution connection.
Check if a string is a valid node name.
-spec listen(atom()) -> {ok, {term(), #net_address{address :: term(), host :: term(), protocol :: term(), family :: term()}, 1..3}} | {error, term()}.
Listen for incoming distribution connections. Returns a "listen handle" used by accept/1.
Check if this module should handle distribution to the given node. Returns true if the node name is in port@host format.
Setup an outgoing distribution connection. Called when this node wants to connect to another node.
Split a node name into port and host. Node name format: port@host (e.g., 4433@192.168.1.100)