Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend job for printing #139

Open
usu opened this issue May 4, 2021 · 0 comments
Open

Backend job for printing #139

usu opened this issue May 4, 2021 · 0 comments
Assignees

Comments

@usu
Copy link
Member

usu commented May 4, 2021

Outsource PDF printing into background job worker

Proposed concept

Why swoole: Without swoole, we cannot easily run multiple workers on the same node, which probably would lead to inefficient usage of CPU resources. The only way to scale would be to run multiple worker nodes (expensive) or finding another method to run multiple php workers in parallel (not found any good solutions).

Alternative

Use some linux tooling (e.g. supervisord) to run multiple instances of the PHP workers, e.g.
https://github.com/slashfan/docker-supervisor-php-workers

In that case we wouldn't need swoole but can just write our workers in plain old PHP, e.g something link this demo:
https://devcenter.heroku.com/articles/php-workers

Open points

  • if we use swoole-jobs: I haven't fully checked the message format that is exchanged via RabbitMQ. In case this is a special format, then we might need swoole-jobs as a dependency in the main app to generate the messages
@usu usu assigned usu and pmattmann May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants