Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.

daemonization/worker pool strategy examples #7

Open
wotek opened this issue Dec 3, 2014 · 4 comments
Open

daemonization/worker pool strategy examples #7

wotek opened this issue Dec 3, 2014 · 4 comments
Labels

Comments

@wotek
Copy link
Contributor

wotek commented Dec 3, 2014

Hey man, original fork had easy-to-use bin tool that did daemonization/worker pool strategy quite well.
Can you provide an example how to achieve same thing with your lib?

@dominics
Copy link
Contributor

dominics commented Dec 3, 2014

Personally, I'm subclassing the Worker to fire HTTP requests at an FPM pool for every job class. That way, FPM is doing the forking and process management - you get adaptive process pools, and safety features like "emergency restart in case of opcode cache destruction".

I do want to get the new Symfony2 CLI worker process up to scratch with the features in the old fork though. The worker command is intended to daemonize and have the same capabilities as the old bin tool.

@wotek
Copy link
Contributor Author

wotek commented Dec 3, 2014

So correct me if I'm wrong. You do trigger job through http? or.. ? Can you provide some example here?

@dominics
Copy link
Contributor

dominics commented Dec 4, 2014

Yeah, you're right. These days we are using benmanns/goworker as the daemonized worker. We enqueue using PHP, from our regular framework. The golang workers dequeue and fire HTTP requests at a locally-bound FPM pool (say, 127.0.0.1:12345), running a regular old framework controller.

That stuff is a bit sprawling and large for me to copy+paste. I'm hoping to get an example "marshalling" worker in the codebase eventually, as an example.

@wotek
Copy link
Contributor Author

wotek commented Dec 4, 2014

Sounds interesting - I've seen benmanns/goworker I think I'm going to give it a spin in my spare time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants