In the first post in this series I talked about the design process for my new banner system. I wanted it to be 100% accurate so I eliminated any sort of random number generation process. I also eliminated a SELECT … FOR UPDATE because I was concerned about deadlocks affecting the efficiency of my code. At the end of the post I introduced the MySQL LAST_INSERT_ID() function. Today I will cover it in much more detail.
MySQL offers an interesting function called LAST_INSERT_ID() that – once I figured out the proper syntax – provided exactly what I needed for my accurate and efficient banner system. What does it do? Simply put, it provides a shortcut to return the result of a previous SQL statement without having to worry about intervening updates. Before I explain the function, I want to share a bit of the database design and how the process will eventually work.
Some hosts overload their servers. No, really, it’s true. I know some of you know this, but many people don’t and are quite surprised when they ask me see what I can do to improve the performance of their board. One of the first things I do before taking on a client with this type of request is run a check to see how many other sites are hosted on the same server. If the number is over 100, I don’t bother doing much other than telling the potential client to get a better host. How do you find this out? It’s not hard, really.
In the first three posts of this series I went through the feature list comparing phpBB2 with phpBB3 from the list posted at phpbb.com. I then included notes discussing which new features for phpBB3 I had covered already by adding MODs. At this point the score is 2-1 in my favor, based primarily on my needs and use of the code. This is the fourth post in that series and I will cover the Profiles/Memberlist, Search, and Forums categories.
As a disclaimer: this post is not intended to be a criticism of phpBB3 in any way. It is simply a way for me to formally review the features provided by the latest version as compared to what I am currently using, and help evaluate whether I should prioritize an upgrade or remain happy with what I have.
Filed under: blog — Dave Rathbun @ 9:10 am Comments Off
I had a post scheduled to come out a few days back that was supposed to contain an IRC conversation with DavidMJ, one of the developers for phpBB3. For some reason that post was not the latest revision. I have corrected that now and it contains the full conversation, which is quite enlightening. The full post is out now:
I am a creature of habit. I’ve been using IE6 for many years, and my client (in real life) uses it as their corporate standard. Yes, I know there are security issues that can occur. But with the corporate firewalls and various client workstation “lockdowns” they have in place it’s probably okay. As a result, I had kept IE6 on my laptop and my desktop here at home as well.
I’ve also commented more than once at various boards (like phpbb.com) about style or template issues with IE6, and generally I get the response:
You should really upgrade for security reasons
or
Use a modern browser that supports standards
or anything along those lines. So what is the point of this post?
At Londonvasion we had a presentation by someone that showed off a bunch of really cool styles for Joomla! + phpBB3 integration sites. He even showed some sites where a user could customize the color themselves, giving them a truly unique look for the site. He happened to mention that the techniques used for those styles didn’t work in IE6 so they just didn’t support it. I think at least half of the room (on my side, anyway) turned around and looked at me.
I upgraded my laptop to IE7 on the spot. I’m still getting used to it, but it does address all of the styles quirks for phpbb.com that I was experiencing with IE6.
Through some sort of technical glitch most of this post was missing. I’ve updated it with the rest of the content. My apologies.
A few days ago I posted Part III in my ongoing series where I am comparing phpBB3 to phpBB-Dave (my customized phpBB2-based board) from a feature perspective. I hopefully have made it clear that I am not claiming that my board is technically superior, as I am quite sure that it is not. The experimentation I did with the template engines several months back proved that, at the very least.
Part III included a review of the caching process for each board. A vanilla phpBB2 board does not offer any caching (outside of an early form of template caching). My version is caching quite a bit of information, as does phpBB3. I’ve reproduced that specific table here, as it will help clarify the points made later in this post.
One interesting result of Londonvasion for me was that I found out that there are team members that stop by and read my blog (at least occasionally) that don’t leave comments. DavidMJ, one of the current members of the phpBB3 development team, is apparently one of those folks. He caught me on IRC a few nights ago and offered to help explain the caching routines from phpBB3 and I was quick to take him up on his offer. Here is an excerpt from our conversation; I found it extremely enlightening.
I recently rewrote my banner management system for one of my boards. The board is fairly active (in fact we’re averaging over 100,000 page views daily now) so with multiple page views per second taking place during the busiest times of the day it would make sense to be concerned about performance. And I was. But I also had to be concerned about auditing my banner and page statistics, and ensuring that if I said a banner was going to be displayed every 10 page views that it was. So the system had to be 100% efficient and just as accurate. That presented some challenges.
Some people wonder just how bad the spammer problem is with phpBB2. I can answer the question posed in the subject of this blog post in one word: Very.
As part of an experiment and a desire to capture more seed data for the upcoming relaunch of the bbProtection service I set up a phpBB2 board with no protection other than what is built in to the software. I have enabled user activation and I have activated the visual confirmation. I launched the board on August 15. Within 48 hours I had my first spam registration and my first spam post. The honey pot process has started slow but I’m getting an average of four registrations a day so far. Nine of the 17 have posted at least once (over 50% ratio). None of the posts are anything you would want your children to see; it’s really nasty stuff.
The only MODs I’ve applied to this board are a MOD to capture the IP address during the registration process (in case the bot doesn’t post I still want to know where they’ve come from) and to add the “nofollow” attribute to every link. If google finds this board I don’t want to be penalized for all of the nastiness on the other end of the outbound links.
I’ll be back in a month to post more statistics about the board. It should be interesting.
In the first two posts of this series I went through the feature list comparing phpBB2 with phpBB3 from the list posted at phpbb.com. I then included notes discussing which new features for phpBB3 I had covered already by adding MODs. At this point the score is 1-1, based only on my needs and use of the code. This is the third post in that series and I will cover the Posting, Attachments, and Caching feature categories.
As a disclaimer: this post is not intended to be a criticism of phpBB3 in any way. It is simply a way for me to formally review the features provided by the latest version as compared to what I am currently using, and help evaluate whether I should prioritize an upgrade or remain happy with what I have.
The media team for phpBB Londonvasion 2008 has posted the videos from the public day of the conference. Yay! I’m going to be hosting my own talk here on my site soon, but the entire group of presentations are available at vimeo.com. Here is my topic:
The talk includes a case study that regular (and long-term) blog readers are likely to be very familiar with: the Checkbox Challenge MOD for Wordpress, phpBB Registrations, and even Comment Forms. During the talk there were a few times where I took questions or had discussion from the audience but I think most of the “dead air” has been removed thanks to AdamR’s fine editing skills.
You can review all of the videos here.
I never quite realized how much I “talk” with my hands…