News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Mike Willbanks' Blog:
Integrating Gearman Into Zend Framework
October 18, 2010 @ 10:28:24

In this new post to his blog Mike Willbanks shows you how you can integrate the Gearman tool (for automating multiple workers to do jobs behind the scenes) into a Zend Framework application, creating a full setup and a sample job.

This article will go into incorporating Gearman workers into Zend Framework (rather a lightweight approach that can and likely should be scaled out) as you work with "Workers". I have implemented these much to be like "Controllers" in the current MVC model, however, they do lack quite a bit of functionality at this point in the process. Basically, they do not support any plugins or action helpers. However, if you are looking for some form of consistency in your Gearman workers, this is a fairly unique approach of getting them incorporated into your application.

He starts with an overview of how things will work - some of the abilities he was looking for in the interface and his solution for having a "supervisor" of the processes in case they might need to be killed off. He includes the code for the different parts of the technique:

  • The Worker script itself that checks for Gearman support and creates some basic settings
  • A Dispatcher that creates a Gearman worker and executes it
  • and a Bootstrap that brings them all together.

He also includes a sample worker script that just executes and echos out a message talking about its current workload.

1 comment voice your opinion now!
gearman zendframework integrate tutorial


blog comments powered by Disqus

Similar Posts

The Bakery: New Updates - Helpers, Tutorial and Articles

Zend Developer Zone: Build an Enterprise-Grade PHP Stack with Zend Server 5.0 and Oracle 11g

Inside Open Source: Zend Framework Cache Improvement

Padraic Brady's Blog: Zend Framework Book: Surviving The Deep End - Chapter 10 Released!

SmartyCode.com: Enable your Zend Framework App with Conditional GET! (Make it green)


Community Events





Don't see your event here?
Let us know!


language podcast code application series introduction project interview laravel release library wordpress bugfix developer list community framework configure threedevsandamaybe api

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework