22. June 2008, 21:03, by Silvan Mühlemann
If you want to store large amount of volatile data (e.g. log file entries) in a database with a constant storage memory footprint and no maintenance to purge the old entries, a round robin database is the best solution. But how to implement it in MySQL?
Some of the heaviest tables in our database are tables which do some event logging. Let’s look at a table which log the most recent visitors on a member profile. Look at that ugly output:
mysql> SHOW TABLE STATUS like "profile_visits_log" \G;
*************************** 1. row **********************
It grows and grows… And the queries get slower and slower.
This is the case because we are keeping a lot of old, unused data. For example, on my member profile there’s data back to September 2007:
So we have to get rid of that old data. For example we can do it like Xing and store the n most recent entries for each user. Drop the rest:
Now, how do we do that in the most elegant way?
10. June 2008, 15:48, by Leo Büttiker
At 24./25. of September 2008 there will be the OpenExpo in Winterthur. I will be in charge of the PHP booth. I am looking for PHP-Developers, -Evangelists and -Fanboys (and girls) to help me out.
It’s a great opportunity to help spread PHP, meet open source guys or just hang out with other cool PHP guys. Already on the boat are Harry Fuecks (webtuesday organizer, local-hero and PHP-Book-Author), Lukas Smith (PHP Core Dev and Database Expert), Chregu Stocker (PHP Core Dev, liip CEO and Founder), Silvan Mühlemann (PHP-Evangelist, tilllate CTO and Founder) and, well, me.
1. June 2008, 21:15, by Silvan Mühlemann
“unit testing is a test that validates that individual units of source code are working properly”, that’s what Wikipedia says about unit testing. That’s general knowledge.
But what motivates me even more than the increased software quality is that it saves me development time. This sounds odd as you might believe that TDD means writing more code.
Here’s a real-life example: