Hacking Dwoo Mon, Aug 4. 2008
What's Dwoo? Dwoo is cool. Dwoo is smarter than Smarty can ever be. It's cleaner and light years ahead. It's even compatible with it (as much as it can be)
The version that was released yesterday also introduced direct support for Zend Framework integration.
I'll try to post some more about it in the future. Stay tuned ;>
Simple and clean nginx.conf Fri, Jul 25. 2008
PostgreSQL 8.4 features Wed, Apr 2. 2008
HTTP server comparison #2 Thu, Mar 13. 2008
As promised (well, I've posted link to the "article" on nginx mailing list, so it was about time..) I'm posting configuration files (.tar.bz2) and script (.sh.txt) that helped me with my benchmarks.
About configuration files: Most of them are basic, out-of-the-box (or debian package) configurations, trimmed down to minimum. I don't say they are fully optimized, and I will appreciate any constructive comment or change suggestion.
About the script: this is my first "bigger" (longer then 10 lines, with functions, conditions and loops, all in one) bash shell script, so be gentle ;>
Some interesting issues were raised on the mailing lists, as:
- serving such a small file I was mostly measuring connection and http protocol overhead -- point taken, I'll try to repeat tests with biger file.
- number of failed requests (if any) -- will add this.
- average time request and time for longest request -- will add this to.
And some additional details about the test:
- Tests were ran on same machine as web servers
- ApacheBenchmark was used
- Before each test all web-servers were shutdown and killed

- VPS software: VMWare Workstation 6.0.1 build-55017
I'll try to make another test by the end of this week.
File include performance in PHP Sat, Feb 23. 2008
I did a little comparison of /(include|require)(_once)?/ methods in PHP 5.2.5 (mostly to prove my coworker wrong).
This are values in microseconds, result is an average of 100 executions of each method
| empty txt file | empty php file* | "real" php file** | |
| include | 19.52 | 25.12 | 1247.75 |
| require | 40.42 | 45.81 | 1162.59 |
| include_once | 34.61 | 31.65 | 42.59 |
| require_once | 11.45 | 36.84 | 13.96 |
* only <?php and ?>
** with class definition and class_exists check
Python tryout Sat, Feb 23. 2008
I've just bought myself a new car-radio (Pioneer DEH-4000UB) with USB key support. And to my great surprise it does not read files from the stick in the sorted (alphabetical) order but "in order as they were written to media". There is a workaround (also noted in the owner's manual), to name the files with 001, 002, 003 prefix. A stupid and time consuming workaround. While looking around if there are any other players with same misfeature, I've noticed that most of them work in the same way (surprisingly, sorting works perfectly when playing music from CD).
... and how does this relate with the post title? Well, I had to write a script that will rename my files so they will comply with Pioneer's "standards". I didn't want to waste my mad PHP skills to do such trivial job, so instead, I've wasted most of Saturday's morning learning Python and produced this script..
HTTP server comparison Thu, Feb 14. 2008
For my speech in Kiberpipa (Cyber-pipe) I've presented five "light-weight" HTTP servers: Boa, Cherokee, Lighttpd, Nginx and Thttpd, Apache (1.3, 2.2) and LiteSpeed: benchmark with keep-alive enabled and with keep-alive disabled.
Tests were made on my desktop PC (Intel Core2 CPU 6700 @ 2.66GHz) inside VMWare environment (memory: 256 MB, Debian Etch) with apache-benchmark tool, fetching 32 B long static text file.
Compared versions (configuration files will follow soon):
| Apache | 1.3.34 |
| Apache 2 (worker) | 2.2.3 |
| Litespeed | 3.3.4 |
| thttpd | 2.23beta1-5 |
| Nginx | 0.5.35 |
| Lighttpd | 1.4.13 |
| Cherokee | 0.5.5 |
| Boa | 0.94.14rc21-0.2 |
Today is a great day Fri, Feb 1. 2008
Sun + MySQL Tue, Jan 29. 2008
... just kidding. I'm really getting sick of blog posts about Sun and MySQL. I't looks like everyone must have an opinion, write some predictions about the outcome for the MySQL community etc.
I just want to point out a great tip for spotting useless indexes in MySQL.
MySQL: Only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT Tue, Jan 1. 2008
I've ran into a really stupid MySQL limitation today:
mysql> create table foo (foo_1 timestamp default now(), foo_2 timestamp default now()); ERROR 1293 (HY000): Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clauseNothing like that mentioned in the docs, but there is a small (deadend) thread in the lists.mysql.com -- nothing much
Meanwhile, on the other side of the town:
postgres=# create table foo (foo_1 timestamp default now(), foo_2 timestamp default now()); CREATE TABLE
3, 2, 1.... Mon, Dec 24. 2007
So, I've finally decided that building my own blog software is a waste of my precious time. Serendipity (I think i still can't pronounce this one just right) suits all my needs. Surprisingly - it works out of the box even on "exotic" software collection I use on my server (nginx, php-fpm, postgresql 8.3 beta 4).
So this here should be a place where i can publish info about my projects, various researches, obstacles I run into... And a good way to improve my language skills (English that is... ;>).
Plans for now: in a few weeks I'm planning to perform a comparison of MySQL SphinxSE and PostgreSQL FTS. I'm also preparing a small speech for Kiberpipa.org -- it's title should remain a secret for now.