Durable PHP is a self-hosted FaaS engine, heavily influenced by Durable Functions in C#. Durable PHP helps you write stateful workflows by writing orchestrations and entities (aka actors).
| Requirement | Provides |
|---|---|
| PHP 8.3+ | Language |
(¹) optional, replaces other requirement (²) not implemented yet
Download the cli and run dphp init to create a simple project.
The primary use-case for Durable PHP is simplifying complex, stateful coordination requirements in any application. You can view the following sections to view some common patterns:
Durable PHP is built on composable event-sourcing, where every operation/event/signal is composed of multiple events. This allows for flexible operations, prioritizing, and scaling. Originally, a partitioned approach was taken (similar to durable functions) to remove the need for distributed locking; however, through testing, it was discovered that a distributed lock was more scalable, where a partitioned approach was far more complex to scale.
To provide long-running execution guarantees in orchestrations, orchestrations have a set of rules that must be adhered to. We recommend PHPStan with the durable-php code rules applied (todo).