Download the PHP package modelslab/modelq without Composer

On this page you can find all versions of the php package modelslab/modelq. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package modelq

ModelQ PHP

A lightweight PHP task queue library, alternative to traditional queue systems, optimized for ML inference workloads.

PHP Version

Features

Use Case: PHP Frontend + Python GPU Worker

ModelQ PHP is designed to work seamlessly with Python ModelQ workers running on GPU servers. This enables you to:

Python Worker (GPU Server)

PHP Frontend (Web Server)

See examples/remote_worker.php for a complete example.

Requirements

Installation

Make sure you have the phpredis extension installed:

Quick Start

1. Create a Worker

2. Enqueue Tasks

Usage

Basic Task Registration

Enqueueing Tasks

Custom Task IDs

By default, ModelQ generates a UUID for each task. You can provide your own task ID to correlate tasks with your database records:

This is useful when you want to:

Streaming Tasks

For tasks that produce incremental output (like ML text generation):

Queue Management

Task History & Monitoring

Track past tasks, view errors, and monitor remote workers:

Worker Info

Get detailed information about registered workers including system resources (CPU, RAM, GPU):

Worker info includes:

Delayed Tasks

Middleware

Create custom middleware for lifecycle hooks:

Custom Redis Client

Error Handling

CLI Commands

ModelQ includes CLI commands for queue management:

The app.php file should return a configured ModelQ instance:

Configuration Options

Task Options

Architecture

Redis Keys

ModelQ uses the following Redis keys:

Key Pattern Type Description
task_queue List Main task queue
task:{id} String Task data
task_result:{id} String Task result
task_stream:{id} Stream Streaming task output
servers Hash Registered worker servers
processing_tasks Set Currently processing tasks
delayed_tasks Sorted Set Delayed tasks (score = execution time)

Testing

Examples

Check the examples/ directory for complete working examples:

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Related Projects


All versions of modelq with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-redis Version *
symfony/console Version ^6.0|^7.0
psr/log Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package modelslab/modelq contains the following files

Loading the files please wait ...