dotorg

Post-mortem: kscr.org is launched. I’ve been working on this site on-and-off for more than a year. I’ve been working on it in earnest since August or so. For all that work, it doesn’t look like much.

But, most of the cool stuff is behind the scenes. From the ground up, the site was built under the assumption that whoever replaces me won’t understand anything. Everything is in a database. Everything. Even the CSS is dynamically generated (it changes itself when you’re not looking). If you want to change the URL for a page, you go edit the URL column in the database. No FTP involved. Hopefully this will string KSCR along for a few years until someone shows up who can program.

It also uses SOAP to communicate with mandala to get things like the currently playing song, cover art, chart data, etc. This is cool. I’d like to create some RSS feeds so that people can keep track of the last few tracks played, reviews of new adds, and stuff like that. I think Firefox’s “Live Bookmarks” thing will eventually push RSS into the mainstream.

The problem with all of this is that it’s very expensive from a speed standpoint. The site is in Houston and mandala is on the floor in Studio B. Every time someone hits the front page, the server queries mandala. Everytime an image loads, that’s a local mysql query. Right now viewing the front page generates 3 SOAP requests and 8 local database queries. The events page, with all its images, is ridiculous from a database standpoint.

So, the next step will be to cache as much of this stuff as possible. I want to cache all the images and deliver them over straight HTTP, like all the major websites that keep their images in databases (amazon, allmusic, etc.). Then, I want to change the SOAP model so mandala pushes to the web server. So it would ping whenever a new track is played, or something like that. That will reduce the load significantly. As traffic increases (I hope), this should keep things working.

In the end, this is more of a 0.8 release, in much the same way that mandala was immature when we first starting using it in production. Over time, that product has improved, and it’s now much more mature than it was a year ago (or even at webfest). kscr.org will be the same way.

5 Responses to this post

  1. Your fan club in Apopka Says:

    The new web site is wonderful…congratulations!

  2. Chris Says:

    Postscript: as it turns out, today, the popularity of kscr.org slowed mandala’s server to a crawl, and introduced an interesting PHP bug that I’ve never seen–”Fatal error: Possible integer overflow in memory allocation (-9 * 4 + 0).” I rewrote some of the kscr.org code to query the database server less (at the expense of data centralization), and it’s ok for now, but there’s some serious optimization work to be done.

  3. joe Says:

    It is a hot piece of programming you have laid out. If only my station’s website was so awesome!

  4. Andrew Says:

    the site is awesome, sir. and i was wondering what would happen after you left — and I am glad to see that you thought ahead and will make it easier on all of us young’ins come Fall of 2005.

    your favorite intern,

    andrew

  5. Cristina Says:

    When Chris leaves, kscr.org will cry, and everyone will be sad.