Nexus vs alternatives
PHP has several concurrent-I/O libraries and frameworks. This matrix compares Nexus with the most common alternatives across capabilities that matter for production service development — from actor-model fundamentals to type safety, persistence, and multi-worker scaling. Cells marked "planned — see roadmap" reflect capabilities not yet shipped in a stable release; no aspirational ticks.
| Actor model | Yes | No | No | No | No |
| Cluster / remote actors | planned — see roadmap | No | Yes | No | No |
| Deterministic test runtime | Yes | No | No | No | No |
| Doctrine ORM integration | Yes | No | Yes | No | partial — sync only |
| Durable state persistence | Yes | No | No | No | partial — manual |
| Event sourcing (built-in) | Yes | No | No | No | No |
| Fiber runtime (no Swoole required) | Yes | Yes | No | No | No |
| Graceful shutdown semantics | Yes | partial | partial | partial — manual | No |
| HTTP integration (typed handlers) | Yes | Yes | Yes | partial — manual | No |
| Multi-worker scaling (hash ring) | Yes | No | Yes | partial — manual | partial — manual |
| Persistence backends (DBAL, Doctrine) | Yes | No | partial | No | partial — manual |
| Psalm generics / type safety | Yes | partial | partial | No | No |
| Supervision trees | Yes | No | No | No | No |
| Swoole runtime | Yes | No | Yes | Yes | No |
| WebSocket support | Yes | Yes | Yes | Yes | No |
Activate any column header to sort. "planned — see roadmap" = capability not yet shipped in a stable release. Competitor data reflects public documentation as of June 2026.
Reading the matrix
Actor model and supervision
Nexus is the only PHP library in this comparison with a full actor model — typed message passing, parent-supervised children, configurable restart strategies, and death watch. Amphp has coroutines and channels but no actor abstraction or supervision tree; crashes propagate as PHP exceptions up the call stack rather than being handled by a policy-driven parent. Swoole provides coroutines but leaves concurrency structure entirely to the application. RoadRunner is a process model (workers share nothing) rather than a structured-concurrency model.
The actor model is not a performance feature — it is a structural one. The benefit is that failure handling is centralised, testable, and visible in the code rather than scattered across try/catch blocks.
Type safety and static analysis
ActorRef<T> carries the message
type as a Psalm generic. You cannot send the wrong type without Psalm flagging it
at analysis time. No other library in this comparison enforces message types at
the compiler level — Amphp and Swoole are dynamically typed at message boundaries.
The nexus-psalm plugin adds seven additional rules
specific to actor code: message immutability, mutable closure capture, blocking I/O
inside handlers, and generic type inference for factory methods. These rules are
unique to Nexus; no other PHP concurrency tool ships a comparable static-analysis extension.
Persistence and event sourcing
Nexus ships first-party event sourcing and durable state persistence in
nexus-persistence. Event replay, snapshots,
retention policies, and writer-conflict detection are all built in.
Alternatives in this comparison either have no built-in persistence story
(Amphp, raw Swoole) or depend on external event-store integrations.
The DBAL and Doctrine ORM backends mean you can use your existing database and schema tooling. There is no separate event-store service to run.
Multi-worker scaling
The worker pool scales actor systems across CPU cores via Swoole threads. A consistent hash ring ensures that actors with the same name always route to the same worker, so there is no cross-worker state sharing. RoadRunner also scales across workers but uses a process-per-worker model with no shared memory or actor routing; each worker is a fresh PHP process with no awareness of actors running in other workers.
What Nexus does not compete with.
Some tools occupy a different position in the stack and are better treated as complements than competitors.
Symfony Messenger
Symfony Messenger is an excellent choice for simple, stateless background jobs dispatched from a PHP-FPM application — send an email, resize an image, update a search index. If that covers your needs, Messenger is the right tool. Nexus becomes relevant when you need long-lived stateful workers, supervision, event sourcing, or concurrent request handling inside a single process.
Laravel Queues / Horizon
The same logic applies. Laravel Queues excel at distributed, retryable job processing with Redis or SQS as the broker. Nexus is not a job queue — it is a structured-concurrency runtime for long-lived processes. The two can coexist: a Laravel application can dispatch a job that hands work off to a Nexus service, which processes it in an actor.
ReactPHP
ReactPHP gives you a raw event loop — great for building custom protocols, proxies, or network tools where you want full control. Nexus builds on top of the async-I/O model ReactPHP pioneered but adds the actor abstraction layer. If you want the event loop without the structure, ReactPHP is lighter. If you want structure, supervision, and typed message passing, Nexus is the answer.
Doctrine ORM alone
Nexus integrates with Doctrine, it does not replace it. If your persistence requirements are straightforward — save a record, load a record, run a query — Doctrine ORM with PHP-FPM is the lowest-friction approach. Nexus persistence becomes valuable when you need event sourcing, audit trails, replay, or actor-per-aggregate ownership semantics.
Ready to see it in code?
The Quick Start guide has you running an actor in under five minutes.
composer require nexus-actors/nexus