LAMPlights Personal anecdotes from my experiences using the LAMP stack

25Jan/120

Using the Gearman Tool For Rapid Development of Clients and Workers

Gearman comes with a few tools that make development and testing easier. The gearman program creates boilerplate clients and workers. The gearman program comes default with the gearmand package. Do not confuse gearman with gearmand. The gearmand daemon is what manages the queue, clients and workers. The gearman program is a tool to quickly create simple clients and workers. The options for gearman can be slightly confusing, so I will go through a set of examples on how to use them.

24Jan/120

Registering Functions With Gearman Workers

The Gearman examples on php.net are a great primer for groking how the Gearman client and worker interact with each other. One gripe I have is that the examples declare global functions for the worker to register. I feel this leads develpers down the wrong path. With PHP5.3, there is an easier solution though: anonymous functions.

23Jan/120

The Painful Gearman Upgrade Path

The Gearman project has been slowly migrating from C to C++. This migration has gone under the radar due to the popularity of Cent OS 5 and given gearmand version of 0.14. This version of gearmand worked with any version of pecl/gearman and there was never any compelling reason to upgrade gearmand. That changed with the release of pecl/gearman 1.0

15Dec/110

SPL FilterIterator in the real world

The Standard PHP Library (SPL) is a powerful set of tools that are often overlooked. It is very common to see an SPL talk at conferences, but those talks usually just introduce each SPL class to the audience without giving some real world examples. I am going to show you a real world example on how to use SPL FilterIterator in an ecommerce website.

9Dec/110

PHP Gearman Bootstrap Script

Writing the scaffolding for gearman workers is a pretty trivial task using the pecl/gearman extension. Keeping that scaffolding consistent between all the gearman workers in your application can get tough. I created a script that will remove the boilerplate gearman code and allow gearman worker scrips to simply be function definitions.

9Dec/110

PEAR channel created

I finally got around to creating my own PEAR channel. I am hosting it on github using Pirum to manage the channel. The channel is located at http://hradtke.github.com/pear/. So far I have a single package in then channel: gearboot. I will be writing more about gearboot shortly.

Tagged as: , , No Comments
2Dec/111

ORM frameworks are black magic

I read a really good post from Vic on his move away from ORM frameworks. I did not agree with everything he said though and wanted to start a discussion. Unfortunately, there is no way to leave comments on his blog. The next best thing is to post it here.

Tagged as: , , , , Continue reading
30Nov/110

Code Freeze Fun at HauteLook

I wrote a blog post listing some of the things I have been doing during code freeze at HauteLook. HauteLook is hiring developers for PHP, JavaScript and iOS positions. If you live in the Los Angeles area and are interested check out the careers page.

Filed under: Uncategorized No Comments
22Nov/110

Testing PHP 5.4RC1

I wrote a quick blog post on HauteLook's Tech blog about testing PHP5.4 RC1 for HauteLook's ecommerce web application.

Filed under: Uncategorized No Comments
20Nov/111

ElePHPants for sale!

I recently ordered some elePHPants and have some left over for sale. I added a Paypal button to the right menu of my blog for anyone interested in purchasing them. I only have the small size up for sale. If you are interested in the large size contact me and we can discuss it.

A picture of four PHP elephants

Tagged as: 1 Comment