APC Datastore Class For vBulletin

On one of my ultra-high traffic web servers, I switched from eAccelerator to APC today (an opcode/caching system for PHP). So far it seems pretty nice… Especially the ability to disable stat for each PHP request.

I ended up making a datastore class for vBulletin also so I could use it for the forum, so if anyone else is using vBulletin on a server with APC, here you go (if you know what this is for, you will know where it goes :)).

[code=php]// #############################################################################
// APC

/**
* Class for fetching and initializing the vBulletin datastore from APC
*
* @package vBulletin
* @version $Revision: 0.0.0.1 $
* @date $Date: 2006/05/08 16:51:06 $
*/
class vB_Datastore_APC extends vB_Datastore
{
/**
* Fetches the contents of the datastore from APC
*
* @param array Array of items to fetch from the datastore
*
* @return void
*/
function fetch($itemarray)
{
if (!function_exists(‘apc_fetch’))
{
trigger_error(‘APC not installed’, E_USER_ERROR);
}

foreach ($this->defaultitems AS $item)
{
$this->do_fetch($item);
}

if (is_array($itemarray))
{
foreach ($itemarray AS $item)
{
$this->do_fetch($item);
}
}

$this->check_options();

// set the version number variable
$this->registry->versionnumber =& $this->registry->options[‘templateversion’];
}

/**
* Fetches the data from shared memory and detects errors
*
* @param string title of the datastore item
*
* @return void
*/
function do_fetch($title)
{
$ptitle = $this->prefix . $title;

if (($data = apc_fetch($ptitle)) === false)
{ // appears its not there, lets grab the data and put it in memory
$data = ”;
if ($dataitem = $this->dbobject->query_first(”
SELECT title, data FROM ” . TABLE_PREFIX . “datastore
WHERE title = ‘” . $this->dbobject->escape_string($title) .”‘
“))
{
$data =& $dataitem[‘data’];
}
$this->build($title, $data);
}
$this->register($title, $data);
}

/**
* Updates the appropriate cache file
*
* @param string title of the datastore item
*
* @return void
*/
function build($title, $data)
{
$title = $this->prefix . $title;

if (!function_exists(‘apc_store’))
{
trigger_error(‘APC not installed’, E_USER_ERROR);
}
$check = apc_store($title, $data);
}
}[/code]

Update

I just found out APC datastore support was added to the yet unreleased vBulletin 3.6. Nice!

Update 2

I’ve since switched back to eAccelerator. APC was causing Apache segfaults under ultra-high loads.

Random Email #16

Another random email I got today (in it’s entirety)…

please let me how can i hack a yahoo id?

Do I look like “Grand Master Hacker Shawn” or something? Why don’t you call Yahoo and ask them how to hack their whole site… then you can access all the Yahoo IDs you want.

Getting Around Dell’s Whacky Pricing

As I mentioned previously, I’m looking to get a bunch of Dell blade servers, but their pricing system (seemingly random pricing changes every day) is really irritating me. So I think I may have come up with a solution… Just buy stripped down blades and add the RAM, hard drives (and maybe even 2nd CPU) yourself.

As of right now, a single loaded blade configured as I would want it is $9,062 (that’s 2 dual core CPUs, 12GB RAM, 2 146GB 1k rpm drives, 3 gigabit ethernet ports, SuSE Linux Enterprise 9, etc.)

But if I strip the CPU, RAM and hard drives down to a minimum (1 dual core CPU, 1GB RAM, 1 36GB 15k rpm drive), the cost is $3,025.

Dell doesn’t offer 4GB DIMM modules, but they do say the blades support them. It’s actually cheaper to use 4GB DIMMs instead of 2GB DIMMs because you can use double ranked for the 4GB vs. single rank for the 2GB. This also means by using 4GB DIMMs you can max out at 16GB of memory instead of 12GB. 4GB DDR2 DIMMs are $581 each.

146GB 15k rpm U320 SCSI drives are $275 each (would need to find out if Dell sells blank drive carriers since they are hot swappable.. if not, I found them on eBay for $8.95).

A 2nd processor is $935 (the user’s guide for the blades actually have instructions for replacing a CPU, so maybe you can add one yourself too).

So if we add it all together we could have an identically configured blade (except we would have 4GB MORE RAM) for $6,834 instead of Dell’s $9,062 price. Also, would probably just end up adding 8GB RAM for now (9GB total) which would bring the per blade cost down to $5,672.

Now if they would just use AMD Opteron processors instead of Intel Xeon…….. πŸ™‚

104 Year Old Lady Takes 21st Husband

I bet the consummation of the marriage was a glorious and beautiful site to behold. πŸ™‚

A 33-year-old man in northern Malaysia has married a 104 year-old woman, saying mutual respect and friendship had turned to love.

