mleczakm/swoole-bundle-scheduler
Swoole Bundle Scheduler adds an in-process task scheduler to Swoole-powered PHP applications, letting you run recurring jobs inside the event loop without relying on external cron. Define intervals and callbacks to automate routine background work and maintenance tasks.
Assessment basis and confidence: This is a baseline assessment — no prior evaluation existed, and the v0.2.0 release notes contain only an auto-generated changelog link (compare/v0.1.1...v0.2.0) with no enumerated features, fixes, or breaking-change callouts. Confidence is therefore low; the version bump from 0.1.1 to 0.2.0 is a pre-1.0 minor bump, which by semver convention permits breaking changes, and nothing in the supplied data contradicts that. Treat the release as potentially breaking until the diff is reviewed.
Architecture fit: swoole-bundle-scheduler is a Swoole-based periodic task scheduler. Swoole is a PECL C extension that replaces PHP's process model with a persistent event loop and coroutines. This is a fundamentally different execution model from Laravel's request-per-process lifecycle: the framework container, facades, and singletons are booted once and survive across scheduled invocations. Fitting it into a Laravel application is a hosting-model change, not a library addition. It competes with, rather than composes with, schedule:run under cron and with Horizon/queue workers.
Integration feasibility: Technically feasible but gated on infrastructure. Requires the Swoole extension compiled into every environment (dev, CI, staging, prod), which typically means custom base images and a divergence from standard php-fpm deployment targets. The package name and its ecosystem suggest a Symfony-lineage bundle; the Laravel bridge (service provider, config publishing, artisan integration) should be assumed unproven and verified before planning.
Technical risk — high:
Key questions to resolve before commitment:
withoutOverlapping equivalent), timeouts, and retry semantics?Stack fit: Best suited to teams already running Swoole (Octane, Hyperf, or similar) where the extension and long-lived-worker discipline are established. For a conventional php-fpm + cron Laravel estate, the fit is poor and the cost is concentrated in platform work rather than application code. The package earns its place only when sub-minute scheduling granularity, in-process concurrency, or high-frequency job dispatch genuinely exceed what cron + queues deliver.
Migration path: Do not migrate the existing scheduler. Run the Swoole scheduler in parallel on a single low-risk, idempotent, high-frequency job (cache warm, heartbeat, metrics flush) and compare tick accuracy and failure behaviour against the cron equivalent for a defined observation window. Only after parity should progressively riskier jobs move across. Keep schedule:run live as the fallback path for the entire pilot so rollback is a config change, not a redeploy.
Compatibility: Three independent version axes must be pinned and verified together — PHP, Laravel, and the Swoole extension. Pin the package to an exact tag (not ^0.2) and lock the extension version in the image build. Because v0.2.0 is a pre-1.0 minor release with no published changelog detail, budget a spike to diff v0.1.1 against v0.2.0 and confirm no config or API drift before adopting.
Sequencing:
Maintenance: Pre-1.0 dependencies impose a continuous upgrade tax — every minor bump may break config or API, and there is no LTS branch to hide behind. The Swoole extension itself is a second, independently moving dependency tied to PHP major versions. Estimate a recurring, non-trivial slice of platform engineering capacity, not a one-off integration cost.
Support: Single-maintainer risk is the dominant operational concern. There is no vendor, no SLA, and a thin community. Internal capability to read the package source and patch it must exist before production adoption; if the team cannot fork and maintain it, it should not be on the critical path. The absence of a substantive changelog for v0.2.0 is itself a support signal — release hygiene is a leading indicator of upstream responsiveness.
Scaling: Swoole scales well vertically and gives efficient in-process concurrency, but horizontal scaling introduces coordination problems the package likely does not solve: without a distributed lock, N replicas each run the same schedule N times. Multi-replica deployment therefore requires either single-instance pinning for the scheduler or an external lock (Redis/DB advisory lock). Plan for the lock before the second replica exists.
Failure modes to design against:
Ramp-up: Steep and uneven. Application developers need little new knowledge to write a scheduled task, but the operational behaviours they must respect — no blocking calls, no reliance on per-request container state, idempotency under possible duplicate execution — are easy to violate and fail intermittently. Budget a written internal standard, a lint/review checklist, a working local Docker setup, and a runbook covering restart policy, lock behaviour, and missed-tick recovery. Realistic estimate: two to four weeks of platform engineering to reach a defensible pilot, plus ongoing ownership.
TPM recommendation: Hold. Do not base a decision on the v0.2.0 notes as published — they carry no actionable content. Commission a timeboxed spike (1–2 weeks) that produces the v0.1.1→v0.2.0 diff, the supported-version matrix, and 72-hour pilot telemetry on one low-risk job. Reassess at that gate. If the team is not already operating Swoole, the default answer should remain the native Laravel scheduler and queue stack.
How can I help you explore Laravel packages today?