Maybe it’s my lack of Mac know-how, or maybe my total disdain for the damn things, but the Mac Mini we have in our office is a stubborn little shit. No matter how hard we try, it won’t start up Sphinx at boot, nor will it run cron-jobs. I guess I don’t blame the Mini as much as OS itself.

OS tries to be user friendly by providing a UI for things that you’d normally need a command line for in a unix system. The problem is that they implemented it in such a way that the command line doesn’t work for things there are a UI for in many cases. Either that or I’m going insane, but either way a linux dork should be able to figure out how to get something as simple as cron jobs and boot programs running, but alas, no luck.

We originally got it because it would be our personal server for testing and running linux programs (like Sphinx search!) but it turns out it’s kind of a pain. I do love the OS interface when I’m using it, but most of the time I’m on it through remote SSH.

Well, I could live with just starting Sphinx manually every time it boots, but today MySQL just decided to quit randomly without warning. Now, this Mini is just for development, there are no actual sites running on it, so no REAL harm, but damn. The fact that it isn’t running anything on it should be reason enough for it to not suck.

I’d like if Apple would make an interface through OS for startup/crons instead of making you edit some backwoods-hick xml file hidden under some obscure camel-cased directory.

Aside from the Mac only running SSH and the GUI reliably, it does everything we want it to except for everything. It looks cool though. My advice is to never get a Mac, at least not until they can program stable kernels and not, like a pack of rabid wild apes, use launchd with its xml-jedi-mind-trickery. Who’s idea was that? And since when did cron stop doing everything we’ve ever wanted?

So As some of you know, a while ago I switched from Apache to lighttpd…I mean, youtube uses it right? No doubt a highly modified version. Not long after I get it set up just perfectly, I started reading ALL the horror stories about memory leaks.

Now granted I didn’t run into any memory leaks, but I’m not going to bet for something that is consistently failing all around me. Then I heard of Nginx. Keep in mind this all happened at least a month ago…I just haven’t had time to blog at all. Anyway, it’s supposedly faster than lighty, it’s actually stable and doesn’t need rebooting every night, and it’s russian.

So being the tinkerer at hear that I am, I decided to install it on the beeets.com server. Well, the syntax in in the config file was a bit of a learning curve. It’s sort of like C but not as friendly. A space in the wrong place will make it fail. Needless to say, I got it all configured though. FastCGI, PHP, URL rewriting, client-side caching, and if I need it later on, a kickass reverse proxy.

So I guess this is me saying a few months later than nginx totally kicks ass. It benchmarks so much better than Apache, and it’s russian.

I think the next think I’ll be tinkering with (fucking up) will be MySQL replication. From what I read, it’s better than clustering for a few reasons. You can do things with replication you can’t do with a cluster. The problem is there will definitely be some gnarly code tweaks because nothing supports it by default, at least not that I know of. Oh yeah, plus there’s like, no documentation on writing a PHP app for a replicated database. I know, read from the slave, write to the master, but if you write to the master and immediately need to read a generated value (last id) then you have to read from the master since you can’t rely on the slaves to be kept instantly up to date. That’s a fun code change.