Search by

pushinbr / pam-octane

DavidWilliamBalbino

The elegant Laravel Octane bridge for the PAM runtime.

Package info

github.com/push-in/pam-octane

Issues

pkg:composer/pushinbr/pam-octane

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

v1.1.0 2026-08-22 00:44 UTC

This package is auto-updated.

Last update: 2026-11-09 16:13:52 UTC


README

pam-octane: Laravel Octane lifecycle on PAM's native transport, powered by Rust and Tokio.

Laravel Octane lifecycle, powered by Rust and Tokio.
Connect PAM's native HTTP transport to Octane while Octane keeps ownership of Laravel isolation and worker lifecycle.

Packagist PHP 8.5 License

Install · Commands · How it works · Compatibility · Docs · Issues

Install

In a Laravel application on PAM:

pam init my-app --template laravel
cd my-app
pam composer require laravel/octane pushinbr/pam-octane
pam octane:start

The defaults are production-safe and require no configuration. PAM Octane requires the PAM runtime: running php artisan pam:octane reports a clear error because ordinary PHP CLI does not contain PAM's native server; use pam artisan or pam octane:start.

Commands

pam octane:start     # start Laravel Octane on the PAM supervisor
pam octane:status    # inspect the PAM Octane application
pam octane:reload    # reload without downtime
pam octane:stop      # stop the application

octane:start runs pam up artisan --name pam-octane ... -- pam:octane; arguments before -- go to the supervisor, arguments after it to the server.

How it works

PAM Octane connects PAM's native HTTP transport directly to Laravel Octane's worker. Octane continues to own application isolation, lifecycle events and request cleanup; PAM owns PHP Embed, networking, streaming, supervision and Tokio-powered infrastructure.

HTTP → PAM / Tokio → PamClient → Octane Worker → Laravel
HTTP ← PAM / Tokio ← PamClient ← Octane Worker ← Laravel

PAM already embeds PHP and provides a persistent native HTTP runtime. This package deliberately does not duplicate Octane's Laravel lifecycle. It adapts PAM's request and response objects to Octane's public Client contract and then uses the real Laravel\Octane\Worker. That gives an application:

  • one warm Laravel application per worker;
  • Octane's request sandbox and lifecycle events;
  • PAM's bounded streaming and client backpressure;
  • correct cookies, uploads, HEAD, streamed and binary responses;
  • one safe Laravel execution slot per worker;
  • normal Laravel package discovery and configuration.
Role Octane server adapter
Boundary Octane remains the lifecycle authority; this is not a Laravel fork

Configure

To customize limits, publish the small configuration file:

pam artisan vendor:publish --tag=pam-octane-config

Environment variables include:

PAM_HOST=127.0.0.1
PAM_PORT=8000
PAM_REQUEST_TIMEOUT_MS=30000
PAM_MAX_BODY_BYTES=2097152
PAM_MAX_RESPONSE_BYTES=268435456

maxConcurrentRequests is intentionally fixed to 1 for Laravel. Framework managers and facades contain process-global mutable state. Scale safely with multiple supervised PAM workers instead of overriding that boundary.

Supervised clusters, route-aware worker pools, systemd, troubleshooting and the quality suite are in Production.

Compatibility

PHP Laravel Octane
8.5 (default) 12.x 2.19+
8.5 (default) 13.x 2.19+
8.4 (supported) 12.x 2.19+
8.4 (supported) 13.x 2.19+

Runtime capabilities

  • generational reload, status, stop and control-plane health;
  • route-aware worker pools with crash and memory isolation;
  • cooperative Fiber scheduling and HTTP/Redis clients;
  • isolated bounded PDO and process pools for blocking work;
  • production response cache with tags, authenticated invalidation, collapse and stale-while-revalidate;
  • bounded route metrics plus Pulse, Telescope and OpenTelemetry integration.

Support and repository model

Usage questions belong in PAM GitHub Discussions. Reproducible defects use the main PAM issue tracker, and vulnerabilities must use private GitHub Security Advisories as described in SECURITY.md.

PAM Octane is developed in packages/octane alongside the runtime so transport and lifecycle changes can be tested atomically. It remains an independent, optional Composer package: applications that do not use Laravel or Octane do not install it.

Docs

Part of the PAM ecosystem

PAM

PAM runs PHP natively on servers, desktops and phones. This repository is one piece of it.

PAM PAM Desktop PAM Native Ecosystem
the runtime and CLI native desktop apps in PHP native Android and iOS apps in PHP every official package and plugin

Docs: push-in.github.io/pam-docs · Issues

Apache License 2.0 · Made in Brazil by Pushin