Communication Layer
The communication layer (syft-extras) provides building blocks for SyftBox applications to interact with each other and external services.
Package Overviewβ
syft-coreβ
Foundation package providing:
- π Permission system (
syft.pub.yamlformat) - π Workspace and datasite management
- π SyftBox URL handling
- π Auto-conversion from legacy formats
syft-eventβ
Event-driven RPC system for syft:// URLs:
- π Simple routing with decorators
- π¨ Request/Response pattern
- π Filesystem watching
- πΊοΈ Automatic schema generation
syft-rpcβ
Low-level serialization protocol:
- π Serialize/deserialize Python objects
- π¦ Support for Pydantic models and dataclasses
- π Full UTF-8 support
- π Type validation and security
syft-http-bridgeβ
HTTP API integration through filesystem:
- π HTTP client via filesystem transport
- π€ Automatic request/response serialization
- π Host whitelisting for security
- β‘ Connection pooling and caching
syft-cryptoβ
End-to-end encryption using Signal Protocols:
- π Forward secrecy with ephemeral keys
- π Mutual authentication via signed prekeys
- π‘ Asynchronous communication through DID documents
- π Optimized with 2 DH operations instead of 4
Communication Patternsβ
App-to-App (syft:// URLs)β
Applications communicate using syft:// URLs routed through the filesystem:
# Example: Sending a request
response = send_request("syft://user@email.com/app/endpoint", data)
App-to-External (HTTP Bridge)β
Applications access external APIs through the HTTP bridge:
# Example: Making HTTP request via filesystem
response = http_bridge.get("https://api.example.com/data")
Encrypted Communicationβ
End-to-end encryption ensures privacy:
# Example: Encrypted message
encrypted = encrypt(message, recipient_public_key)
note
Detailed API documentation and examples coming soon