Build a High‑Performance Queue System with Webman and GatewayWorker
This guide explains how to create a scalable PHP queue and ticket‑calling system using the high‑performance Webman framework and GatewayWorker, covering the system’s purpose, core components, step‑by‑step installation, configuration, startup commands, and sample log output.
Overview
The project implements a simple queue and ticket‑calling system with ultra‑high performance and scalability, built on the Webman HTTP framework and the GatewayWorker TCP long‑connection framework. Such systems are widely used in banks, hospitals, government service centers, restaurants, airports, and similar venues to improve service efficiency, enhance customer experience, and streamline workflow by automating the queuing process.
Webman is a high‑performance HTTP service framework based on Workerman, intended to replace the traditional php‑fpm architecture. It can be used to develop websites, HTTP APIs, or micro‑services.
GatewayWorker, also built on Workerman, provides a rapid development framework for TCP long‑connection applications such as push‑notification servers, instant messaging back‑ends, game servers, IoT, and smart‑home services.
Installation
1. Clone the repository
git clone https://github.com/zx2020-07/queue.git2. Install dependencies
cd queue
composer install3. Import the SQL file
import sql/queue.sql4. Configure environment variables
cp .env.example .env5. Start Webman
php start.php startAfter starting, open http://localhost:8787 in a browser to access the application.
Sample Log Output
[2024-12-28 18:03:35] default.INFO: 172.18.0.1 GET 127.0.0.1:8204 [360.955ms] [webman/log]
[SQL] [connection:default] select count(*) as aggregate from `queue_numbers` where `status` in (4, 0, 2) and date(`created_at`) = '2024-12-28' [41.53 ms]
[SQL] [connection:default] select * from `windows` where `status` = 1 order by `id` asc [1.4 ms]
... (additional log entries omitted for brevity) ...Preview
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Open Source Tech Hub
Sharing cutting-edge internet technologies and practical AI resources.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
