Day one is complete. Portland is great as always. Its really day 1 1/2 since we got in at 1PM yesterday. That allowed us to go to the MySQL/Zend party last night. Great party by those guys. Touched based with old friends and made some new ones.
I kind of session hopped today. Of note, I attended Andi Gutmans PHP Security talk which really had little to do with PHP. Like Larry Wall's onion metaphor, Andi presented an onion metaphor for security. I stopped in for a while on the SOLR talk. It looks neat. I like that it is a REST interface to Lucene. If we were not using Sphinx already I might take a longer look. But, we like Sphinx and, SOLR and Lucene are Java. Not that there is anything wrong with that, we just don't use Java a lot, so its just one more thing that would be out of the norm. I admit I spent a good bit of time in what is being called the "hallway track" working on some code. Work does not stop just because you are at a conference.
I got to hang out with Jay Pipes of the MySQL Community team a good bit. We talked about the MySQL forums (which or course runs Phorum) and how they want to improve them. They would like to see tagging, user and post rating and some other things. Some good things will come out of that. Hopefully they have some of the tagging stuff done already at MySQL Forge and can contribute that code to Phorum, saving us time.
I hosted the Caching for fun and profit BoF. It was not packed, but it was a good time. The MySQL BoF was at the same time, so we lost some folks to that I am sure. They had beer and pizza. Brad Fitzpatrick did come by and contribute. Thanks Brad. It was mostly the same stuff you get on the memcached mailing list. "How do we expire lots of cache at once?" Questions about different clients. Stuff like that. It kind of turned into a memcached BoF, but I tried to share the dealnews experience with the attendees including our MySQL Cluster pushed caching.
I have met many readers of both dealnews and this blog (hi to you) while here. Glad to know that both my professional work and my personal work are of use to folks. The demographic at this conference is dead on for dealnews. Maybe I can get them to sponsor it next year. That would be cool.
I say every year that I want to present "next year". Something always keeps me from doing it. Usually its just not having time to prep for it. By the time I think about it, the call for papers has passed. I really want to get it done this time. We shall see I suppose.
We went to the Sun party tonight. It was a good time. There was beer that was free as in beer. More hanging with friends and talking about all kinds of stuff. Now, all you Slashdotters sit down. I saw people from the PostgreSQL and MySQL teams drinking beer and having fun together. OMGWTFBBQ!!!1!! See, the people that really matter in those projects don't bicker and fight about which is better. They just drink beer and have a good time together.
Anyhow, I will blog more after day 2. There won't be a day 3 as I have to catch an 11:30 flight back home. That is usually how it goes. Not sure why they book anything on Friday really. Even O'Reilly has its "after party" on Thursday night. Its late, and I need sleep.
There have been several posts about HTML Purifier 2.0 lately. I did not look to closely at it until I saw this post on our Phorum support forum. Seems the creator of HTML Purifier has chosen Phorum for his site. I hope that means it met his standards for HTML and security. He has posted some questions about the Phorum core. We always welcome a fresh mind.
He is writing a module for Phorum to allow straight HTML in Phorum posts. We have an HTML module already, but its quite basic compared to what you can do with his library. Several people have wanted to use the WYSIWYG text editors that are out there. This should/could open that up to people. I don't see the Phorum core ever having one, but that is what modules are for.
A buddy needed a quick report to see if one of his users was slamming his site. I got a little carried away and wrote a PHP script (plus some awk and grep) to make a little report for him. I am sure it is full of bugs and will bring your server crashing down. So, use at your own risk.
$ ./bwreport.php -h
Usage: bwreport.php [-d YYYYMMDD] [-u URI] [-i HOST/IP] [-r REGEXP] [-v]
-d YYYYMMDD Date of the logs to parse. If no date provided, yesterday assumed.
-i IP/HOST Only report log lines with IP/HOST for host part of log line
-r REGEXP Only report log lines that match REGEXP. Should be a valid grep regexp
-u URI Only report log lines with URI match to URI
-v Verbose mode
So, at dealnews, we are getting ready to launch a super secret thing (redesign beta preview) that requires us to use some cookie tricks. What we decided to do was to give our users a link to a page that would set a cookie. Then we configured our F5 BIG-IP load balancers to direct those users with the cookie set to a different pool (back end ip/port pairs). Its not an original idea. Yahoo! was doing something similar with their recent front page beta. In fact, that is where I got the idea.
Well, it worked great in testing with mod_rewrite (buying a $40k device for testing is not in the budget right now) on my local machine and on the test servers. We had no problems. However, when we turned it all on in production using the BIG-IP we got some unexpected results. We could go to the URL to set our cookie and our site would change. On the redesigned page, there is another link to switch you back. It simply deleted the cookie and redirected you. Since the cookie was gone, you would be back to the old design, right? WRONG! You were stuck. But, if you did not click on any links on the site for about, oh, 15 seconds, you would get back to the old design. I should say at this point that Safari was the only browser that did not do this. IE, Mozilla and Opera all had this problem.
Hmm, 15 seconds. That is the default KeepAliveTimeout in Apache. I took a chance and disabled keep alive in Firefox (about:config, search for keep, set to false). BAM! It all worked like a charm. It seemed that IE, FF and Opera all keep your keep alive connection open even after the page is done loading. And because the BIG-IP determined which pool you are connected to at connection time, you stayed connected with the new pool rather than switching back. And, as long as you kept clicking around on our site, you would keep that connection open.
As for a solution, we decided to let Apache do the work for us. We didn't want to tell the BIG-IP to start disconnecting users on every request. Instead, we used a Location directive and SetEnv to set the nokeepalive environment variable only when users access the page that sets/unsets the cookie. Now Apache sends the Connection: close header and the browsers comply. You can see an immediate difference too. Firefox for example has a noticable pause while it closes the connection and makes a new one. I am going to dig around in the BIG-IP manual some more to see if there is anything we can do to make this work at the load balancer layer. But, I don't really want my load balancers spending CPU cycles on something that will not be an issue once this redesign is launched.
As a dealnews web developer, you will help maintain our current stable of deal and price-tracking web sites, and build new features and new web sites as we continue to grow. You'll be part of a small, fast-moving team of developers that are involved at every stage of product development, from concept to rollout.
We use Gentoo, Apache, PHP and MySQL. While that does not need to be your expertise, it is a plus. We have a little Perl and Python thrown in as well. You will need to code on a non-Windows system as we run our development environment on our local machines. Currently, we all use Macs.
A big plus, however, is disc golf. We play weekly as an um, team building excercise. Yeah, team building.
So, in the modern world, navigation in HTML often involves using lists. You know, the ol and ul elements. Most of the time, a list of navigation items have some sort of header. I have done several things in the past to make that header look different. That includes making it not part of the list, breaking specs and putting it outside of any li element, and using a class on the first element. I was thinking, we really need an lh element like the th that tables have. Its a handy way to have a heading that is still part of the document structure.
Well, on more than one occasion, I have found an element that I had forgotten or did not know existed. I recently started using the dl, dd, dt tag elements for example. So, I figured I would look to see if I had just missed it. I check DevGuru for the <lh>, but no luck. So, I ran a search on Yahoo!. Much to my surprise, there were many examples of this very element in use. I got excited. Maybe it was some deprecated HTML 2.0 element or something. Upon more research, I found that <lh> was part of the HTML 3.0 spec which expired. HTML 3.2 was later written and did not include<lh>. HTML 3.0 was never more than a draft. What a shame. This little element could be making life a lot easier in a CSS world.
There is some good news though. XHTML 2.0 will implement the <label> element for lists. And if you if do not obsess about your page validating, Firefox, IE, Safari and Opera all recognize the label element inside and ol or li already. If someone emails you telling you your page is not valid HTML, tell them you are ahead of your time.