Tue, Aug 18, 2009, 3:14pm On Cubes, XServes, Migration and FScript 2.0
Computers » Web Serving
S
o, for the 1st time since 2001, with the exception of when I moved, I'm allowing my Cube to go to sleep and sleep hard drives when idle. Yes, my trusty 500MHz G4 Cube, perhaps the single most reliable computer I've ever bought, serving up pages 24/7 for the last 8 years without a sound or a complaint (bought a few months before it was discontinued), is no longer my web and database server. It is now free to live a life of leisure and spiritual fulfillment.

The Cube was never the limiting factor on my web serving. The limiting factor was the DSL line that I was using from home. But I got fed up with the maximum speed that AT&T has forever cursed DSL customers who live near me and the high price being paid for it. So I switched to Cable for my home service, and am now sharing an dual-G5 Xserve, colocated at a place with a fat pipe to the net. The speed gains are probably obvious to anyone stopping by before and after. And all this is costing me less than before. A happy change.

Moving everything from one server to another can be a bear, especially if you are using multiple languages and custom frameworks. I also went from MySQL 4.x to 5.x, and that meant that code compiled against the 4.x headers broke in various ways and had to be built back up. I ended up learning a lot about using xcodebuild on remote systems. Very handy, that.

Running FScript on my Cube had the disadvantage of missing all the neat additions made to FScript 2.0, which went golden master earlier this week. Class and dictionary syntax being the most important to me. The Cube was running Tiger, however, and you need at least Leopard (10.5) to run FScript 2.0. But last night I decided to replace the FScript 1.x framework with the latest 2.0 and then try to slip it into place and find out what breaks.

It turns out lots of stuff was breaking, and unfortunately I had to try to get things going on a live server, because the framework had to be in place when I would try to rebuild higher-up frameworks that rely on it. (A few of you may have seen my OS X page break more than a few times last night while I was debugging.) One tiny thing was that I could no longer use the "size" method on arrays, I had to use "count." Took me a short bit to figure that out and change my scripts.

What I was hoping for was to get a full 64-bit stack running for the web page FScripts. And I was almost able to do it, but the mysql build on the machine, which was a pain to get just right, was 32-bit only, which in turn consigned the SMySQL framework to 32-bit, and finally my web framework which uses that. And then it turns out that I had to rebuild SMySQL, AGRegex, the command-line fscript and my own framework all to allow for garbage collection compatibility in order for all the code to be able to work together. Took a bit, but the whole stack is working great now, and I can finally play with the new features of FScript on the server.

There were more tiny dramas beyond all that, like finally changing my old-school cron ways to LaunchAgents and reworking a bunch of security issues, but suffice to say that everything is running very smoothly now. It was also convenient/fun that the Singh book on Mac OS X Internals had a chapter going over the very Xserve that I was moving onto. Thanks are due to a few regulars who spotted some broken items that I glossed over: thanks!

(Funny side note: just as I hit the button to publish this post, the script that generates the thumb nail image on the front page failed and I had to generate it on the Cube. Ha. Ok, need to fix that next.)

Leave a comment