It was Muhamad Noor Che Musa’s first marriage and his wife’s 21st, according to reports in the country.

Muhamad, an ex-army serviceman, said he found peace and a sense of belonging after meeting Wook Kundor, whom he said he initially sympathised with because she was childless, old and alone, the report said.

“I am not after her money, as she is poor,” Muhamad reportedly said. “Before meeting Wook, I never stayed in one place for long.”

He said he hoped to help his new bride to master Roman script while she taught him Islamic religious knowledge.

The report did not say if any of Wook’s previous 20 husbands are still alive. Malaysian Muslim men are allowed by their religion to take up to four wives at a time, but reports of women who marry more than once are rare.

Tickets To Costa Rica

We are going to Costa Rica this August, so I bought 6 plane tickets today. Here’s something interesting… if you book 1-4 tickets, they were $439 (plus tax/fees), but if you book 5 or more at once, all the tickets were $702 (plus tax/fees).

So the tip of the day is… just buy two different blocks of tickets if you need to. Then they are all $439 (in my case). πŸ™‚

Padres Dugout Seats

Okay… I retract my previous post about $290 Padres tickets being too high of a price. Everything is free… the best parking, all food, beer, or whatever else you want. There are servers that come to your seat and bring you whatever you want, as often as you want. We had 5 or 6 beers, steak, nachos, hot dogs, carrot cake, cookies, ice cream, pretzel and probably some other stuff that I can’t remember (you could even get sushi brought to you). There was also a secret underground lounge, bar and restaurant (all free too) that you could go to whenever you feel like it.

We were right behind home plate (we were on TV for every pitch), and even better is the game was AWESOME. Padres losing 5-0 in the bottom of the ninth, rally with 5 runs to tie it, then win in the 10th. If you really want a summary, check ESPN.

They were fantastic seats, and actually worth the $290 price.

I found some info on them over here.

3M Opticom 792 Emitter

If anyone is tossing and turning at night trying to figure out what to get me for my birthday (in September.. heh), here’s an excellent idea. An infrared emitter for emergency vehicles that will turn traffic lights green for you (that of course is a joke, I’m sure you can’t buy one… but it would be neat).

The 3MΓ’β€žΒ’ OpticomΓ’β€žΒ’ Priority Control System Model 792 Emitter is a compact, lightweight, weather resistant encoded signal device intended for use on priority and probe vehicles. The emitter is comprised of a flash-tube/reflector and housing assembly with an integral power supply and the required cables. Available models include: the Model 792H emitter – a high priority emitter; the Model 792L emitter – a low priority emitter; the 792T emitter – a low priority emitter equipped with a visible light filter; the Model 793R emitter – a range setting emitter for high priority, low priority, or probe frequency; the Model 792P emitter – a probe frequency emitter. The emitter converts 12 Volt DC vehicle battery power to the high voltage required for operation of the unit. Accessory switch devices are also available. The operation of the device may be customized through its interface software. The encoded signal pattern (comprised of the individual vehicle class code and vehicle identification number) generated by the emitter is determined after installation through the use of interface software. The emitter, when installed on authorized service and maintenance vehicles, may also be configured to utilize the Automated Signal Intensity Threshold setting feature of Series 700 Phase Selectors and Series 250/450 Discriminators. This feature refines and simplifies individual intersection setup and maintenance techniques. The emitter separates precisely timed pulses of high intensity light in the infrared and visible wavelengths at the base flash rate of approximately 10, 12, or 14 Hz. It also interleaves programmed encoded pulses that carry the vehicle class and ID number information. These energy pulses are sensed and processed by other Opticom system components to cause activation of the system. Model 792 emitters are programmed using the Model 790IS Emitter Software Kit.

//www.3m.com/us/safety/tcm/solutions/pia_opticomPCS-NY.jhtml

Dell Pricing Fluctuations

Can I just tell everyone how annoying Dell’s price fluctuations are? I’m trying to purchase a blade chassis and 10 loaded blades. One day the blades are $66,030, then they are $105,400, then $66,030 again, now they are $88,040 (all pricing for identically configured blades of course). Finally I got pissed and called Dell, and their response was, “Well, we change our pricing every week.”

Gee, really??

What, do you have to roll the dice and try to guess when they will be a “normal” price again and buy them in that 15 second window? Really f’ing annoying…

Last Ninja: “Be Able To Kill Your Students”

This article is crap… this dude might BE a ninja, but he certainly isn’t the last. First of all, I’m a ninja (I completed my training already), and so is Bobby. So I know two ninjas without even looking for them.

The teachings of Grand Master Masaaki Hatsumi echo through my head as he entreats me to attack a blackbelted disciple with a practice sword. “Always be able to kill your students,” he says.

