P2: LAN transport on distributed Erlang, the first mcl_core release #3

Closed
opened 2026-12-02 09:59:19 +00:00 by uranus · 2 comments
Member

DECIDED 2026-12-02 "I have created and cloned macula-services/mcl-core. Let's build this properly. In the end I hope we keep a single repo: mcl-core that will replace both mcl-om and mcl-lan" (Raf)
DECIDED 2026-12-02 "trust on sight. mcl-martha services should auto-cluster over LAN, no mcl-station required. Distributed Erlang offers us all we need." (Raf)
DECIDED 2026-12-02 "Shared cookie + secret (Recommended)" (Raf)

Purpose (feature): services on one LAN find each other and call and publish to each other over distributed Erlang, with no station. This is design P2 (docs/DESIGN.md §2, §7) and the first mcl_core hex release, which the bundled services take in their wave changes.

Scope (design §7 P2): cluster start (macula gossip, LAN distribution, cookie and secret generated into the data volume); capabilities and calls on pg with caller written (§2.2, §2.4); pubsub on pg (§2.3). mcl_core_transport tries the LAN first, then the bridge, and services' mcl_core_pubsub:publish/2,3 go through it. Two-node tests on peer nodes with a TTL of 0, as in the spike.

Done when:

  • Two peer nodes with the same cookie and secret form a cluster with no station, and a node without them does not join.
  • A capability served on one node is called from the other, and the handler sees the caller's node id under caller.
  • A publish on one node reaches a subscriber on the other.
  • With no LAN provider, a call falls through to the bridge as in 1.0.
  • CHANGELOG and README name the release, and its tag and hex publish wait for Mars's word.

Waits on #1. Refs macula-services/mcl-lan#1

DECIDED 2026-12-02 "I have created and cloned macula-services/mcl-core. Let's build this properly. In the end I hope we keep a single repo: mcl-core that will replace both mcl-om and mcl-lan" (Raf) DECIDED 2026-12-02 "trust on sight. mcl-martha services should auto-cluster over LAN, no mcl-station required. Distributed Erlang offers us all we need." (Raf) DECIDED 2026-12-02 "Shared cookie + secret (Recommended)" (Raf) Purpose (feature): services on one LAN find each other and call and publish to each other over distributed Erlang, with no station. This is design P2 (`docs/DESIGN.md` §2, §7) and the first `mcl_core` hex release, which the bundled services take in their wave changes. Scope (design §7 P2): cluster start (macula gossip, LAN distribution, cookie and secret generated into the data volume); capabilities and calls on `pg` with `caller` written (§2.2, §2.4); pubsub on `pg` (§2.3). `mcl_core_transport` tries the LAN first, then the bridge, and services' `mcl_core_pubsub:publish/2,3` go through it. Two-node tests on `peer` nodes with a TTL of 0, as in the spike. Done when: - [ ] Two `peer` nodes with the same cookie and secret form a cluster with no station, and a node without them does not join. - [ ] A capability served on one node is called from the other, and the handler sees the caller's node id under `caller`. - [ ] A publish on one node reaches a subscriber on the other. - [ ] With no LAN provider, a call falls through to the bridge as in 1.0. - [ ] CHANGELOG and README name the release, and its tag and hex publish wait for Mars's word. Waits on #1. Refs macula-services/mcl-lan#1
Author
Member

Landed at a697a9bdc2 (fast-forward, PR 6; review PASS at r=2). Done when, each against test/mcl_core_lan_SUITE.erl on the landed tip (PR run 6843 green):

  • Two peer nodes with the same cookie and secret form a cluster with no station; a node without them does not join: two_nodes_with_the_secrets_form_a_cluster, a_node_with_another_secret_does_not_join, a_node_with_another_cookie_does_not_join, a_node_without_the_secrets_refuses_to_start.
  • A capability served on one node is called from the other, and the handler sees the caller's node id under caller: a_capability_is_called_from_the_other_node_with_its_caller.
  • A publish on one node reaches a subscriber on the other: a_publish_reaches_a_subscriber_on_the_other_node.
  • With no LAN provider, a call falls through to the bridge as in 1.0: with_no_lan_provider_a_call_goes_to_the_bridge.
  • CHANGELOG and README name the release (CHANGELOG Unreleased: mcl_core 1.0.0, the first mcl_core release; README "On a LAN" and Status). No tag and no hex publish: the first mcl_core release goes to the Supervisor for Raf's yes.

Review r1 found that the LAN hosts restarted empty; fixed in a697a9b, with what_a_node_serves_survives_a_restart_of_its_lan_tree. Main runs 6845-6848 were started on the landed tip.

Landed at a697a9bdc29035c4077ea39bbdecc7c9aeb0cbba (fast-forward, PR 6; review PASS at r=2). Done when, each against `test/mcl_core_lan_SUITE.erl` on the landed tip (PR run 6843 green): - [x] Two `peer` nodes with the same cookie and secret form a cluster with no station; a node without them does not join: `two_nodes_with_the_secrets_form_a_cluster`, `a_node_with_another_secret_does_not_join`, `a_node_with_another_cookie_does_not_join`, `a_node_without_the_secrets_refuses_to_start`. - [x] A capability served on one node is called from the other, and the handler sees the caller's node id under `caller`: `a_capability_is_called_from_the_other_node_with_its_caller`. - [x] A publish on one node reaches a subscriber on the other: `a_publish_reaches_a_subscriber_on_the_other_node`. - [x] With no LAN provider, a call falls through to the bridge as in 1.0: `with_no_lan_provider_a_call_goes_to_the_bridge`. - [x] CHANGELOG and README name the release (CHANGELOG Unreleased: mcl_core 1.0.0, the first mcl_core release; README "On a LAN" and Status). No tag and no hex publish: the first `mcl_core` release goes to the Supervisor for Raf's yes. Review r1 found that the LAN hosts restarted empty; fixed in a697a9b, with `what_a_node_serves_survives_a_restart_of_its_lan_tree`. Main runs 6845-6848 were started on the landed tip.
Author
Member

Main runs on a697a9bdc2 finished: 6845 advisories, 6846 docs and 6847 lint+eunit+ct (OTP 28.4.3) are green. 6848 is red only on scaffold-lint (job 27839), the accepted red tracked in #2. #3 stays closed.

Main runs on a697a9bdc29035c4077ea39bbdecc7c9aeb0cbba finished: 6845 advisories, 6846 docs and 6847 lint+eunit+ct (OTP 28.4.3) are green. 6848 is red only on scaffold-lint (job 27839), the accepted red tracked in #2. #3 stays closed.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
macula-services/mcl-core#3
No description provided.