MQK是一个简单、高性能的PHP后台任务框架

网友投稿 4030 2022-10-30

MQK是一个简单、高性能的PHP后台任务框架

MQK是一个简单、高性能的PHP后台任务框架

MQK

简体中文

By google translate

MQK is a simple, high-performance PHP background task framework. MQK simplifies complex message queues to RPC and event handling, eliminating the need for complex queues, tasks, and processes. MQK can handle 20,000 + data per second on a single core VPS, and 6,000 + per second in fault tolerant mode.

Install

composer require mqk/mqk

Dependencies

php 5.6redis-server

Usage

The first step is to use the K::invoke method to call the method and pass in the parameter\K::invoke ('\\ MQK\\Test\\Calculator::sum', 1, 2).

\K::invoke('Calculator::sum', 1, 2);

Create class and static methods

class Calculator{ public static function sum($a, $b) { return $a + $b; }}

Start the consumer program. In debug mode, the console outputs the return result of the asynchronous task.

$ vendor/bin/mqk run[2017-07-11 08:14:52] 14327 .NOTICE: Master work on 14327 [] [][2017-07-11 08:14:56] 14331 .INFO: Message finished and result is 2 [] []

Development status

Development, is not recommended for use in the production environment.

No rigorous testing, there may be a variety of problems.Function parameters in json format serialization, can not use php objects

Documents

It is recommended to use MQK's event mechanism to perform real-time data analysis.

Getting startedBasicRPCEventBest practicesConfigError handleAdvance optionsProcess healthLoggingSignalsShardingCommand lineProcess management

Chinese contents of table

新手入门基本使用说明RPC事件最佳实践配置错误处理高级选项进程健康状态日志信号扩容命令行说明进程管理

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:MyBatis从入门到精通—MyBatis架构原理
下一篇:CFramework 基于DataBinding的一个基本框架,网络层使用okHttp
相关文章

 发表评论

暂时没有评论,来抢沙发吧~