Quick Update...

Sorry this blog has been inactive for so long but I've been really, really busy with work, and my move to Puerto Nuevo, Mexico in northern BC. I am thinking about putting together a series of posts that detail how to set-up a data-processing stack, in PHP, for mongodb that allows you to dynamically generate all CRUD queries via the class stack.

The front-end interface, to this stack, is through RabbitMQ -- also written in PHP -- which eliminates Apache from the  LAMP stack, and no longer requires a REST interface for transferring data requests to-and-from store.

The stack includes services such as auditing, registration for public-facing requests, memcached and membase support, error-logging, and internal checks on requests that prevent things like query generation that result in full-table scans or any searches on un-indexed columns within either mongodb or mysql. (I think I still remember how to code for mysql... :) )

Anyway, this project has been all-consuming for me for the past year and the concept of generalizing the stack for instructional purposes has been rattling around in my can now, looking for a way out, for quite some time.  It's not like there's a plethora of PHP-based RabbitMQ tutorials out there either.

So, that's the happs.  Now that things are settling down a bit, I'll try to get more information out.

Thank you for checking-in!

Fair is Fair - My Top-5 "Desert Island" Songs.

Fair is fair.  The other day I posted about which music I absolutely loathe so it's only reasonable that I now post about the music which I count as my most-favorite.

I've given this a lot of thought.  At least twenty minutes or so.  Mostly.  Of all the available music, were I suddenly stranded on a LOST-like island somewhere, these are the song which I hope would survive on my magical iPod of Eternal-Battery.

I could literally listen to these songs over-and-over again, all day long, without going insane and wanting to do the post-office dance.  Every time I hear one of these songs, it's like hearing it for the first time.