Chilling words from a shockingly fit 76-year-old man who bills himself as the world’s last ninja and stocks his training chamber with weapons such as throwing stars and nunchucks. Especially to a neophyte whose closest brush with martial arts was watching Bruce Lee matinees as a kid.

As I cautiously raise the sword with a taut two-handed samurai grip, my sparring partner gingerly points to Hatsumi. I avert my eyes for a split second – and WHAM! The next thing I know, I’m staring at the rafters.

//www.mercurynews.com/mld/mercurynews/news/world/14434176.htm

High Tech Hooker Pumps

Nice! These shoes have built in LCD and GPS so pimps can keep track of their hoe’s. πŸ™‚

The Aphrodite platform shoes will have an alarm system, which emits a piercing noise to scare off attackers. The shoes are also outfitted with a GPS receiver and an emergency button that relays both the prostitute’s location and a silent alarm signal to public emergency services. Where there are problematic relations with law enforcement, the shoes will relay the signal to sex workers’ rights groups.

//theaphroditeproject.tv/

$290 Baseball Tickets?

I’m not a *huge* baseball fan, but I’ll go once or twice a year, and I’m going Sunday for the Padres/Dodger game (this will be my first game this year).

Steve at Bank of America called and asked if I wanted some tickets for the game, so I figured… what the hell. Free baseball tickets… I’ll go. I picked up the tickets today while in the branch, and I just about crapped myself because the tickets are $290 EACH (“Dugout Seats” whatever that means). Does that mean I get to sit IN the dugout? Where do you even get “dugout seat” tickets? I just went to the Padres website and the most expensive tickets I could find are “Premier Club” at $59 each. For the price of these two Padres tickets, you could get the nicest season ticket for the Chargers.

Bobby and I are going on Sunday, so we’ll see if these 2 seats are really worth $580 or not. Maybe we get massages or something. {shrug}

Building “Fees”

So today I had to pay all the “fees” required to build a house. This included the following:

Traffic Impact Fee: $8,299.00
Park Fee: $1,000.00
Fire District Fee: $4,132.36
Building Permit Fee: $2,176.00
PAD: $4,000.00 (I don’t even know what in the hell this stands for)
Fire District Plan Check Fee: $350 $450
Water District meter installation fee: $33,226.00
Sewer Fee: $600
School District Fee: $40,958.98 $30,387.31

Are you serious? $94,742.34 $84,270.67 in “fees” just so you can get permission from the city and various agencies to build a house? This is on top of the $5,545.78 plan check fees already paid, which puts the total at $100,288.12 $89,816.45 and we aren’t even building yet. I wonder if SDG&E is going to charge to install the transformer for electricity (probably). Ouch.

Oh, there is also a “Drainage Fee” that will be due and I have no clue what that amount is going to be yet.

If you were building a house for resale, how does anyone make any money??

Update

June 2, 2006 – Apparently I was accidentally overcharged by the school district by $10,571.67, so they are sending that back. πŸ™‚

WordPress Is NOT Scaleable

The core of WordPress (this blog software) is pretty much a piece of crap as far as it’s “guts” are concerned (although I knew this already, I just didn’t care because my blog doesn’t get enough visitors to really make that fact matter much).

Anyway, I woke up this morning to my servers being thrashed (database server was hitting it’s max limit of 2,500 concurrent connections). Turns out it was because of a front-page Digg (the 3rd one for digitalpoint.com in the last 60 days, but the 1st one for my blog with the crappy WordPress backend). That didn’t hold up to the “digg effect” for very long.

I ended up cobbling together a caching mechanism for WordPress real quick that actually made everything okay, but what I really want to know is if anyone knows of any blog software out there that doesn’t have a crap backend? One that can hold up under load if need be. Sure would be nice if there is one out there already so I don’t have to do it myself.

This is the digg in case anyone is curious. It was dugg by the same person that got a front-page Digg for digitalpoint.com previously. Digg is powerful… a crazy amount of traffic at once. It’s also what spawned the server fundraiser going on now. I think TOPS30 needs to be stabbed.

MPAA Offers To Settle (Again)

There is an “Early Neutral Evaluation Conference” on May 23, 2006 to determine if this matter can be settled. Personally, it seems like an utter waste of time because at this point about the only thing I would settle for is if they dropped the case, paid my attorney fees and then dissolve their whole organization.

They offered me an initial settlement of $2,500 (before they decided to take it to court), which was rejected on the basis of principle. Then today I talked to my attorney and they are offering a settlement of $3,500.

Bahahahahahaaha! So if I refused your $2,500 out of principle, what exactly makes you think I’m going to give you $3,500 now? That’s comedy. πŸ™‚

