How Synapses Differ from Connections
The key difference: synapses learn. A synapse that frequently carries successful signals becomes stronger, meaning it gets priority for future signal propagation. A synapse that goes unused weakens and eventually prunes. This mirrors Hebbian learning in neuroscience — connections that fire together wire together.
Synapse Structure
Synapse Lifecycle
1. Discovery
Nodes discover potential synapse partners through:- Bootstrap nodes — Well-known entry points that introduce new nodes to the network
- Signal traces — Signals carry their path; receiving nodes can form synapses with upstream nodes
- Discovery signals — Nodes broadcast capability announcements
2. Handshake
When two nodes decide to form a synapse, they perform a handshake:- Exchange node identities and capabilities
- Negotiate transport binding (TCP only today — see Transport Bindings)
- Exchange cryptographic material via the pluggable crypto module
- Establish initial weight (typically 0.1)
3. Active State
An active synapse transmits signals bidirectionally. With each successful signal transmission:- Weight increases by a configurable delta
- Latency statistics update
- The synapse is marked as recently active
4. Strengthening
Weight increases when:- Signals are successfully transmitted and acknowledged
- High-weight signals traverse the synapse
- The remote node provides valuable responses (as determined by the application layer)
5. Weakening
Weight decreases when:- Time passes without signal activity (decay)
- Signals fail or time out
- The remote node becomes unreliable
6. Dormancy
When a synapse’s weight drops below the dormancy threshold (configurable, default 0.01), it enters a dormant state. Dormant synapses:- Stop actively transmitting signals
- Retain their state in the storage backend
- Can be reactivated if the remote node sends a signal
7. Pruning
After a configurable dormancy period (default: 7 days), dormant synapses are pruned — their state is archived and the connection resources are released.Transport Bindings
Synapses are transport-agnostic. The actual bytes move over a configurable transport layer:Synapse Topology
The collection of all synapses in the network forms the synapse topology — a weighted, directed graph. This topology is:- Self-organizing — No central authority defines it
- Adaptive — It reshapes based on actual signal patterns
- Resilient — Node failures cause local topology adjustment, not global disruption
- Observable — Nodes can inspect their local topology for monitoring and debugging
Local vs Global Topology
No single node knows the full network topology. Each node maintains knowledge of:- Its direct synapses (immediate connections)
- Nearby topology (2-3 hops, learned through signal traces)
- Bootstrap references (known stable nodes for re-entry)