Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Introducing Version 2.0 Beta

shaneharter edited this page Jun 14, 2012 · 3 revisions

Introducing Version 2.0 Beta

This was copied from the front page so we can have a place to keep beta users informed as we finish development and testing and prepare for the v2.0 release

Version 2.0 Released [5/25/2012]

  • All Version 2.0 Features Are Released.
  • All outstanding issues have been closed.

Version 2.0 Update [5/10/2012]

  • Pushes are slightly less frequent now as remaining bugs and issues are more complex.
  • A USABLE version has been pushed today. You should be able to use this to develop daemons with little to no issues. Future pushes will retain stability.
  • At this moment there are no known, unfixed bugs. Testing is continuous though and I'm sure that will change.

Version 2.0 Update [5/3/2012]

  • Improvements and bug fixes are being pushed to the named-workers 2.0 branch nearly every day.
  • While the library is not yet production quality we're putting a lot of time into this and it should be tagged and released in the coming days.
  • We continue to request testing and patch submission and appreciate the users that have helped us with that this past month.
  • We've spent a lot of time creating useful documentation in the Wiki and of course any contributions there are also appreciated.
  • A rough idea of the work that needs to be done before the library is put thru testing cycles and released:
    • Continue honing the shutdown procedure to make restarts quick and not leave zombie worker processes behind.
    • Improve fault tolerance of shared-memory failures, and overall stability.
    • Integrate the debugging tools that we're using to develop the library into the product so they can be used by developers to ease development and debugging of their daemons and workers.
    • Continue testing cross-platform and cross-distribution. A contributor has tested it on OSX and we've merged his pull requests. If anybody is up to testing it on BSD that would be fantastic.
  • In addition to the features listed in our original announcement, we've invested a lot of time building tools to debug the mutli-process, long-running applications people build with PHP Simple Daemon.
    • An integrated debug console that allows you to programmatically set break-points and step through your daemon as work flows to and from the daemon and its worker processes.
    • A signal console to compliment the debug console by making it easy to send signals to your daemon and its worker processes.
    • Scripts to view and clean shared resources (Message Queues, Shared Memory and Semaphores).
    • You can learn more about putting these tools together in the Debugging guide in the wiki (which is still a work in progress itself)

Version 2.0 Announcement [4/10/2012]

  • A Beta version 2.0 is now available: Checkout the named-workers branch and start submitting Issues and Pull Requests!
  • The primary feature of this release is persistant, interactive, asynchronous background workers
    • Create classes or functions that automatically detach themselves from your Daemon and run in their own background process.
    • Easily pass arguments to these functions/methods, and return work back to the daemon process.
    • Create common async patterns by implementing onReturn and onTimeout callbacks so you know when work was done (or not).
    • Create worker pools: Run 5 simultaneous worker objects as easily as $this->myWorker->workers(5). Work will be assigned to idle workers automatically.
    • If all workers are busy, calls are buffered and are handed-out to workers as they become available.
    • Set timeouts on workers as easily as $this->myWorker->timeout(30); // 30 Seconds.
    • For a very brief example, try out the /App/ExampleWorkers.php daemon in the named-workers checkout.
    • Note: The latest builds include a bug that leaves the daemon and child processes hanging on shutdown and it requires a kill -9 [pid]. I hope to have this fixed in the next day or so.
    • Note: This will be explained better in the Wiki, but when workers are busy, calls are buffered not queued. If the daemon is killed, buffered calls may be lost. There is no processing guarantee. For that, there are fantastic message queues that work really well with PHP Simple Daemon workers.
  • The version also includes dozens of enhancements to existing daemon features, such as:
    • The Locking mechanism is now optional and is implemented entirely using the Plugin architecture
    • You can easily choose to use the classic, clock-based event loop (eg 'run this every 1.5 seconds') or a lighter-weight event loop that iterates immediately.
    • You can attach to Daemon state events using the familiar on(SOME_EVENT, $callback) syntax.
    • Use the Event system to capture and handle custom Signals in your code.
    • Self-adjusting process priority to be more reliable when used with short loop_intevals (1 second and below)
    • Automatically generate and install init.d scripts to easily install your daemon
    • Track and report runtime stats, such as mean interval duration.
    • Documentation improvements on the Wiki.
  • This is certainly BETA quality software. I hope to have a thoroughly-tested, production-ready version by May 1st.