Roadmap
TrueAsync 开发计划
TrueAsync Core
语言扩展:协程、异步 I/O、结构化并发、线程。
v0.1 — 基础
- Coroutines & Scheduler
- Event loop (libuv)
- spawn() / delay() / timeout()
v0.6 — 完整的 Async API
- TaskGroup & TaskSet
- Channels (buffered/unbuffered)
- Future / FutureState
- Pool with CircuitBreaker
- Async File & Pipe I/O
- TCP / UDP sockets
- PDO connection pooling
- FileSystemWatcher
- CURL async
- Deadlock diagnostics
v0.7 — 线程与稳定化
- spawn_thread() — cross-platform OS threads
- Thread lifecycle (request startup/shutdown, TSRM)
- Closure deep copy (op_array transfer via pemalloc)
- Zval transfer between threads (scalars, strings, arrays)
- RemoteException / ThreadTransferException
- Bailout recovery (fatal errors in child threads)
- Object transfer (declared properties)
- Captured variables (use) in closures
- ThreadPool with worker reuse
- ThreadPool: bootloader + coroutine-mode + auto workers
- ThreadChannel (cross-thread data exchange)
- Thread cancellation (ThreadPool::cancel in coroutine-mode)
- Future-style exception semantics for await(coroutine) (#139)
- Test suite & stabilization
v0.8 — 稳定性与正确性
- Context API: strict get() / getLocal() semantics
- Reactor timer correctness under CPU-bound coroutines
- Channel: safe close semantics for foreach()
- iterate(): correct concurrency accounting
- Thread transfer: closure-cycle safety
- Laravel adapter (laravel-spawn)
v0.9 — 框架适配器
- Framework integration layer
- Symfony adapter
- Migration guides
v1.0 — 稳定版
Target: PHP 8.6- Stable API
- Production ready
- PHP RFC submission
TrueAsync Server
PHP 进程内部的原生 HTTP/1.1/2/3 服务器。
v0.6 — Native HTTP/1.1/2/3
- HTTP/1.1 (llhttp 9.3.0, keep-alive, pipelining)
- HTTP/2 (nghttp2, multiplexing, server push, rapid-reset mitigation)
- HTTP/3 / QUIC (ngtcp2 + nghttp3, OpenSSL 3.5 QUIC API)
- TLS 1.2 / 1.3 (OpenSSL 3.x, ALPN, hardened defaults)
- Multi-protocol on a single port (ALPN / Upgrade)
- Compression: gzip / brotli / zstd (H1/H2/H3)
- Streaming request body (readBody)
- Streaming response (send / sendable / trailers)
- StaticHandler + precompressed sidecars + sendFile
- CoDel backpressure + graceful drain
- Multi-worker pool (setWorkers + bootloader + SO_REUSEPORT)
- Per-request scope + request_context()
- Bailout firewall (fatal does not crash server)
- W3C Trace Context
v0.8 — Server-Sent Events
- sseStart() / sseEvent() / sseComment() / sseRetry()
- Same handler works over HTTP/1.1, HTTP/2 and HTTP/3
- WHATWG-compliant event-stream framing
v0.9 — WebSocket
- RFC 6455 upgrade from HTTP/1.1 and HTTP/2 (RFC 8441)
- wss:// and permessage-deflate (RFC 7692)
- Full-duplex send/recv, backpressure, keepalive ping/pong
- Subprotocol negotiation (WebSocketUpgrade)
- Autobahn|Testsuite conformance: 246/246
v0.11 — WebSocket 主题与可观测性
- Cross-worker WebSocket topics (MQTT-style pub/sub)
- Cross-thread HttpServer::stop() in pool mode
- Observability: getStats() + multi-sink structured logging
- Client address API (getRemoteAddress / getRemotePort)
vNext — 同一监听器上的协议
- gRPC (over HTTP/2)