I’m looking into introducing Temporal workflows in a web application with a PHP backend; specifically, the API layer is running on Symfony served via Nginx / PHP-FPM.
Our API layer has a number of long-running / background tasks that could serve as good initial candidates (e.g. CSV imports, integrations with 3rd party systems, etc.)
After reviewing the PHP SDK docs - foundations, at a high-level, two of the tasks I must do are the following:
- Select a user-flow and Refactor/rewrite the backend logic to use workflows and activities.
- Spawn a worker process to handle workflow/activity function executions
My question I want to confirm my understanding that spawning a PHP worker process capable of running my existing logic would be a signficant level of effort (LOE), because the existing backend logic has been tested on PHP-FPM (process-per-request model) whereas the PHP Temporal worker processes run on Roadrunner which uses a long-running application processes for handling requests. So, we would need to retrofit our application logic to work correctly on RoadRunner.
Does that sound correct? Can anyone from the PHP Temporal community provide any suggestions on how I might proceed?