Mqk
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 / Use
/learn @imcj/MqkREADME
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.6
- redis-server
Usage
- The first step is to use the
K::invokemethod 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 started
- Basic
- RPC
- Event
- Best practices
- Config
- Error handle
- Advance options
- Process health
- Logging
- Signals
- Sharding
- Command line
- Process management
Chinese contents of table
Related Skills
node-connect
346.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
