spiral/framework
Spiral Framework is a high-performance, long-running full-stack PHP framework built for RoadRunner. PSR-compliant components, resident memory kernel, and native support for queues, GRPC, WebSockets, and background workers.
High-Performance Microservices & APIs: Leverage Spiral’s RoadRunner integration and resident memory kernel to build ultra-low-latency microservices (e.g., real-time analytics, IoT pipelines, or high-frequency trading systems). The GRPC/HTTP2 support enables seamless inter-service communication, reducing coupling vs. REST.
Event-Driven & CQRS Architectures: Adopt Spiral’s Pub/Sub, Queue supervision, and Temporal workflows to replace legacy event buses (e.g., RabbitMQ + custom workers). Ideal for order processing, notifications, or saga patterns where reliability and retries are critical.
Replace Laravel/Symfony for High-Scale Apps: If your roadmap includes PCI-compliant systems (e.g., payments, healthcare) or CLI-heavy workflows (e.g., batch processing), Spiral’s anti-memory-leak tools and native queue workers outperform traditional PHP frameworks. Benchmark against TechEmpower to justify the switch.
Internal Developer Platform (IDP) for PHP: Use Spiral’s scaffolding and prototype injector to accelerate team onboarding. Generate boilerplate (controllers, jobs, bootloaders) via CLI, reducing dev time by 30–50% for repetitive tasks (e.g., CRUD APIs, background jobs).
Hybrid PHP/Go Workloads: For mixed-language stacks, Spiral’s Go-compatible components (via RoadRunner) let you offload CPU-heavy tasks (e.g., image processing, ML inference) to Go while keeping business logic in PHP. Reduces cloud costs vs. monolithic Go/Python.
Avoid if:
Consider if:
"Spiral Framework lets us build PHP systems that rival Go/Java in performance—without rewriting our stack. For example:
"Spiral gives us:
spiral scaffold. Example:
spiral scaffold:controller User --namespace=App\\Api\\V1 --methods=index,store
"Key differentiators vs. Laravel/Symfony:
| Feature | Spiral | Laravel/Symfony |
|---|---|---|
| Memory Efficiency | Resident kernel (no leaks) | Per-request processes |
| Async Scale | Native queue workers + retries | Queue workers + Supervisor |
| Protocol Support | GRPC, WebSockets, HTTP/2 | HTTP/1.1 + extensions |
| State Management | Isolated IoC scopes | Global container |
| ORM | Cycle (compiled queries) | Eloquent (dynamic SQL) |
| Recommend adopting Spiral for new high-scale services, with a migration path for existing Laravel apps via Spiral’s Laravel Bridge." |
Call to Action: "Let’s prototype a Spiral microservice for [X use case] and compare it to our current stack. I’ll provide a 1-pager with benchmarks and migration steps by [date]."
How can I help you explore Laravel packages today?