services/airpass_sync_engine library
Airpass Protocol — Sync Engine
The core business logic for epidemic (gossip) routing.
Two-Phase Sync Protocol
When two devices connect, the sync engine performs a two-phase exchange:
Phase 1 — Filter Exchange: Each side builds a Bloom filter of its known message IDs and sends it. This is a tiny payload (~1.2 KB for 1000 messages).
Phase 2 — Filtered Sync: Each side uses the received Bloom filter to exclude messages the peer already has, then sends only the novel messages + full routing table.
This dramatically reduces bandwidth in dense meshes where most nodes share a large percentage of their message stores.
Classes
- AirpassSyncEngine
- Orchestrates the epidemic data exchange between two connected peers.
- SyncMessageEntry
- A message entry within a SyncPayload.
- SyncNodeEntry
- A node entry within a SyncPayload.
- SyncPayload
- The serializable envelope exchanged between peers during a sync.