Generic decentralized service layer for mesh networks. Includes FAPP (psychotherapy) and Housing as reference services. - ServiceMessage with Ed25519 signatures - Wire protocol (64-byte header + CBOR) - ServiceRouter with pluggable handlers - Verification framework (3 trust levels) - 32 tests, 3 examples
2.3 KiB
2.3 KiB
MeshService Status
Overview
Generic decentralized service layer for mesh networks.
Crate: meshservice
Version: 0.1.0
Status: ✅ Core complete, ready for integration
Completed
- Core message types (
ServiceMessage,MessageType) - Identity management (
ServiceIdentitywith Ed25519) - Wire protocol (64-byte header + CBOR payload)
- Message store with eviction policies
- Service router with pluggable handlers
- Verification framework (3 levels)
- FAPP service (psychotherapy appointments)
- Housing service (room/apartment sharing)
- 32 passing unit tests
- 3 working examples
Architecture
ServiceMessage → ServiceRouter → ServiceHandler → ServiceStore
↓
TrustedVerifiers
File Structure
src/
├── lib.rs # Crate root, service IDs, capabilities
├── identity.rs # Ed25519 key management
├── message.rs # ServiceMessage, MessageType
├── router.rs # ServiceRouter, ServiceHandler trait
├── store.rs # In-memory store with eviction
├── verification.rs # Trust levels, TrustedVerifiers
├── wire.rs # Binary encoding/decoding
├── error.rs # Error types
└── services/
├── mod.rs
├── fapp.rs # FAPP implementation
└── housing.rs # Housing implementation
examples/
├── fapp_service.rs
├── housing_service.rs
└── multi_service.rs
Integration Points
With quicprochat-p2p
The MeshService layer sits above the transport layer. Integration:
- Receive raw bytes from mesh transport
wire::decode()to getServiceMessagerouter.handle()returnsServiceAction- On
StoreAndForward, re-broadcast via transport
Custom Services
- Define payload structs (serde + CBOR)
- Implement
ServiceHandlertrait - Register with router:
router.register(Box::new(MyService))
Next Steps
- Integration with quicprochat-p2p transport
- Service discovery protocol
- Encrypted reservation flow (E2E)
- Persistent storage backend
- Rate limiting per sender
Metrics
| Metric | Value |
|---|---|
| Lines of Code | ~2000 |
| Tests | 32 |
| Examples | 3 |
| Dependencies | 10 |