So, again realizing that this is extremely subjective (you're going to disagree with most of my picks), here's my Top-5 Desert Island songs from most-to-least favorite order.  One last comment: most of this music is decades old.  One of the criteria, of course, being that the song be capable of witstanding time's test.  I like a lot, if not most, of today's alternative music.  However, who's to say if I will still like it as much, decades later...

#1 Battle of Evermore by Led Zepplin

Led Zepplin was obviously going to be in my top-5 lists.  The only thing that surprises me is that I chose this song over one of their older, bluesier, pieces.  I love this song.  Of all the music I've ever heard, it remains my favorite song of all time.  Not only does it tell a great story, but the music ranges from savage to delicate - peaking at all the right places.  At the end of this song, I'm wrung-out emotionally.  It's that great of a ride.

#2 Who Wants to Live Forever by Queen

I made a comment a while ago -- "if you don't love Freddy Mercury, you're dead to me."  Well, of all the contenders in the Queen portfolio, I choose this relatively little-known song.  It was made for the movie "Highlander", the original starring Christopher Lambert.  Queen did the soundtrack for that move and it was awesome.  (Both the movie and the music.)  This song plays while the newly-immortal Highlander watches his first love age and die while he remains young.  When listened to in-context, the song is bittersweet and poignant, conveying the emotions of grief and love.  Frankly, I'm surprised this song isn't played at more funerals.

#3 Sabbath Bloody Sabbath by Black Sabbath

This was the first album I ever bought.  It cost $5 brand new and the year was 1974.  My parents were horrified.  Heh.  (My second album was Alice Cooper's "Billion Dollar Babies"...)  What I love about this song is the soul-crunching bass riff that hits about 3-minutes into the song.  It's so incredibly massive that I've not heard anything done with the same levels of harmony since.  Nearly 40-years after it's release, this song can still get me thrashing and banging and is my tribute-selection to all things Metal.

#4 Sidewalk Hobo by Tony Joe White

I love the blues.  I listen to the blues constantly and it's been a large part of my life for as long as I can remember.  There are so many, many  great pieces of music in the genre that it's nearly impossible to select just one title.  From a young boy watching Louie 'Satchmo" Armstrong play "When The Saints" on live TV, to my Mother's favorite: Billie Holiday, to watching the now-departed Flash Terry play every week at Willie's Saloon, there's just too many to chose from.  John Lee Hooker, Aretha, Stevie-Ray, Buddy Guy, ... the list is endless.  In the end, as homage, I chose this song because, simply, it moves me every time I hear it.

#5 Pie Jesu (Requiem) by Charlotte Church

I had a hard time choosing my favorite classical music piece.  Not all is rock-and-roll and if I was to be limited to only five songs, then this one, specifically by Charlotte Church, would be my fifth.  I choose this over Bach, Mozart, Tchaikovsky and even Beethoven.  I even chose this over Pachelbel's Canon in D which was the song that made me fall in-love with classical music.  I was first exposed to Charlotte Church while watching a, of all things, Craig Fergusson movie called "I'll Be There".  The movie was easily forgotten, the voice of Charlotte Church wasn't.


That's my top five.  I wish this was a top-10 list because there are so many others I could add.  The Who, Cage the Elephant, BRMC, Cat Stevens, Karen Carpenter, Rush, David Bowie, Barry White, Dean Martin, Harry Chapin, Jim Croce, The Hollies, Elton John, Janis, Nina Sinmone, Ted Nugent, Ray Charles... the list is endless.  Which explains why I have thousands and thousands of music titles in my collection.

Hopefully, my iPad/iPod will survive the crash intact!

O'Reilly...and my timestamp index problem...

Just a quick jot - I'm headed to the O'Reilly MySQL conference, April 12-14 in Santa Clara for three joyous days filled with database geekiness. There's a lot of diversity in my schedule for the conference - I'm focusing mainly on performance tuning for mySQL, cloud deployment, replication and sharding, and a shallow dip into noSQL strategies.

Here's the current problem I'm working on:

For any given table, (I don't believe that the ddl matters), say you have a timestamp field which is indexed and referenced in a query.  The table is Innodb so the timestamp field can only be a btree index.  Which means that the index is stored in ascending order.

In your query, your conditional reads something to the effect of (where timestamp(now) > timestamp(now) - 5 minutes)  (it's psuedo-code, ok?)

What I expect to happen is that as the query is calculating the conditional border value and then doing an index-scan on the btree-index, examining each index value (row) until the current timestamp exceeds the calculated value.

What I'm seeing (in the slow-query log, among other places), is that the query is executing as an index-scan, but is scanning all the rows of the index, essentially doing a full table scan.

The query is calculated and stored as a variable passed to mysql_query() -- so the parser is determining the now()-5 minutes value and is passing it off as a string constant...

Anyone have any suggestions, I'd be most happy.  This lil' kitteh turd has filled my slow-query litter box....

Upcoming Project...

I've got a project I'm going to start over the weekend.  I'll try to document it as thoroughly as possible because I think it's (a) a cool project and (b) someone else may learn from it. Here's what's happening.  I currently have four desktop systems:

  1. 27" iMac i7 (main work machine)
  2. Windows Vista Box - fairly powerful - previous work machine - has been "off" for about 6 months.
  3. Windows Vista Box #2 - Sarah's machine.  Slower box.  HP Mini Desktop.
  4. Linux server custom built but incredibly old.

My plan is:

  1. to retire the Linux server, this being the second such linux box I've retired in the last 16 years -- so there's a ton of data on it that needs to be backed-up and migrated over to what will become the new linux server.
  2. Save Sarah's data on the HP mini-desktop over to my old Vista box via the network.
  3. Wipe Sarah's box and install centOS hardened.
  4. Transfer my data from the old custom box to the new CentOS box.
  5. Retire the old custom box by reformatting it with Ubuntu.
  6. Configure the Linux box with a dedicated IP.
  7. Get Sarah's box restored and running on the network.

Start plan 2 of the project:

  1. Install Asterisk on the Linux server and configure it as a VOIP switch.
  2. Install soft SIP clients.
  3. Install kfone over the SIP clients.
  4. Test for proof of concept.

That's the summary - commentary and encouragement welcomed!