Download the PHP package sobi-labs/frameflow without Composer
On this page you can find all versions of the php package sobi-labs/frameflow. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sobi-labs/frameflow
More information about sobi-labs/frameflow
Files in sobi-labs/frameflow
Package frameflow
Short Description A lightweight, human-readable protocol for streaming payloads with metadata and integrity checks.
License MIT
Informations about the package frameflow
FrameFlow
A lightweight, human-readable streaming protocol for PHP 8.4+
FrameFlow is designed for developers who need a robust way to stream data (payloads) accompanied by rich metadata. It bridges the gap between simple line-based logs and complex binary formats. It's built for speed, integrity, and absolute simplicity.
Key Features
- Human Readable: Inspect your stream with a simple text editor.
- Robust Integrity: Automatic
sha256checksums andPayload-Lengthheaders for every frame. - Modern PHP 8.4: Fully utilizes Property Hooks and Asymmetric Visibility for maximum performance and clean code.
- Zero Dependencies: No vendor bloat. Just pure, high-performance PHP.
- Time-Ordered: Built-in RFC 9562 compliant UUIDv7 for natural sorting of messages.
The Protocol Structure
Each FrameFlow message consists of a global Header and one or more Frames.
Quick Start
Installation
Basic Usage
Output
Advanced Concepts
Property Hooks & Metadata
FrameFlow uses PHP 8.4 property hooks. This means size and checksum are calculated on-the-fly only when needed, ensuring your data is always consistent without manual updates.
Metadata Escaping
FrameFlow automatically handles multi-line metadata by escaping line breaks (\n, \r) during encoding. This ensures the protocol structure remains intact even with complex meta-information.
Specification Highlights
- Delimiters: Blocks are separated by
---. - Metadata: Key-Value pairs followed by a colon and a space.
- Payloads: Prefixed by
Payload-Lengthto allow safe binary data transmission. - IDs: Every frame has an ID. If not provided, FrameFlow generates sequential IDs for you.
License
The MIT License (MIT). Please see License File for more information.
Roadmap
The vision for FrameFlow is to provide a seamless, transparent way to stream data and metadata. Below is our strategic path forward:
Phase 1: Core & PHP Ecosystem (Current)
- [x] Base data structures (Message, Frame, Meta)
- [x] RFC 9562 compliant UUIDv7 integration (Zero-Dependency)
- [x] PHP 8.4 high-performance Encoder
- [ ] Next: High-performance PHP Decoder (Streaming Parser)
- [ ] Comprehensive PHPUnit test suite (Aiming for 100% code coverage)
- [ ] Static analysis integration (PHPStan/Psalm)
Phase 2: Cross-Language Support
- [ ] JavaScript/TypeScript Client: A browser-compatible decoder for
fetch()and WebStreams API. - [ ] Cross-Platform Specs: Formalization of the FrameFlow specification for third-party implementations.
- [ ] Go/Rust Ports: High-performance implementations for microservice environments.
Phase 3: Advanced Features
- [ ] Binary Frames: Optimized handling for raw binary data to minimize encoding overhead.
- [ ] Compression: Optional frame-level compression (e.g., zstd, gzip).
- [ ] Encryption: Native support for AEAD (Authenticated Encryption with Associated Data) at the frame level.
Built with ☕ and ❤️ for the modern PHP ecosystem.