Node Multihoming

Here’s my design for multihoming Anoma nodes within a single Erlang VM.

First, nodes need to have names, otherwise it’s impossible to disambiguate, you can’t just say “the transaction engine” but must say “anode’s transaction engine”. I understand this is somehow controversial? Would be nice to hear about the controversy.

Most things belong to a given node, but some things are global across the Erlang node. Those things are:

  • mnesia. this is an application; table names can just be prefixed with node names
  • registry/transport. the burden of knowing all the engine addresses &c. is global.
    • this also contains foreign nodes connected over tcp or whatever
    • and even “fake foreign” nodes that, while local, we’re pretending are foreign and trivially proxying in order to test transport logic or similar.
    • we only need one tcp socket between erlang vm A and remote host B or whatever, no matter the node count
  • event broker. it’s possible to multihome event broker and have an individual one per anoma node, but simpler is to put “the node which this message belongs to” into the filter list near or at the top.