Architecture
The transport layer consists of three core abstractions:- Client Protocol (
SyftFlwrClient) - Unified interface for accessing datasite information - RPC Protocol (
SyftFlwrRpc) - Message sending and response retrieval - Events Protocol (
SyftFlwrEvents) - Asynchronous message handling and processing
Transport Modes
SyftBox Transport (Default)
Best for: Local development, on-premise deployments, high-security scenarios- Full RPC/crypto/event stack via
syft_core.Client - End-to-end encryption with X3DH key exchange
- Filesystem-based message routing
- Watchdog file monitoring for real-time events
- Futures database for response tracking
- Client:
SyftCoreClient(wrapssyft_core.Client) - RPC:
SyftRpc(usessyft_rpclibrary) - Events:
SyftEvents(usessyft_eventlibrary)
P2P Transport
Best for: Cloud deployments, Google Colab, environments without local SyftBox- Direct Google Drive API integration via
GDriveFileIO - File-based message passing (
.requestand.responsefiles) - No local filesystem dependencies
- Polling-based event handling
- Access control via Google Drive permissions
- Client:
SyftP2PClient(lightweight, email-based) - RPC:
P2PFileRpc(file-based messaging) - Events:
P2PFileEvents(polling-based)
Factory Functions
Syft-Flwr automatically detects the appropriate transport implementation:Transport Detection Order
When no transport is specified, Syft-Flwr uses this detection order:- Explicit
transportparameter - Highest priority - Project config - Read from
pyproject.toml[tool.syft_flwr]section - Local SyftBox - Check for
syft_coreconfig file - Error - Cannot auto-detect, must specify transport
Configuration
Transport configuration is stored inpyproject.toml:
Encryption Support
| Transport | Encryption | Method |
|---|---|---|
| SyftBox | ✅ Supported | X3DH + AES-256-GCM via syft_crypto |
| P2P | ⚠️ Planned | Currently relies on Google Drive access control |
Next Steps
SyftBox Transport
Learn about the traditional SyftBox client with full RPC/crypto stack
P2P Transport
Explore cloud-based P2P synchronization for Colab and remote deployments