Writer's Diary

What's it like to be a fiction writer? Read on. (Writer's Diary Archives)

Tuesday, September 11, 2007

I Can Read Between the Lines!!

This explanation was on MySpace about how everyone's (apparently) freaking about friend counts decreasing:


Just wanted to update everyone on this issue. Last Friday we ran some database jobs to fix an inaccuracy in the way we were counting the number of friends each user has.


I'm a DBA (Database Administrator) so I can totally read between the lines. First off, and this has nothing to do with dbs, directly, MySpace is written in ColdFusion, which is a programming language that used to be cool a few years back and isn't anymore because of .Net and Ajax. ColdFusion doesn't scale, everyone knew that years ago. And, although I don't know for sure, I'd be willing to bet the database backend is probably mySQL. Sorry, but the deficiencies of MySQL are well known among people who work with REAL databases. (Insert smug grin) It's a great product if you need cheap/free and good. That's an amazing price point there. But MySQL is lacking, compared to SQL Server or Oracle, which are really your only two Enterprise choices (sorry DB2 you're a joke).

So, Bet Number Two. If it's true the MySpace backend is MySQL, then it's also true that the database design sucks majorly. Sorry, but the kind of db design skills that give you scalable, reliable AND high performance from a database do not reside with people who use MySQL. Really.

There's only two reasons for an inaccurate friend count: A bad query (see comment above about skills...) or a forked up database that wasn't properly normalized. (See comment above about skills...) I bet somebody keeps the friend count in more than one table, or worse, stores a calculation result instead of letting the database engine calculate on the fly.

That's why MySpace is so freaking slow. ColdFusion and MySQL. Back when, nobody knew MySpace was going to be getting 100,000 new users a day. Guaranteed the database isn't designed for that, and I bet they spend hours writing kludge code instead of working out how to port to a REAL programming language and a REAL database, properly designed and indexed.

Not sure about the writing today. Some stuff came up that hosed my afternoon which I don't want to talk about right now. I'll try to get a bit done, but today may be a wash. Rats. Yesterday went well though, and when I went running today, I had some neat ideas.

Labels:

posted by Carolyn @ 9/11/2007 08:38:00 PM Permalink

Comments: Post a Comment