Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Shadowfax Laravel Package

huang-yi/shadowfax

Shadowfax is a Laravel package for sending HTTP requests concurrently, making it easy to run multiple requests in parallel and handle responses efficiently. Built on Guzzle, it offers a simple API to reduce wait times when your app depends on several external services.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Shadowfax inverts Laravel's request lifecycle: instead of bootstrapping the framework on every request under PHP-FPM, it boots the application once inside a Swoole worker and handles each request in a coroutine that receives a sandboxed copy of the container. That is the same fundamental model as Laravel Octane's Swoole worker. The fit question for a TPM is therefore not "does it work" but "does our application tolerate long-lived processes and concurrent coroutines?" Stateless JSON/API services fit well. Applications dependent on per-request globals, request-scoped singletons, or non-coroutine-safe extensions fit poorly, and the burden of proving safety falls on our dependency audit, not on the package.

Integration feasibility. Installation is cheap (Composer package, service provider, published config, an artisan server command). Validation is expensive. The real integration cost is auditing every third-party package for coroutine safety and demonstrating that no state leaks between concurrent requests — an effort that frequently exceeds the performance upside.

Technical risk.

  • Staleness: last tagged release is January 2022. Laravel has shipped multiple majors since; there is no published compatibility matrix, so version support is effectively unverified.
  • Superseded: Laravel Octane is first-party, covers the same Swoole backend (plus RoadRunner/FrankenPHP), and tracks Laravel releases. Adopting Shadowfax now means adopting a competing, unmaintained implementation of an already-solved problem.
  • Coroutine safety: cross-request state bleed is both a correctness defect and a data-exposure security risk.
  • Extension dependency: Swoole is a PECL extension requiring build tooling; some managed hosts/PaaS disallow it.
  • Observability: coroutine stacks complicate APM, tracing, and Xdebug-based debugging.

Key questions. What Laravel/PHP/Swoole versions are supported today, beyond the 2022 release notes? Is the repository still accepting fixes, or is it de facto archived? Which of our dependencies hold static or global state? What is our rollback path if a coroutine bug corrupts responses? And critically — is Octane acceptable as an alternative, and if not, what concrete requirement rules it out?

Integration Approach

Stack fit. Viable where the workload is predominantly stateless HTTP and the team already runs Swoole or is comfortable compiling and operating PHP extensions. Poor fit for apps with heavy session/file-upload handling, legacy libraries, or a long tail of unmaintained packages that cannot be certified coroutine-safe.

Migration path. Treat Shadowfax as a parallel runtime, never a big-bang cutover. Run the identical application under PHP-FPM and under Shadowfax behind the same load balancer, canary a small traffic slice, and compare p50/p99 latency, error rate, and per-worker memory against a fixed baseline. Keep FPM hot as the fallback so rollback is a routing change, not a redeploy.

Compatibility. Pin an explicit PHP × Swoole × Laravel matrix and run the full dependency suite in CI under the Swoole runtime, not only under FPM. Verify that CLI paths — queue workers, scheduler, migrations — are untouched (they run outside the server and normally are, but confirm). Validate that session/cache drivers and database connections are coroutine-safe; shared PDO usage is a known footgun.

Sequencing.

  1. Spike: install, boot, smoke-test on our Laravel version; record what breaks.
  2. Dependency audit for coroutine safety, prioritized by hot-path impact.
  3. Benchmark against both FPM and Octane with realistic traffic and a memory soak test.
  4. Staging canary with load test plus a multi-hour leak soak.
  5. Production canary at a small percentage with Swoole-specific dashboards.
  6. Go/no-go decision. If Octane is within a few percent on throughput, prefer Octane on maintenance and support grounds.

Operational Impact

Maintenance. The package is effectively unmaintained: one 2022 release, low activity, single maintainer. Every Laravel major upgrade becomes a gamble, and there is a realistic possibility we end up owning a fork. Octane, by contrast, is maintained in lockstep with the framework. Budget for fork ownership before committing.

Support. No vendor SLA, no paid tier, no corporate backing. Escalation is a GitHub issue on a low-activity repository. Internal expertise must be built and retained, which is a staffing risk as much as a technical one.

Scaling. Per-worker throughput improves because bootstrap cost is paid once, so fewer workers are needed for the same RPS. This does not remove the need for horizontal scaling, connection-pool sizing, or worker-count tuning. Worker recycling (max_request) must be configured deliberately to bound memory growth, and coroutine concurrency limits must be set against upstream capacity.

Failure modes. Gradual OOM from leaks in long-lived workers; cross-request state leakage (worst case, one user seeing another's data); a single blocking call stalling every coroutine in a worker; an unhandled exception terminating a worker; a Swoole extension upgrade silently breaking the app; and operators debugging with FPM assumptions because the documentation is stale.

Ramp-up. The team needs Swoole and coroutine mental models, which differ materially from FPM: request isolation is no longer free, and reload/restart semantics change. Runbooks, health checks, and alerting must be rewritten. Plan for a multi-week learning curve before on-call is genuinely comfortable, and instrument Swoole-specific metrics (coroutine count, worker memory, reload events) from day one.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route