Last year I shared PHPStreamServer here.
PHPStreamServer is an event-loop-based application server and process manager built entirely in PHP. It brings HTTP serving, worker supervision, scheduled tasks, logging, and metrics into a unified runtime.
Applications remain loaded between requests, with asynchronous execution powered by Revolt event loop and AMPHP.
I've been quiet publicly since my last post. During that time, I've continued using it as the primary runtime for my personal projects and improving it based on the experience. I've now released version 0.9, the project's biggest update yet.
One of the biggest architectural changes in 0.9 is that PHPStreamServer now requires FFI. This allows it to call native OS APIs directly for capabilities such as Unix-socket peer credential verification, parent-death signaling, and native file monitoring.
Some highlights:
- Workers and scheduled tasks can now be registered and removed dynamically at runtime.
- Message-bus commands are now a public API, allowing workers to send requests directly to the master process, for example, to start or stop on-demand workers dynamically.
- The Unix-socket message bus was redesigned with security as a major focus. It now validates peer credentials and enforces source authorization, preventing unprivileged local users from managing a server running under a privileged account. Deserialization is also restricted to reject unsafe payloads.
- File monitoring now uses native inotify on Linux and FSEvents on macOS, with polling as a fallback.
- On Linux and FreeBSD, workers now use OS-level parent-death signaling, so they terminate instead of continuing as orphaned processes if the master process crashes or is killed.
- Daemon startup now waits for the master process to initialize before reporting success.
- Worker startup, shutdown, crash reporting, and log delivery are now more reliable.
- The supervisor now reports non-zero worker exits and termination by operating-system signals.
- The scheduler now supports named weekdays and months, presets such as
@daily, and uses fractional-second delays for more accurate execution.
- The public API now uses consistent worker terminology across all components.
- Console and log output were redesigned to give PHPStreamServer a distinct and consistent visual identity.
- Per-process network traffic monitoring now batches and sends only traffic deltas through the message bus, reducing inter-process communication overhead.
I also refreshed the documentation website with a redesigned landing page. You can check it out here:
Documentation:
https://phpstreamserver.dev/
GitHub:
https://github.com/phpstreamserver/phpstreamserver
Version 0.9 release notes:
https://github.com/phpstreamserver/phpstreamserver/releases/tag/v0.9.0
PHPStreamServer is still experimental and not yet recommended for production use.
I'd especially like feedback from developers working with long-running PHP applications, async PHP, FrankenPHP, RoadRunner, or OpenSwoole. What would you need to see before considering an application server like this for one of your projects?