LAN cluster: federation only on the bridge node, on mcl_core (mcl-lan P5) #35
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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, LAN-first direction)
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)
Purpose (feature): in a LAN cluster, mcl-rag joins its org's federation only on the bridge node, the one with a mesh pool, and runs on mcl_core instead of mcl_om.
Refs macula-services/mcl-lan#1 (docs/DESIGN.md §5 and §7 P5), macula-services/mcl-core#7 (the bridge), #31
What changes
~> 1.0. The{mcl_om, "~> 1.6"}dep (rebar.config:32) and the app list (apps/mcl_rag/src/mcl_rag.app.src:16) change, and everymcl_om*call in the 34 files that name it moves to itsmcl_core*name.join_federation:join/0(apps/mcl_rag/src/serve_federated_query/join_federation.erl:78-82) waits formcl_om:macula_client(). On a cluster member there is never a pool, so it retries every second forever and/healthstaysdegradedon every member. On a member it does not join, and says so: its status is a fact, not a wait, and health counts it as ok. On the bridge and on a standalone node it joins as today.Open question, before code (Mars)
#31 (open) rules that
join_federationruns only wheremcl_rag.holds_storeis true, because it answers from the store (rag.sqlite on ONE node). This package says it runs only on the bridge. Both hold only when the bridge node is the node that holds the rag store. Is that the placement rule, or should the bridge forward federated queries to the store holder over the LAN?Done-when
mcl_omname is left outside CHANGELOG history.join_federationdoes not wait for a pool, and/healthis not degraded by the federation; a test asserts both.serve_federated_query_testspass unchanged.mcl_core ~> 1.0once 1.0.0 is on hex.Not in scope
Supervisor ruling 2026-12-02 (relayed by Mars; Raf may overrule) on the open question: placement rule, the bridge node is the rag store holder. A member never attempts
join_federation, so the retry loop goes. The rule is written into mcl-coredocs/DESIGN.md(mcl-lan is being archived). Commits here wait for #34 (evoq ~> 1.32) to land.Landed: main
e07f3e111e(PR 37, fast-forward). Main runs 6975 (build-push, including attest), 6976 (c4 model) and 6977 (lint-and-test) are all green. Review: Jupiter PASS at r=1 (3a6a0d6) and a diff-only r=2 (e07f3e1). Companion: mcl-core design §9 landed at db68d823 (mcl-core PR 11).Done-when, against main:
{mcl_core, "~> 1.0"}(rebar.config:35), and calls, sys.config, the app list, the README and the C4 model use mcl_core. Comments that cite past versions (e.g. "mcl_om 0.33.1") are kept as history; no mcl_om name is left for the current library.join_federationdoes not wait for a pool (join(false) -> member, join_federation.erl:94), and /health is ok:a_cluster_member_does_not_join_test(serve_federated_query_tests.erl:140) reads the role from mcl_core's reallan/bridgeenv. 5 mutants on this path were all caught.a_cluster_bridge_joins_test(:157), with the existing joining tests unchanged.mcl_core ~> 1.0(hex 1.0.0).Also in this package, from the rulings: every procedure is marked
export => mesh, with a test; the README says the service works on a LAN with no station and on the mesh (DECIDED 2026-12-02 "we won't loose the mesh! I just don't want to pitch Martha as "mesh-only"", Raf).