Bloccs.Compiler.Node (bloccs v0.2.0)

Copy Markdown View Source

Emits Broadway pipeline source file(s) for a single network node.

A plain node compiles to one pipeline. A [join] node compiles to one pipeline per in-port — each its own producer, funneling arrivals into the shared Bloccs.Join correlation buffer (Broadway has a single producer stage, so distinct typed inputs can't share one pipeline).

Produces real .ex source on disk (not in-memory Module.create/3) so stack traces point at debuggable file paths and generated output is PR-reviewable — the "legible IR" thesis applied to compilation.

Summary

Functions

Compile one node into its pipeline source file(s). Returns the written paths (a single path for a plain node, one per in-port for a join).

Module name of the (single) compiled pipeline for a plain node.

The pipeline module(s) a node boots — one for a plain node, one per in-port for a join. Used by the network supervisor to list children.

Module name of a join node's per-in-port pipeline.

Functions

compile(nn, network, dest_dir)

Compile one node into its pipeline source file(s). Returns the written paths (a single path for a plain node, one per in-port for a join).

module_name(network, network_node)

Module name of the (single) compiled pipeline for a plain node.

pipeline_modules(network, nn)

@spec pipeline_modules(Bloccs.Manifest.Network.t(), Bloccs.Manifest.NetworkNode.t()) ::
  [module()]

The pipeline module(s) a node boots — one for a plain node, one per in-port for a join. Used by the network supervisor to list children.

port_module_name(network, network_node, port)

@spec port_module_name(
  Bloccs.Manifest.Network.t(),
  Bloccs.Manifest.NetworkNode.t(),
  atom()
) :: module()

Module name of a join node's per-in-port pipeline.