Signals
A signal is the fundamental data unit in NTL. It replaces the concept of a “request,” “message,” or “event” from traditional protocols.What is a Signal?
In biological neural networks, a signal is an electrochemical impulse that propagates across neurons. It carries information, has intensity (amplitude), and triggers downstream activity when it exceeds a threshold. NTL signals work the same way:- They carry a payload (the data)
- They have a weight (priority/intensity)
- They have a type (what kind of signal this is)
- They are signed (cryptographically verified origin)
- They have propagation rules (how far and where they should travel)
Signal Structure
Signal Types
Signals are strongly typed. The type determines how the propagation engine handles routing and how receiving nodes process the signal.| Type | Description | Use Case |
|---|---|---|
Data | Carries a data payload | Transferring state, content, records |
Query | Requests data from the network | Discovering information, search |
Event | Notifies of a state change | Real-time updates, triggers |
Command | Requests an action | Remote execution, orchestration |
Heartbeat | Maintains synapse liveness | Health checks, presence |
Discovery | Announces capability | Service registration, topology |
Ack | Confirms signal receipt | Delivery guarantees |
Custom Types
Applications can register custom signal types with the node’s type registry:Signal Weight
Weight is a floating-point value between 0.0 and 1.0 that represents signal priority and intensity. Weight affects:- Activation — Higher weight signals are more likely to trigger activation thresholds
- Propagation priority — When a node has multiple signals to propagate, higher weight signals go first
- Synapse strengthening — High-weight signals strengthen the synapses they traverse more than low-weight signals
Signal Lifecycle
- Emit — A node creates a signal with payload, type, and weight
- Sign — The crypto module signs the signal with the node’s identity
- Encode — The payload is encoded (CBOR by default for compactness)
- Propagate — The signal enters the propagation engine
- Activate — At each node, the activation gate determines if the signal triggers processing
- Process — The receiving node handles the signal
- Ack — Optionally, the receiver emits an acknowledgment signal
Encoding
NTL uses CBOR (Concise Binary Object Representation) as the default encoding for signal payloads. CBOR is:- Binary (compact, fast to parse)
- Self-describing (no external schema needed)
- Based on the JSON data model (familiar to developers)
- An IETF standard (RFC 8949)
Correlation
Signals can be correlated using thecorrelation_id field. This allows request-response patterns when needed (an adapter receiving an HTTP request emits a Query signal and waits for a correlated Data signal), while keeping the core transport model non-bilateral.