2017 © Pedro Peláez
 

library qpm

Quick process management framework in PHP. To simplify PHP daemon development

image

comos/qpm

Quick process management framework in PHP. To simplify PHP daemon development

  • Monday, May 8, 2017
  • by bigbigant
  • Repository
  • 17 Watchers
  • 66 Stars
  • 201 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 24 Forks
  • 3 Open issues
  • 10 Versions
  • 3 % Grown

The README.md

QPM Build Status

QPM全名是 Quick(or Q's) Process Management Framework for PHP. PHP 是强大的web开发语言,以至于大家常常忘记PHP 可以用来开发健壮的命令行(CLI)程序以至于daemon程序。 而编写daemon程序免不了与各种进程管理打交道。QPM正是为简化进程管理而开发的类库。, (*1)

QPM是一个专门针对*nix CLI编程的框架,不可用于Windows环境和CGI编程。, (*2)

QPM 目前包括4个主要的子模块: * Process 基础进程管理,包括fork的面向对象封装; * Supervision 进程监控,实现了OneForOne、MultiGroupOneForOne 和 TaskFactoryMode 三种模式; * Pid 支持PID文件管理; * Log 实现了用于测试的简易文件日志,同时支持接入 Psr 标准的日志实现,例如 Monolog。, (*3)

examples目录下有若干使用的示例,tests是测试用例所在的目录。, (*4)

QPM也支持通过Composer安装:composer require comos/qpm, (*5)

也可通过其他方式下载并部署QPM,参考安装和使用QPM。, (*6)

QPM 运行时,必须使用autoloader,强烈建议使用Composer自带的autoloader,否则需要自行注册autoload回调,可参考:autoload.php, (*7)

通过Wiki 可以获取更多信息。, (*8)

QPM 最新版本是v1.0,与 之前的v0.3有较大的变化,使用时请留意兼容性问题,如果没有修改代码的计划,请不要从v0.3升级到v1.0。, (*9)


QPM’s full name is Quick Process Management Framework in PHP., (*10)

PHP is so powerful in web development, that people always forget that it could be used to write robust CLI programs, even daemon programs. Process management is a base of daemon programming. QPM is such a library to simplify process management. QPM is a CLI programming framework based on *nix systems. It cannot be used in Windows and CGI environment., (*11)

There're four main packages:, (*12)

  • Process, the basic process management, includes an OO style encapsulation of pcntl_fork.
  • Supervision, the process supervisor, supports one-for-one mode, multi-group-one-for-one mode and task factory mode.
  • Pid manages the PID file to prevent the the daemon is started duplicately.
  • Log includes a file based simple Logger as the test purpose. The Logger supports PSR-3, so you can connect QPM to any implementer of PSR-3, such as Monolog.

We provide rich usage samples in ‘examples’ directory., (*13)

The library is covered by unit tests well, all the tests are in ‘tests’ directory., (*14)

You can install QPM by composer:, (*15)


composer require comos/qpm

Notice: the lastest verison v1.0 is not compatible with v0.3. If you're using v0.3 or earlier versions, don't upgrade the library without refactoring and test., (*16)

The other ways to get and use QPM, see Getting Started., (*17)

The Versions

08/05 2017

dev-master

9999999-dev http://github.com/Comos/qpm

Quick process management framework in PHP. To simplify PHP daemon development

  Sources   Download

GPL-3

The Requires

 

The Development Requires

by Qing Zhao

process daemon

08/05 2017

v1.1.0

1.1.0.0 http://github.com/Comos/qpm

Quick process management framework in PHP. To simplify PHP daemon development

  Sources   Download

GPL-3

The Requires

 

The Development Requires

by Qing Zhao

process daemon

25/04 2015

v1.1.0-alpha

1.1.0.0-alpha http://github.com/Comos/qpm

Quick process management framework in PHP. To simplify PHP daemon development

  Sources   Download

GPL-3

The Requires

 

The Development Requires

by Qing Zhao

process daemon

26/03 2015

v1.0.0

1.0.0.0 http://github.com/Comos/qpm

Quick process management framework in PHP. To simplify PHP daemon development

  Sources   Download

GPL-3

The Requires

 

The Development Requires

by Qing Zhao

process daemon

26/03 2015

dev-develop

dev-develop http://github.com/Comos/qpm

Quick process management framework in PHP. To simplify PHP daemon development

  Sources   Download

GPL-3

The Requires

 

The Development Requires

by Qing Zhao

process daemon

24/03 2015

v1.0.0-alpha

1.0.0.0-alpha http://github.com/Comos/qpm

Quick process management framework in PHP. To simplify PHP daemon development

  Sources   Download

GPL-3

The Requires

 

The Development Requires

by Qing Zhao

process daemon

20/03 2015

0.3.1

0.3.1.0 http://github.com/Comos/qpm

Quick process management framework for PHP. To simplify PHP daemon development

  Sources   Download

GPL-v3

The Requires

 

The Development Requires

by Alex Chao

process daemon

08/03 2015

0.3.0

0.3.0.0 http://github.com/Comos/qpm

Quick process management framework for PHP. To simplify PHP daemon development

  Sources   Download

GPL-v3

The Requires

 

The Development Requires

by Alex Chao

process daemon

28/02 2015

0.2.1

0.2.1.0 http://github.com/Comos/qpm

Quick process management framework for PHP. To simplify PHP daemon development

  Sources   Download

GPL-v3

The Requires

  • php >=5.4.0

 

The Development Requires

by Alex Chao

process daemon

28/02 2015

0.2.1-alpha

0.2.1.0-alpha http://github.com/Comos/qpm

Quick process management framework for PHP. To simplify PHP daemon development

  Sources   Download

GPL-v3

The Requires

  • php >=5.4.0

 

The Development Requires

by Alex Chao

process daemon