ExMaude.Backend.CNode (ExMaude v0.2.0)

View Source

C-Node backend for ExMaude.

This backend communicates with Maude via a C-Node bridge process that uses Erlang distribution protocol for structured binary communication.

Features

  • Full process isolation - C-Node crash doesn't affect the BEAM
  • Binary Erlang term protocol - no text parsing overhead
  • Lower latency than Port + PTY wrapper

Trade-offs

  • Requires compiled C code (maude_bridge binary)
  • More complex deployment (native dependency)
  • Requires Erlang distribution (epmd must be running)

Requirements

The C-Node bridge binary must be compiled:

cd c_src && make

Or it will be compiled automatically if elixir_make is configured.

Configuration

config :ex_maude,
  backend: :cnode,
  cnode_timeout: 30_000

Summary

Types

t()

Internal state for the C-Node backend GenServer.

Functions

Returns a specification to start this module under a supervisor.

Types

t()

@type t() :: %ExMaude.Backend.CNode{
  cnode_name: atom() | nil,
  connected: boolean(),
  cookie: String.t(),
  maude_path: String.t() | nil,
  os_pid: non_neg_integer() | nil,
  port: port() | nil
}

Internal state for the C-Node backend GenServer.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.