ODY v0.2.0 'Circe' Arrives - Transforming Performance and Stability

ODY v0.2.0 'Circe' Arrives - Transforming Performance and Stability

April 6, 2025·
Ilyas Deckers

We are thrilled to announce the arrival of ODY v0.2.0, codenamed “Circe”!

Continuing our framework’s journey, this release marks a significant milestone. Just as Circe possessed transformative powers, this version brings substantial changes aimed squarely at enhancing the performance and stability of your ODY applications, particularly under high-load conditions.

ODY “Circe” is packed with architectural refinements, new features, and critical fixes designed to make the framework faster, more robust, and easier to work with in demanding environments.

What’s New in Circe (v0.2.0)?

This release focuses heavily on improving how ODY handles concurrency, manages resources, and integrates with modern PHP practices, especially within Swoole environments.

Key Additions:

  • Async CQRS Implementation: Laying the foundation for more scalable application architectures, we’ve introduced an asynchronous Command Query Responsibility Segregation (CQRS) implementation (ody/cqrs:^0.2.0).
  • RabbitMQ Module: Easily integrate powerful message queuing capabilities into your applications with the new dedicated AMQP module (ody/amqp:^0.2.0).
  • Monolog for Logging: The logging component has been refactored to utilize the industry-standard Monolog library, offering greater flexibility and features for your logging needs (ody/logger:^0.2.0).
  • Updated Documentation: Comprehensive documentation updates are included to reflect all the new features and changes in v0.2.0.

Major Changes & Refinements:

  • Full Swoole Hook Compatibility (SWOOLE_HOOK_ALL): Deep modifications have been made to ensure ODY can safely and effectively leverage SWOOLE_HOOK_ALL, unlocking significant potential for I/O-bound performance improvements.
  • Reworked Application Bootstrap: The application bootstrapping process is now smarter, especially for multi-worker setups (ody/foundation:^0.2.0, ody/server:^0.2.0). Each worker initializes its own application instance, preventing service registration conflicts and eliminating previous checks, while still allowing bootstrapping outside console environments.
  • Non-Static HTTP Controller Pool: The ControllerPool is no longer static. It’s now a standard singleton service managed via dependency injection (ody/foundation:^0.2.0), improving testability and adhering to better OOP practices.
  • Non-Static and Streamlined Router: Following the same principle, the Router and RouteGroup have been refactored to be non-static (ody/foundation:^0.2.0). The router now focuses purely on matching routes to handler identifiers, delegating controller instantiation entirely to the ControllerDispatcher/ControllerResolver. This results in a cleaner, more decoupled routing system.
  • Improved Pool Item Handling: To prevent potential deadlocks under load, the initial creation of items in pools (when empty but under capacity) is now synchronous during the borrow process (ody/connection-pool:^0.2.0).

Important Fixes:

  • Critical Worker Restart Bug: Resolved a critical issue where static::$app could become null after a Swoole worker crash or restart, significantly improving stability.
  • Multi-Worker Race Condition: Fixed a race condition that could occur in multi-worker Swoole environments where borrowing from an empty pool channel could time out unnecessarily.
  • General Stability: Addressed several other bugs, improved error handling across the board, and implemented various performance tweaks for a smoother, faster experience.

Embrace the Transformation

The ODY team believes “Circe” offers a substantially more powerful and stable platform for building high-performance PHP applications. The architectural changes, particularly the move away from static components and the refinements for Swoole, provide a stronger foundation for future development.

Ready to explore the enhancements?

  1. Upgrade: Update your project dependencies. This release includes updates to several core packages. Ensure your composer.json reflects at least these versions:

    • ody/amqp:^0.2.0
    • ody/connection-pool:^0.2.0
    • ody/container:^1.0.0
    • ody/cqrs:^0.2.0
    • ody/database:^0.2.0
    • ody/foundation:^0.2.0
    • ody/influxdb:^0.1.0
    • ody/logger:^0.2.0
    • ody/process:^0.1.2
    • ody/server:^0.2.0
    • ody/task:^0.1.2
    • ody/websocket:^0.1.2
  2. Explore: Dive into the Updated Documentation to learn more about the new features and changes.

  3. Feedback: Encounter any issues or have suggestions? Please report them on our Issue Tracker.

We’re incredibly proud of the ODY v0.2.0 “Circe” release and excited for you to experience the improvements. Stay tuned as ODY’s epic journey continues!