# Use swoole and hyperf framework and a long running PHP application instead of symfony

**URL:** <https://forum.mautic.org/t/use-swoole-and-hyperf-framework-and-a-long-running-php-application-instead-of-symfony/34269>\
**Category:** Ideas and Feature Requests\
**Created:** [November 30, 2024, 4:30pm UTC](https://forum.mautic.org/t/use-swoole-and-hyperf-framework-and-a-long-running-php-application-instead-of-symfony/34269 "2024-11-30T16:30:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ldev](https://avatars.discourse-cdn.com/v4/letter/l/b38774/32.png) [@ldev](https://forum.mautic.org/u/ldev)\
**Post date:** [November 30, 2024, 4:30pm UTC](https://forum.mautic.org/t/use-swoole-and-hyperf-framework-and-a-long-running-php-application-instead-of-symfony/34269/1 "2024-11-30T16:30:16Z")

</div>

Imo using swoole and hyperf framework with PHP is a much better fit for this project than symfony and apache/nginx.

hyperf: [Hyperf](https://hyperf.wiki/3.1/)  
swoole: [GitHub - swoole/swoole-src: 🚀 Coroutine-based concurrency library for PHP](https://github.com/swoole/swoole-src)

Instead of running a separate docker container to just add crons and workers - you can spin up a side PHP processes from code, all managed by swoole process manager:

> **[Hyperf](https://hyperf.wiki/3.1/#/en/process)**
>
> Hyperf框架官方文档

Or it’s also possible to setup second level crons using crons package - again all from PHP code:

> **[Hyperf](https://hyperf.wiki/3.1/#/en/crontab)**
>
> Hyperf框架官方文档

Same with just task workers - you could specify how many task workers you want on application start and they would just do whatever work you need on application start - all in PHP. All without blocking the web UI workers.  
mautic could then be run as a single container instead of 3+, user adoption would become much simpler.

non blocking io - send absolute maximum of emails per second.  
It will have much much better performance compared to fpm or mod\_php.

And throw in built-in websockets support - you could build a way better responsive UI with that: [Hyperf](https://hyperf.wiki/3.1/#/en/websocket-server)

Imagine seeing how emails counts are flying out in real-time. would be neat.

Some large platforms written in PHP use it: [https://appwrite.io/](https://appwrite.io/)
