Skip to content

mangoweb-backend/kyu

Repository files navigation

Kyu

Build Status Api Documentation

WIP Well documented reliable redis-backed queue library.

Design priorities

In descending order of importance:

  1. Documentation. While the API is designed to be intuitive, everything from usage to edge cases is documented.

  2. Stability. This implements a reliable queue. Messages are atomically moved from lists and timed-out messages are periodically reinserted up to a specified number of retries. No message should ever get lost.

  3. Simplicity. Functionality is kept only as complex as a single developer can comprehend at a time.

Notably, feature set is not on the list as it directly leads to violation of those three priorities.

Example

<?php

$redis = new Redis();
$redis->connect('127.0.0.1', 6379);

$kyu = new Kyu('channel-name', new RedisBackend($redis));

$kyu->enqueue(new Message('my payload'));
$message = $kyu->waitForOne();
$message->getPayload();
$kyu->removeSuccessful($message);

Architecture

Overview

TODO

Redis backend

TODO

License