Skip to content

Distributed Erlang over TCP (BEAM to BEAM) #22

Description

@schonfinkel

Summary

Enable distributed Erlang between two beam_server PDs:

  • Each runs as a named node, they discover each other and establish a distribution connection over TCP/IP, and processes on one node can message processes on the other.
  • Lay the foundation to later see if its worth dropping EPMD and going crazy with Braid instead.

Motivation

BEAM-to-BEAM communication is the primary goal of running BEAM on seL4. Distribution is what makes "let it crash" and supervision span multiple isolated components, the resilience story is incomplete without it. This builds directly on the 0.2.0 TCP stack Milestone.

Proposed Solution

  • Bring up the distribution prerequisites in ERTS: a node name + cookie, and an epmd strategy. Prefer the static/-no_epmd + erl_epmd module approach (or a fixed-port distribution) to avoid running a separate epmd daemon in a PD, fall back to a minimal epmd PD if needed.
  • Stand up a second beam_server PD in tools/sdf/system.zig (or a second image) sharing the network subsystem, each with its own node identity.
  • Validate the standard distribution handshake works over the lwIP gen_tcp transport from 0.2.0 (inet_dist), including the parts ERTS expects from the OS (socket options, getsockname/getpeername, non-blocking accept).
  • Document any distribution-specific syscalls/inet options that need wiring beyond the 0.2.0 socket surface.

Alternatives Considered

  • Only support Braid, but we'll need the work from here either way.

Acceptance Criteria

  • Two nodes start with distinct names + a shared cookie
  • net_adm:ping('other@host') returns pong across the two PDs
  • A spawn/message round-trip works node->node (e.g. rpc:call)
  • A dist-smoke harness automates the two-node ping; boot-smoke + shell-smoke green

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    Status
    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions