PHP Interview With Patrick Allaert Creator Of Alternative PHP Monitor aka APM – Come To PHP Conferences

Contents At Glance

Purpose Of This Interview

This is the #20th set of PHP Interview to help aspiring PHP developers and PHP fans alike to get inspired by listening from those PHP guys who are already highly involved into the PHP Ocean and being ‘there’ taming the waves and surfing better than ever to make themselves an Awesome PHP Expert both in their own eyes (for self-accomplishment) and for the PHP Community. On the other side, this is an opportunity for new PHPers to get to know their “PHP Elders. I hope you will derive as much fun to read my interviews as I’m having by interviewing those A-List PHP guys.

A Small Intro..

Patrick Allaert - Lead dev of Alternative PHP Monitor

Patrick Allaert - Lead dev of Alternative PHP Monitor

In this edition I talked with [Patrick Allaert @patrick_allaert], the creator and lead developer of the Alternative PHP Monitor extension. Patrick is also an eZ Publish expert where he is currently a Core developer. He is an  Open Source lover and used to be a prominent Board member at the famous and amazing PHP group named PHPBenelux.

And Now The Interview…

>> Please tell us a bit about yourself

At the age of 7 I started dancing and I wanted to be a professional dancer and/or singer, at 9, I discovered bowling and aikido and wanted to have a career related to sports. Much later, in 1997, I finally discovered PHP and thanks to that, I am now a happy freelancer at the head of Libereco Technologies in Brussels (Belgium) working mostly on Open Source products like the [eZ Publish CMS @ezsystems] or the Alternative PHP Monitor (APM) extension for which I am the lead developer.

>> How you started with PHP

Still fan of music and dancing, I decided in ’97 / ’98 to create a website for lyrics, this is where PHP 3.0 helped me to create a dynamic site where lyrics were stored in database.

>> Your LAMP stack comprises.. ?

Limoncello, Absinthe, Madeira and Pastis. What else? :-)

More seriously:

  • Gentoo
  • Apache / Nginx
  • MySQL / PostgreSQL / MongoDB
  • PHP / Python / C

>> How do you find PHP now as compared to when you first started

A lot of good things happened between PHP 3.0 and 5.4:

  • Faster and even faster, PHP 4 with the introduction of the Zend Engine clearly improved the performance of more complex applications, notably by introducing a parser that produces bytecode to be processed by the Zend Engine. In PHP 5.1, with all the optimization made in the executing/compiling phases. In PHP 5.3, with the introduction of the garbage collector as well as all the performance improvements made to the Zend Engine (special thanks to Dmitry Stogov) and finally in PHP 5.4 with the yet amazing improvements in terms of memory usage and performance of the Zend Engine.
  • Welcome $_GET, $_POST, $_SESSION in PHP 4.1.
  • Welcome native JSON in 5.2.
  • Welcome “goto” in 5.3 :-)
  • Object model improved in PHP 4 and even more in PHP 5, including the support of namespaces in 5.3 and traits in 5.4.
  • Changed silent conversion of array to string to produce a notice in PHP 5.4. Well, that was my contribution to 5.4, I had to place it somewhere in this list ;-)

And so much more!

>> Based on your experience, what are the good and bad parts of PHP

The good thing:

  • PHP community: Did someone already said how great is the PHP community :)
  • PHP license: It’s free like in “free speech”.
  • PHP is simple: things can be done very easily in PHP.
  • PHP consistencies: PHP is quite consistent in regards to what exists in C or other languages, some PHP functions are just a wrapper to the equivalent C function, making it easy for developers not knowing PHP exclusively.

The bad thing:

  • PHP community: Way too big: you just can’t introduce some backward incompatible changes or you will annoy a tons of people.
  • PHP license: It doesn’t enforce the viral spirit of FOSS like GPL does.
  • PHP is simple: non developers can write code that developers will have to maintain.
  • PHP consistencies: mhhh, is it str_repeat() or strrepeat(), str_cmp() or strcmp()? What’s the order again, $needle then $haystack or the opposite?

>> What would be the Top advice to a PHP beginner
>> To someone who wants to become a better PHP developer..?

Come to PHP Conferences, you will learn a lot of interesting things, and don’t forget to talk to people!

You can easily approach all of us even the most famous ones like: [Rasmus Lerdorf @rasmus], [Derick Rethans @derickr], [Cal Evans @CalEvans], [Helgi Þorbjörnsson @h], [Lorna jane Mitchell @lornajane], [Davey Shafik @dshafik] ,… and all the other great speakers out there.

>> The best PHP book you’ve read

I’m not a big fan of book, I mostly have everything I need on http://www.php.net/manual/en/ and http://lxr.php.net/ which is an awesome tool to dig into the source code of PHP.

>> A PHP blog or resource you highly recommend

The blog of [Nikita Popov @nikita_ppv] at http://nikic.github.com/ because it’s interesting and very in-depth content.

>> The IDE that you use

vim and sometimes Netbeans

>> How do you debug your PHP code?

Depending on the case:

  • var_dump()
  • Xdebug + Netbeans

>> A PHP framework you use and would recommend

D’oh! Isn’t PHP already a web framework for the C developer?!

>> A unit test framework you recommend using?

Give a try to Atoum (https://github.com/mageekguy/atoumby [Frédéric Hardy @mageekguy], otherwise PHPUnit does its job as well.

>> A CMS that you think is worthwhile

Well… [eZ Publish @ezcommunity] of course :-)

>> One PHP System/software/library/Project you really appreciate

HipHop 4 PHP to perform static analysis and my APM extension that lets me easily record more info than the usual standard error handler.

>> One function that you like (or which you tend to use frequently)

var_dump(), json_(en|de)code(), filter_(input|var)(_array)?()

>> One PHP person that you admire and what strikes you about him/her

  1. [Rasmus Lerdorf  @rasmus] for having made PHP possible while remaining someone humble, easy to approach and discuss with.
  2. [Derick Rethans @derickr] for having made Xdebug and the same above reasons.

>> Are you part of any PHP User group? Could you tell a bit about it..

Together with [Michelangelo van Dam @DragonBe] and [Felix De Vliegher @felixdv], we created [PHPBelgium @phpbelgium] a while ago before we merged with [phpGG @phpgg] the Dutch user group, to become [PHPBenelux @phpbenelux]. Today I’m not part of this organization anymore because of lack of time but I am still in contact with this great user group!

>> A PHP Usergroup that you appreciate and would highly recommend

[PHP Benelux Usergroup @phpbenelux] is awesome, but most of them are!

>> Which was the worst programming mistake you did?

I picked Microsoft SQL Server for one of my first professional project.

>> If you could change one thing with PHP, that would be…?

  • Everything being case sensitive. This is actually my local patched version of PHP, since it makes me realize directly inconsistencies.
  • Being able to indent code like in Python

>> If you had to go back in time, would you still choose PHP? What would you do different?

Yes, I would :-)

>> How do you time manage all the stuffs that you do, coupled with your personal life?

I’m doing first what’s for previous month before what’s for previous week.

>> The day you realised “You’ve made it to the A-List PHP arena” ?

You are saying so, not me ;-)

>> The best conference you attended would be..

PHPBenelux 2012, it was absolutely AWESOME!!!

>> Can you please share the good, and may be not so good moments, of being part of all the conferences you attended

PHPBenelux 2010, 2 minutes before my “PHP applications/environments monitoring: APM & Pinba” talk: laptop don’t recognize the projector, having to choose plan B :(

>> You are the lead developer of APM – Tell us a bit about it

APM stands for “Alternative PHP Monitor” it is a PECL extension that is almost 3 years old and is aimed at extending the default error reporting handler to provide/store more information than what you have by default while having zero impact on the performance. The kind of additional information stored are: URL, session variables, cookies, stacktrace, IP address, referrer, POST variables, …
It is also capable of storing an event when a page has been generated slowly. APM is made of a driver API that permits the creation of different APM handlers, the existing ones are the MySQL and the SQLite drivers that stores events in those backends. Syslog and journald drivers are also planned as well as other DB backends if requested.

>> How did the idea/urge/motivation to create it arise?

Everything started when using the “Zend Platform” a few years ago at a customer where the performance of the server was extremely bad without it and worse when installing it while we expected a boost because of the bytecode caching mechanism included. While the bytecode caching component speeded up the application in general, activating the monitoring part slowed down things to a critical point. The monitoring part was considered as the key feature
of the Zend Platform to use it as most other aspects of the platform were available with Open Source counterparts: Xdebug for debugging, APC for bytecode caching, reverse proxies for URL caching,… The only feature missing in the Open Source ecosystem was therefor the
monitoring part, this is how a former colleague, Davide Mendolia, and me started developing APM with one objective in mind: collecting more information in case of error events while still having zero impact on performance.

>> Instances where you use it in your day-to-day PHP life

On my development and production boxes. While developing, it’s interesting to see the errors that might be silenced (@ operator) while running testsuites, developing REST or SOAP services or just to have a reference of all errors generated with additional info.

>> What is its current status and any future plans for it?

There’s a stable 1.0.1 version of APM available at http://pecl.php.net/package/APM. The future plans are to develop additional backends like syslog, journald, PostgreSQL, redis maybe,.. but also SNMP traps to be collected by agents or even a configurable bus service that would enable IDEs like Netbeans, PHPStorm, Eclipse,… or even browser plugins to collect the errors captured by APM.
Imagine being in your IDE, testing a page and being directed to a specific file and line combination where a notice/warning/error just happened? :-)

>> Are you the sole programmer on it?

For the moment yes, but I have received some patch recently and APM is open to anyone that want to contribute to it.

>> Any other notable alternative to it?

Brian Shire has created “Xlog” in the past, but not sure it’s still available somewhere. You can also still opt for a commercial Zend product, I haven’t really followed the progression of their products.

>> If anyone wants to learn how to use APM, what resource would you point him to?

I should *really* find the time to create an entry in the PHP manual on php.net. But in the mean time, you might see the README available at: https://github.com/patrickallaert/php-apm

Now Do Your Part!

1) Help diffuse this interview to the PHP ecosystem – Share, tweet and spread the word to your audience ==> That would be a FREE way to thank me ;)

2) Make a comment below using the comment form – I’m sure you can at least say 1 word about this interview

{I’m thankful to your response(s)!}

Comments

  1. ramadan 2013 calendar says:

    Hello, constantly i used to check weblog posts here in
    the early hours in the break of day, since i love to learn more and more.

  2. Thanks for following up :)

Trackbacks

  1. [...] Patrick Allaert PHP Interview – Come To PHP ConferencesBy Khayrattee WasseemIn this edition I talked with [Patrick Allaert @patrick_allaert], the creator and lead developer of the Alternative PHP Monitor extension. Patrick is also an eZ Publish expert where he is currently a Third line support engineer prior to being their …7PHP dot COM [...]

Speak Your Mind

*