From everything I’ve read online, the MPAA (and RIAA) has been pretty much extorting everyone simply because they can’t afford to fight it. This certainly will give me something interesting to blog about. I just pray it goes to a full trial, where they will lose and then give everyone else that is being sued a nice lawsuit they lost as a reference for their lawsuit… “MPAA vs. Shawn Hogan” That has a nice ring to it. Maybe this loss will be the start of their demise. (Hmmm… I seem to have quite the aspirations, eh? haha)

From a purely business standpoint, I think all the lawsuits that the MPAA and RIAA are throwing out are only hurting them in the long-run. From everything I’ve read, it does not curb piracy at ALL. I would even argue it increases it because all of a sudden people that weren’t aware you could download music/movies now realize you can (and some will start). Then you are going to compound this by everyone talking about it and reading other’s blogs. I’m a perfect example… from talking my attorney and then researching stuff online as a result of that, I now know that if you have the proper software installed, you can download pretty much any movie (or anything else) you want.

Not only that, but you would think they would be wiser about who they choose to extort.

For as big of an organization they are, my website gets roughly 10,000 times more traffic than theirs (hell, this stupid blog gets more traffic than their site). Then again, digitalpoint.com more traffic than buy.com or adobe.com.. hehe

So what just happened? Well now a few hundred thousands people per day were just educated about 1. about their general extortion and 2. they also now know that you can download whatever you want. I’m starting to think maybe the MPAA might actually kill the movie industry (which this dude shares my viewpoint). If they were smart, they certainly would choose their racketeering targets a little wiser (like maybe someone without the resources to fight and a captive audience of 80 million people per month that will read my viewpoint). This could turn out to be some good/interesting reading though. Reminds me a bit of the Winn and Sims fiasco.

Wanna see something else funny? Check Google’s top 10 results for “MPAA”… It seems I’m not the only one that thinks the MPAA is looney. πŸ™‚

//www.google.com/search?q=mpaa

Oh, and just as a side note, they are utter liars… They told me they identified the specific computer that did whatever they claimed and they traced it back to me (of course I knew that was a lie since it never happened). But now they are saying they don’t have any such information (MAC address basically). {rolls eyes}

Update

For everyone asking, it’s case number 06CV0545, Universal vs. Hogan filed in US District Court (California Southern District, Ninth Circuit).

Random Email #15

Another weird email… Am I getting more than normal??

Typed about 200 pages of text. Due to an addition of information, I need to remove these page numbers and re-assign new numbers. However, the page numbers are in a shaded or gray color, and I am finding it imposible to remove them. Any help would be appreciated. Thank you.

I’m starting to think that maybe everyone in the world thinks I know everything about everything, because I have no clue who this person is, and I certainly don’t have anything to do with laying out pages.

Random Email #14

Here’s a good one I got today. πŸ™‚

I want Admin password

That is the whole email. Obviously this person is a mastermind at social engineering and phishing. Thankfully I didn’t fall for it though. That was close… {phew!}

Ferrari Enzo Crash In Malibu

I heard about this yesterday, but apparently it’s been an ongoing saga the last few months…

//www.wreckedexotics.com/special/enzo/

The driver hit a telephone pole going 162 miles per hour and only suffered a bloody lip.

The amazing part to me is that the Enzo (a $1,000,000 car) can be repaired by Ferrari to be “good as new” for $250,000 (1/4 the cost of the car), because from the looks of it, it uhm… got cut in half, and the engine ripped out. πŸ™‚

Boeing 797

This is an interesting plane if Boeing actually decides to build it…

A 1,000 passenger plane that is faster than existing commercial jets (mach .88), and also more efficient because of the wing design.

.There are several big advantages to the blended wing design, the most important being the lift to drag ratio which is expected to increase by an amazing 50%, with overall weight reduced by 25%, making it an estimated 33% more efficient than the A380, and making AirbusÒ€ℒs $13 billion dollar investment look pretty shaky. High body rigidity is another key factor in blended wing aircraft, it reduces turbulence and creates less stress on the air frame which adds to efficiency, giving the 797 a tremendous 8800 nautical mile range with its 1000 passengers flying comfortably at mach .88 or 654 mph cruising speed (another advantage over the Airbus tube-and-wing designed A380Ò€ℒs 570 mph).

It’s looks a bit like a stealth bomber. Maybe they could further save costs by dropping smart bombs while making commercial passenger flights. πŸ™‚

Gears Of War

Does anyone besides me think that the new generation of game consoles have *really* good graphics???


click to enlarge

This is a actual game play screenshot from Gears Of War (for Xbox 360) which comes out later this year. Screenshots like that almost make me want to go buy an Xbox 360 and a new TV just to take advantage of it. πŸ™‚