2017 © Pedro Peláez
 

library mqk

image

mqk/mqk

  • Wednesday, January 3, 2018
  • by imcj
  • Repository
  • 3 Watchers
  • 17 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 25 % Grown

The README.md

MQK

简体中文, (*1)

By google translate, (*2)

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., (*3)

Install

composer require mqk/mqk

Dependencies

  • php 5.6
  • redis-server

Usage

  1. 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);
  1. Create class and static methods
class Calculator
{
    public static function sum($a, $b)
    {
        return $a + $b;
    }
}
  1. 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., (*4)

  • 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., (*5)

Chinese contents of table

The Versions

11/08 2017

v0.0.4-alpha

0.0.4.0-alpha

  Sources   Download

The Requires

 

The Development Requires

by Avatar fatrellis

18/07 2017

v0.0.3-alpha

0.0.3.0-alpha

  Sources   Download

The Requires

 

The Development Requires

by Avatar fatrellis

15/07 2017

v0.0.2-alpha

0.0.2.0-alpha

  Sources   Download

The Requires

 

The Development Requires

by Avatar fatrellis

13/07 2017

v0.0.1-alpha

0.0.1.0-alpha

  Sources   Download

The Requires

 

The Development Requires

by Avatar fatrellis