System Architecture

Deep dive into the operational modules that construct the GhostMesh background system.

1. Daemon Architecture

The GhostMesh background daemon is split into three decoupled threads to minimize memory blocking and run securely on Android/Linux systems:

  • Radio Linker: Responsible for discovery and advertisement frame encoding over BLE and local Wi-Fi.
  • Packet Queue: An ephemeral, encrypted local storage managing in-flight relay envelopes using priority queues.
  • Crypto Core: Houses the Double Ratchet key ratchets, validating packet headers and decrypting final targets.

2. Ad-hoc Linking Topology

Devices do not form persistent star networks or client-server shapes. Instead, they operate as a dynamic, link-state ad-hoc mesh:

Node A
BLE Scanner
Node B
Relay Hops
Node C
BLE Advertiser

Nodes continuously cycle between BLE advertising (beaconing current queue hashes) and scanning (seeking matching hops). If Node A has a packet destined for Node C, it transfers it to Node B in a fast transient link.

3. Store-and-Forward Locomotion

In low-density environments, physical devices might be out of radio range. GhostMesh solves this by using human locomotion as a packet carrier:

“If no radio path exists, packets are stored in local encrypted cache memory. When the device owner walks into proximity of other peers, the routing engine automatically performs sync checks and relays the packet.”