Most IoT networks rely on centralized brokers to route telemetry. While reliable, this design creates a single point of failure and adds network latency when edge devices only need to interact with their immediate physical surroundings. Synapse is an experimental project exploring a different approach. It replaces the centralized broker with a symmetric peer to peer mesh topology built on ZeroMQ. The project aims to allow sensor nodes to ingest data and perform spatial anomaly detection locally without relying on a cloud server for validation.
In the current implementation, every participant in the network is an identical node that performs sensing, data ingestion, and local registry maintenance. Nodes discover each other dynamically on the local network using UDP multicast beacons. The system uses the Uber H3 spatial index to group sensors by physical proximity rather than validating data against global thresholds. Nodes only subscribe to ZeroMQ topics corresponding to their own H3 cell and adjacent cells. When a node receives telemetry, it runs a leave one out statistical check against the active peers in the same geographic cell. The default method uses Median Absolute Deviation. If a reading deviates significantly from the local median, the node flags the originating sensor as faulty and isolates it from further statistical calculations.
To secure the data channel, the network uses CurveZMQ for encryption and mutual authentication. Nodes will only accept connections from peers whose public keys are listed in a shared text file acting as an allowlist. This prevents unauthorized devices from joining the mesh and altering the statistical baseline. Relying on a static file for key provisioning introduces a centralized administrative limitation.
The next major architectural iteration aims to solve the key distribution problem. The plan is to replace the static allowlist with a decentralized identity management system based on Conflict Free Replicated Data Types and cryptographic signatures. Administrators will inject a signed public key into any single node, and the network will propagate the authorization state across the mesh using a gossip protocol. This allows the trust list to update dynamically without a central provisioning server. Additionally, the long term roadmap involves compiling the core spatial and statistical logic into WebAssembly to enable execution on resource constrained microcontrollers.
Synapse remains a proof of concept designed to test specific distributed systems theories. Structural critique regarding the transition to distributed data types for key management or the scalability of the ZeroMQ peer discovery mechanism is highly encouraged. The source code and documentation are open for review.
Repo: https://github.com/onyks-os/Synapse
Documentation: https://onyks-os.github.io/synapse/