earls/stork-command-queue-bundle

Service for queue line commands

Installs: 242

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 12

Forks: 0

Open Issues: 0

Type:symfony-bundle

dev-master 2015-09-02 19:02 UTC

This package is not auto-updated.

Last update: 2019-09-10 10:16:54 UTC


README

##Overview Stork is a public project and intend to replace Flamingo. It uses the experience of Flamingo but in a new design in order to minimize the use of resources from the system.

Stork command queue is a queue manager tool for Symfony command lines with two parts:

  • Stork Launcher Service: Used for push new line command to the queue from Symfony framework.
  • Stork Manager Command: It is a line command called after a new line command is added to the queue in order to manage the execution of the commands. Stork manager instantiate a new Symfony kernel in order to serve to an specific queue and do not end until all the commands from the queue have been executed.

With this new approach we intend to save resources because there is just one process running in the system serving for all the command in the queue and perform better time of response because the instantiation of the kernel is performed just one time. The idea of use a process per queue is for isolate each queue, running in their own sandbox and allow to run many queue in parallel.

##Process

  • When a line command is executed through the queue, the command should be passed to: Stork.launcher service in order to queue it and execute in sequence.
  • After the line command was added to the queue a verification is performed against the queue process, if there is a process running then continue with the execution otherwise a new instance of the kernel is instantiated and leave it running until all the line command in the queue has been executed.
  • The control of the queues is throught the use of tables.
  • Basic operations have been implemented:
    • List: list all the line commands pending to execute in an specific queue.
    • Clear: remove all the pending line command, leaving the queue empty and terminate the execution of the manager.
    • Add: add a line command via line command directly.
    • Remove: remove an specific line command from the queue.
    • Stop: stop the execution of the pending line commands.
    • Start: resume the execute of the pending line commands.
    • Log: Show the log available.

##Content