Why you should have a UPS
I was cooking ramen, and tripped the breaker on the whole room – including my desktop that was logged into work stuff. As you can see, the UPS Carried the system all the way through the outage until I could get downstairs to reset the breaker (twice). So instead of having to deal with corrupted data from my heavy disk caching and waiting for the system to reboot all I had to do was reset the breaker and allow my software to reconnect to the server. (network is back-hauled to DSL via HomePlug AV, which can’t be UPSed)
Ultimate Rails Developer Toolkit for Windows
I totally love Rails, but I’ve never done a ton with it because I can’t use Linux as a primary OS for a lot of reasons, so development meant running a VM or using a spare machine. Not anymore. The tooling for Windows has come a long way and now it’s plenty good enough for Rails development. So, let’s run through the tools I’m using and how you can get your machine set up to do some Rails dev too!
PHP Memory Allocation Blues
As a Systems Administrator and Programmer, I’ve determined it’s nearly impossible to properly determine the system requirements for a PHP based application under a given load. Short of using a special PHP module to profile the application it’s very hard to figure out where memory goes, and because code is loaded and unloaded as it’s requested it’s very hard to predict memory utilization at any given time.
For example, one request may only need a very small subset of code, and only need, say 4 MB of memory. In fact, a high percentage of requests probably do use a very small amount of memory. Great, that means we can run a lot of PHP threads and handle requests quickly.
But say your app is like WordPress, and the public facing side only uses a small amount of memory for the front end pages, but the administration system requires a significant amount more memory. Well, because code is loaded on the fly, every request will hit the disk and load up code and as it runs it will expand its memory footprint until the code is finished and then it will flush itself out again. This is great if you’re running a ton of applications on the same server that don’t get a lot of usage, because memory can be shared easily between applications as they’re used. But, if you’re looking to host a single high performance application, the disk I/O and wild memory fluctuations can be a real problem. For example, if you have an application that normally uses 16 MB of memory to render pages and you have 200 MB of memory available to run applications, one might permit as much as 10-12 PHP Processes. However, if some code loads and allocates 100 or more MB of memory and you have several PHP threads using 20 MB or so memory usage can far exceed the 200 MB available and your system will have to begin paging. Also, since each request loads and unloads all code, memory can be fluctuating in the neighborhood of hundreds of MB per second, so code that gets flushed to the page file can be immediately requisitioned again to close or perform some other function. This is referred to “Thrashing” and is usually considered an edge case.
In Java, for example, the server administrator can set a “heap size” for each application. This then allows the application and web server to work together to allow the application to use an appropriate amount of memory. In .net, IIS runs the web application in a process and automatically balances the memory available with the application and data size. This even works together well with other applications that are sensitive to memory pressure like SQL Server to ensure the best performance available for a given amount of memory and disk bandwidth.
Rails seems to have the best of both worlds. One can use Mod_Rails to use a more php-like hosting environment (but still different and better) for multiple applications on one server, or some form of a mongrel cluster for high performance applications.
If anyone’s interested I can do a more technical evaluation of the other platforms hosting environments, and the strength / weaknesses of both.
It’s OK to Jailbreak
Now that it has been deemed legal to jailbreak an iPhone, do you thing Apple will use this for leverage on AT&T? If tMobile fully supports all the iPhone features, and users start to migrate do you think Apple will start to force its hand on AT&T to get apps like Google Voice into the market? What about killing data caps or tethering fees?
I personally think that’s a bit of a pipe dream. But, it’s OK to dream ;-). Now, how about consumers. How can we push Apple and AT&T to open up? Can we push for features like changable email notification sounds and be heard? I think there are a lot of intersting things to think about wit this new news.
The Cloud is Real
It’s a horrible industry buzzword with little substance behind it, but the cloud is really cool. For example, I rely heavily on the cloud for pretty much everything. For a while, myself and others harped on the cloud for a lot of different reasons, and some of those reasons are still valid reasons to stay away from parts of the cloud.
But, now I am a solid user of two services that I think handle 85% of the things that people use a centralized server in an office for. Dropbox and Google Apps Premiere Edition. Why? Because Google Apps still lets me use a thick client (Outlook and iPhone) which keep local copies of all my mail, calendars and contacts. This way, if there’s a cloud failure or connectivity issue I can still continue to compose emails and work with the emails that came in before the failure. I still have my archives, and I still have my calendar and contact data.
Even if I highly relied on email, this system would allow me to continue to function with only a delay on incoming and outgoing mail. Since Google isn’t known for having super long outages anyway, this is an acceptable compromise over maintaining a personal mail server — especially when you consider the cost. Besides, when Google’s cloud is down it’s not hard to find out. If an internal mail server goes down, the only way someone else is going to find out is via an NDR (Non-Delivery Reciept) usually not sent out for days. And if your email can’t wait a few hours or even a day or so, you’re doing it wrong.
Now, what about Dropbox? Well, Dropbox is cool because it lets me store all kinds of files that wouldn’t really fit into the cloud well. For example, I have a few scripts that I use for work that I want to be available to me even if my comptuer crashes. I also have some documents that would be hard to convert to a useful Google Docs format. I also keep a lot of images and notepad files in there. So what makes it so great? Well, Dropbox is capable of storing a ton of data on the cloud and I don’t have a super fast Internet connection (1.5 Mbps DSL), so I don’t want syncs to new computers to take days. Dropbox has a feature called LAN Sync that is really cool. It allows my computers to sync new and changed files between each other over the Local Network whenever they’re connected to it. This means between my desktop and laptops data only goes between home and the cloud once.
Also, since the Dropbox is replicated, I always have the latest version of the files on my computer. So I don’t need to worry about a Dropbox issue, if they have a server outage I will still have the local copies to work on and when the cloud comes back up they will re-sync and everyone can be happy again.





