# ge-garcia/beacon architecture

> Architecture diagram of the GitHub repository ge-garcia/beacon, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ge-garcia/beacon
- Repository: https://github.com/ge-garcia/beacon

## Overview

Beacon is a typed, bounded publish-subscribe library for Ada, with optional UDP multicast for cross-process messaging. The principal workflow is a publisher publishing typed values to a generic topic, which fans them out to subscriber queues for typed receipt. The network branch bridges local subscriptions to wire messages and incoming wire messages back to local publication. The README also documents representation-based message codecs and runnable demos. Only the README was available as evidence, so edges show documented relationships rather than unverified implementation calls.

Main entry points: [`src/beacon-topic.adb`](https://github.com/ge-garcia/beacon/blob/main/src/beacon-topic.adb) (Generic topic), [`demo/src/telemetry.ads`](https://github.com/ge-garcia/beacon/blob/main/demo/src/telemetry.ads) (Telemetry registry), [`src/net/beacon-bridge.adb`](https://github.com/ge-garcia/beacon/blob/main/src/net/beacon-bridge.adb) (Topic bridge), [`demo/src/net_subscriber.adb`](https://github.com/ge-garcia/beacon/blob/main/demo/src/net_subscriber.adb) (Network subscriber)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pubsub["Typed pub-sub"]
  node_topic["Generic topic<br/>[beacon-topic.adb]"]
  node_queue["Bounded queue<br/>[beacon-queue.adb]"]
  node_delivery_mode["Delivery modes<br/>[beacon.ads]"]
end

subgraph group_network["Network bridge"]
  node_bridge["Topic bridge<br/>[beacon-bridge.adb]"]
  node_wire["Wire framing<br/>[beacon-wire.adb]"]
  node_transport["Transport interface"]
  node_udp["UDP multicast"]
end

subgraph group_examples["Demonstrations"]
  node_telemetry["Telemetry registry<br/>[telemetry.ads]"]
  node_codecs["Telemetry codecs"]
  node_inproc_demo["In-process demo<br/>[inproc_demo.adb]"]
  node_net_publisher["Network publisher<br/>[net_publisher.adb]"]
  node_net_subscriber["Network subscriber<br/>[net_subscriber.adb]"]
end

node_publisher(("Publisher"))
node_subscriber(("Subscriber"))

node_publisher -->|"publishes typed values"| node_topic
node_topic -->|"delivers typed values"| node_subscriber
node_topic -->|"uses subscriber queues"| node_queue
node_topic -->|"selects delivery mode"| node_delivery_mode
node_bridge -->|"bridges local values"| node_wire
node_bridge -->|"transports messages"| node_transport
node_udp -->|"implements transport"| node_transport
node_telemetry -->|"instantiates topics"| node_topic
node_codecs -->|"serializes messages"| node_telemetry
node_inproc_demo -->|"demonstrates topics"| node_telemetry
node_net_publisher -->|"publishes readings"| node_telemetry
node_net_subscriber -->|"receives readings"| node_telemetry
node_net_subscriber -->|"checks CRC"| node_wire

click node_topic "https://github.com/ge-garcia/beacon/blob/main/src/beacon-topic.adb"
click node_queue "https://github.com/ge-garcia/beacon/blob/main/src/beacon-queue.adb"
click node_delivery_mode "https://github.com/ge-garcia/beacon/blob/main/src/beacon.ads"
click node_bridge "https://github.com/ge-garcia/beacon/blob/main/src/net/beacon-bridge.adb"
click node_wire "https://github.com/ge-garcia/beacon/blob/main/src/net/beacon-wire.adb"
click node_transport "https://github.com/ge-garcia/beacon/blob/main/src/net/beacon-transport.ads"
click node_udp "https://github.com/ge-garcia/beacon/blob/main/src/net/beacon-transport-udp.adb"
click node_telemetry "https://github.com/ge-garcia/beacon/blob/main/demo/src/telemetry.ads"
click node_codecs "https://github.com/ge-garcia/beacon/blob/main/demo/src/telemetry-codecs.adb"
click node_inproc_demo "https://github.com/ge-garcia/beacon/blob/main/demo/src/inproc_demo.adb"
click node_net_publisher "https://github.com/ge-garcia/beacon/blob/main/demo/src/net_publisher.adb"
click node_net_subscriber "https://github.com/ge-garcia/beacon/blob/main/demo/src/net_subscriber.adb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_topic,node_queue,node_delivery_mode toneBlue
class node_bridge,node_wire,node_transport,node_udp toneAmber
class node_telemetry,node_codecs,node_inproc_demo,node_net_publisher,node_net_subscriber toneMint
class node_publisher,node_subscriber toneIndigo
```

## Components

### Typed pub-sub

- [Generic topic](https://github.com/ge-garcia/beacon/blob/main/src/beacon-topic.adb): `src/beacon-topic.adb`
- [Bounded queue](https://github.com/ge-garcia/beacon/blob/main/src/beacon-queue.adb): `src/beacon-queue.adb`
- [Delivery modes](https://github.com/ge-garcia/beacon/blob/main/src/beacon.ads): `src/beacon.ads`

### Network bridge

- [Topic bridge](https://github.com/ge-garcia/beacon/blob/main/src/net/beacon-bridge.adb): `src/net/beacon-bridge.adb`
- [Wire framing](https://github.com/ge-garcia/beacon/blob/main/src/net/beacon-wire.adb): `src/net/beacon-wire.adb`
- [Transport interface](https://github.com/ge-garcia/beacon/blob/main/src/net/beacon-transport.ads): `src/net/beacon-transport.ads`
- [UDP multicast](https://github.com/ge-garcia/beacon/blob/main/src/net/beacon-transport-udp.adb): `src/net/beacon-transport-udp.adb`

### Demonstrations

- [Telemetry registry](https://github.com/ge-garcia/beacon/blob/main/demo/src/telemetry.ads): `demo/src/telemetry.ads`
- [Telemetry codecs](https://github.com/ge-garcia/beacon/blob/main/demo/src/telemetry-codecs.adb): `demo/src/telemetry-codecs.adb`
- [In-process demo](https://github.com/ge-garcia/beacon/blob/main/demo/src/inproc_demo.adb): `demo/src/inproc_demo.adb`
- [Network publisher](https://github.com/ge-garcia/beacon/blob/main/demo/src/net_publisher.adb): `demo/src/net_publisher.adb`
- [Network subscriber](https://github.com/ge-garcia/beacon/blob/main/demo/src/net_subscriber.adb): `demo/src/net_subscriber.adb`

### Other components

- **Publisher**
- **Subscriber**

## Connections

- Publisher → Generic topic: publishes typed values (evidence: `README.md`)
- Generic topic → Subscriber: delivers typed values (evidence: `README.md`)
- Generic topic → Bounded queue: uses subscriber queues (evidence: `README.md`)
- Generic topic → Delivery modes: selects delivery mode (evidence: `README.md`)
- Topic bridge → Wire framing: bridges local values (evidence: `README.md`)
- Topic bridge → Transport interface: transports messages (evidence: `README.md`)
- UDP multicast → Transport interface: implements transport (evidence: `README.md`)
- Telemetry registry → Generic topic: instantiates topics (evidence: `README.md`)
- Telemetry codecs → Telemetry registry: serializes messages (evidence: `README.md`)
- In-process demo → Telemetry registry: demonstrates topics (evidence: `README.md`)
- Network publisher → Telemetry registry: publishes readings (evidence: `README.md`)
- Network subscriber → Telemetry registry: receives readings (evidence: `README.md`)
- Network subscriber → Wire framing: checks CRC (evidence: `README.md`)
