tarantool/queue
PHP bindings for Tarantool Queue (LuaRock). Connect to a Tarantool instance and work with tubes: put tasks, consume/reserve/ack/bury/release, inspect stats, and call custom queue methods. Install via Composer; requires a configured running Tarantool server.
tarantool/queue package is designed for asynchronous task processing with distributed job queues, leveraging Tarantool (a high-performance in-memory database) as the backend. It fits well in architectures requiring:
tarantool/tarantool-php) and a running Tarantool instance.serialize() by default (may need customization for complex payloads).| Risk Area | Assessment | Mitigation Strategy |
|---|---|---|
| Tarantool Dependency | Tarantool is niche; operational expertise may be lacking. | Evaluate Tarantool’s operational maturity (HA, backups, monitoring). |
| Performance Overhead | Tarantool setup adds complexity vs. Redis/DB queues. | Benchmark against alternatives (e.g., Redis with predis). |
| Laravel Integration | No out-of-the-box Laravel support; requires custom glue code. | Build a Laravel queue driver wrapper for consistency. |
| Failure Handling | Retry logic is manual; no built-in dead-letter queue (DLQ). | Implement a custom DLQ using Tarantool’s metadata or a separate table. |
| Scaling Workers | Worker scaling requires Tarantool connection pooling. | Use Tarantool’s built-in sharding or client-side connection management. |
predis, laravel-queue-redis) been ruled out?laravel-queue-database) suffice?TarantoolQueue driver.
Illuminate\Contracts\Queue\Queue interface.tarantool/tarantool-php for direct calls.-- Tarantool space for jobs
box.schema.space.create('jobs', {if_not_exists = true})
box.schema.space:format({
{name = 'id', type = 'unsigned'},
{name = 'payload', type = 'string'},
{name = 'attempts', type = 'unsigned'},
{name = 'reserved_at', type = 'unsigned'},
{name = 'available_at', type = 'unsigned'},
})
queue:work or a custom process manager).tarantool/tarantool-php increases deployment size.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Tarantool Node Failure | Jobs may be lost if not replicated. | Enable Tarantool replication and synchronous writes for critical jobs. |
| Network Partition | Workers may fail to fetch jobs. | Implement circuit breakers in workers and exponential backoff. |
| Worker Crash | Unprocessed jobs remain in queue. | Use Laravel’s queue:failed table or a custom DLQ in Tarantool. |
How can I help you explore Laravel packages today?