Skip to content

Releases: EdmondDantes/amphp-pool

v1.0.2

19 Nov 09:22
Compare
Choose a tag to compare

[1.0.2] - 2024-11-19 [Release]

Changed

  • Now, WorkerLogHandler adds additional metadata about the Worker to the log: workerId, workerPid,
    worker type information, and additional WorkerGroup details.

Full Changelog: v1.0.1...v1.0.2

v1.0.1

13 Oct 08:52
Compare
Choose a tag to compare

Added WorkerPoolInterface::setPoolContext() + WorkerInterface::getPoolContext() methods.
Each Worker can receive a shared application context during startup,
which is set using the setPoolContext() method before calling the WorkerPoolInterface::start() method.

Full Changelog: v1.0.0...v1.0.1

AMPHP POOL v1.0.0

13 Jul 08:57
Compare
Choose a tag to compare

Here is the release of the AMPHP POOL library, designed for creating server applications with an infrastructure built entirely in PHP without additional dependencies.

Why is this needed?

  • You want to use only pure PHP without additional extensions.
  • You want to control how your Workers operate,
    and you want to be able to program their behavior to ensure a better balance of performance and stability.

Features

  • Workers for handling connections and background tasks (jobs), which are restarted and scaled on demand.
  • Support for different types and groups of Workers with varying behaviors.
  • Strategies for restarting, scaling, and pickuping Workers for load distribution.
  • Execution of Jobs based on priority and weight (weight being an estimate of resource consumption).
  • Coroutine Scheduler for distributing a load among long-running background jobs.
  • Support for telemetry and statistics with Prometheus + Grafana.
  • Support for Windows.

AMPPHP Pool 0.9.5 RC

11 Jul 07:31
Compare
Choose a tag to compare
AMPPHP Pool 0.9.5 RC Pre-release
Pre-release

Release candidate with all core features and functions implemented.

Changelog

Fixed

  • Fixed socket waiting when the server is about to shut down.
    The issue remains for UNIX and is caused by the architecture of the AMPHP httpserver.
  • Fixed the synchronization of WorkerState for the isReady status and fields related to the worker's termination state.
  • Fixed the bug with Server Socket hanging under Windows.

Added

  • Added a component for monitoring the summary application state: start time, number of restarts, uptime.
  • Added a new strategy AutoRestartByQuota,
    which allows you to restart the worker after a certain number of processed jobs or memory quota, etc.

Changed

  • Refined the FLOW of error analysis for the running Worker process.
  • Refactored the WorkerProcessContext flow. Coroutines for monitoring the process and the message queue
    are separated by their own triggers, which ensure a clear order of execution.
    The message loop coroutine finishes first, followed by the observer coroutine.
  • Added a method Worker::awaitShutdown, which ensures the orderly shutdown of the worker.
    Now the worker sends a NULL message, signaling the closure of the channel,
    and then waits for confirmation from the parent process. Only after this does it terminate.
  • Added a new method WorkerPool::restartWorker, which allows you to restart the worker softly without stopping the entire pool.
  • Improved error handling from workers. Remote exceptions are properly accounted for and available for logging.

Preview version

02 Jul 07:43
Compare
Choose a tag to compare
Preview version Pre-release
Pre-release

Preview version with raw futures