diff --git a/.laminas-ci.json b/.laminas-ci.json index 64be8c2..bd7455a 100644 --- a/.laminas-ci.json +++ b/.laminas-ci.json @@ -3,6 +3,9 @@ "--no-scripts", "--no-plugins" ], + "extensions": [ + "redis" + ], "ignore_php_platform_requirements": { } -} \ No newline at end of file +} diff --git a/.laminas-ci/pre-run.sh b/.laminas-ci/pre-run.sh index 8b8528d..b891c0e 100755 --- a/.laminas-ci/pre-run.sh +++ b/.laminas-ci/pre-run.sh @@ -2,4 +2,4 @@ # Due to the fact that we are disabling plugins when installing/updating/downgrading composer dependencies # we have to manually enable the coding standard here. -composer enable-codestandard +#composer enable-codestandard diff --git a/README.md b/README.md index 2d0c9e8..4536b1a 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,7 @@ The greatest benefit is to application responsiveness which allows faster execut The queue system uses logs to ensure maintainability and implements retry features for reliability and stability. -Queue process - - +![Queue process](https://github.com/user-attachments/assets/8eb60c02-4e3a-4a88-b3ff-811d0410337b) ## Badges @@ -30,7 +28,6 @@ The greatest benefit is to application responsiveness which allows faster execut [![Qodana](https://github.com/dotkernel/queue/actions/workflows/qodana_code_quality.yml/badge.svg?branch=main)](https://github.com/dotkernel/queue/actions/workflows/qodana_code_quality.yml) [![PHPStan](https://github.com/dotkernel/queue/actions/workflows/static-analysis.yml/badge.svg?branch=main)](https://github.com/dotkernel/queue/actions/workflows/static-analysis.yml) - ## Installation > Until we have a compiled documentation, read the files from /doc/book/v1 folder diff --git a/docs/book/v1/commands.md b/docs/book/v1/commands.md index 94b428a..0f6bbf7 100644 --- a/docs/book/v1/commands.md +++ b/docs/book/v1/commands.md @@ -1,4 +1,4 @@ -## Available commands and usage +# Available commands and usage The commands available are: @@ -8,7 +8,7 @@ The commands available are: The commands can be run in two different ways: -### CLI +## CLI To run the commands via CLI, use the following syntax: @@ -18,7 +18,7 @@ To run the commands via CLI, use the following syntax: `php bin/cli.php inventory` -### TCP message +## TCP message To use commands using TCP messages the following messages can be used: diff --git a/docs/book/v1/installation.md b/docs/book/v1/installation.md index f594fb7..c2fc6b3 100644 --- a/docs/book/v1/installation.md +++ b/docs/book/v1/installation.md @@ -1,21 +1,21 @@ -## INSTALLATION +# INSTALLATION -### git clone +## git clone `git clone -b default-queue https://github.com/dotkernel/queue.git` -### Edit .dist files from config/autoload folder +## Edit .dist files from config/autoload folder - local.php.dist - log.local.dist - messenger.local.php.dist - swoole.local.php.dist -## Run Composer +## Run Composer `composer install --no-dev` -### Create services ( daemon) +## Create services ( daemon) - Edit the files from `/daemon` folder and set proper paths - copy them in /etc/systemd/system/ @@ -24,8 +24,7 @@ `sudo cp /home/dotkernel/queue/daemon\messenger.service` - -### Start the daemon +## Start the daemon `sudo systemctl daemon-reload` @@ -35,9 +34,8 @@ `sudo systemctl status swoole.service` - ### Testing the installation -Send a request from your local machine +Send a request from your local machine `echo "Hello" | socat -T1 - TCP:SERVER-IP:8556` diff --git a/docs/book/v1/overview.md b/docs/book/v1/overview.md index f6f4aeb..2819c80 100644 --- a/docs/book/v1/overview.md +++ b/docs/book/v1/overview.md @@ -1,3 +1,5 @@ +# Overview + > [!IMPORTANT] > Dotkernel component used to queue tasks to be processed asynchronously based on [netglue/laminas-messenger](https://github.com/netglue/laminas-messenger) @@ -14,4 +16,4 @@ [![Build Status](https://github.com/mezzio/mezzio-skeleton/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/mezzio/mezzio-skeleton/actions/workflows/continuous-integration.yml) [![codecov](https://codecov.io/gh/dotkernel/queue/graph/badge.svg?token=pexSf4wIhc)](https://codecov.io/gh/dotkernel/queue) [![Qodana](https://github.com/dotkernel/queue/actions/workflows/qodana_code_quality.yml/badge.svg?branch=main)](https://github.com/dotkernel/queue/actions/workflows/qodana_code_quality.yml) -[![PHPStan](https://github.com/dotkernel/queue/actions/workflows/static-analysis.yml/badge.svg?branch=main)](https://github.com/dotkernel/queue/actions/workflows/static-analysis.yml) \ No newline at end of file +[![PHPStan](https://github.com/dotkernel/queue/actions/workflows/static-analysis.yml/badge.svg?branch=main)](https://github.com/dotkernel/queue/actions/workflows/static-analysis.yml) diff --git a/docs/book/v1/server-setup.md b/docs/book/v1/server-setup.md index f1b1f33..89a379f 100644 --- a/docs/book/v1/server-setup.md +++ b/docs/book/v1/server-setup.md @@ -1,13 +1,15 @@ -## Server setup +# Server setup > Below instructions are working only on **AlmaLinux 9** -> +> >For other OS's need to be adapted accordingly ## Starting point -A server with AlmaLinux 9 freshly installed, with root access and updated + +A server with AlmaLinux 9 freshly installed, with root access and updated ### Update OS + dnf update ### Create a new user with sudo permissions @@ -22,7 +24,7 @@ dnf update ### SSH to the server as new user -### Install various utilities +### Install various utilities `sudo dnf install -y dnf-utils` @@ -69,6 +71,7 @@ dnf update `sudo dnf install git` ### Composer + `wget https://getcomposer.org/installer -O composer-installer.php` `sudo chmod 777 /usr/local/bin` @@ -86,7 +89,7 @@ connections from outside only to certain ports, from certain IP's. `sudo systemctl enable firewalld` -> Before starting the firewall, be sure you will not be locked outside +> Before starting the firewall, be sure you will not be locked outside `sudo firewall-offline-cmd --zone=public --add-port=22/tcp --permanent` diff --git a/docs/book/v1/valkey.md b/docs/book/v1/valkey.md index fd93ad8..24bc714 100644 --- a/docs/book/v1/valkey.md +++ b/docs/book/v1/valkey.md @@ -1,4 +1,4 @@ -## Valkey usage +# Valkey usage Valkey is an open source (BSD) high-performance key/value datastore that supports a variety of workloads such as caching, message queues, and can act as a primary database. @@ -6,7 +6,7 @@ The following commands can be run in the CLI to interact with Valkey. To enter C `valkey-cli` -### Utility Commands +## Utility Commands List all keys matching a pattern. @@ -28,7 +28,7 @@ Check data type stored at a specific key (Possible types: string, list, set, zse `TYPE keyName` -### Key-Value Operations +## Key-Value Operations Set a string key to a value. @@ -42,7 +42,7 @@ Delete one or more keys. `DEL keyName1 keyName2` -### Stream Commands +## Stream Commands Read entries from a stream oldest to newest (revers '-' and '+' to reverse order).