Thursday, May 15, 2008

Have you ever...

You buy a Twix bar from your favorite vending machine at work. You begin eating the first of the two bars, only to find yourself caught up in the gooey-caramel and cookie bliss.

You finish.

You reach for that second bar and WHAM!

You ate them so damn fast, you didn't even know you had already burned through them to relish it a second time.


Inside, we are all fat kids.

Thursday, May 1, 2008

Check this out...

I know I've written a lot about SliceHost in the last few weeks (they're pretty sweet). But I must hand it to Engine Yard...I recently wanted to check my uptime (I hadn't in quite a while as you will soon see) just to get a feel for the longevity of hosting a Rails app. So, without any further ado...

rex@ey00-s00289 ~ $ uptime
12:15:51 up 249 days, 9:24, 1 user, load average: 0.32, 2.00, 1.29


Not too shabby...

Sunday, April 27, 2008

thin, mongrel, evented mongrel and...Rodan?

I doubt I'll single-handedly spread the word about the caveats of using event-driven web servers (thin, evented mongrel), but I can at least give people Googling something that they may stumble upon while doing research. I want to keep it short and sweet.

If you're going to run an event-driven web server like thin or evented mongrel you have got to be careful about any requests that could run "long". File uploads, reports, and long atomic updates could leave your event chains blocked until they complete.

What this post is not...
1. It's not about Rodan, I'm just crazy and felt like putting that in the title; get over it.
2. It's not about why thin is better than mongrel or why mongrel is better than thin.

What this post is about weighing the options between these two great web servers so that you can make the right decision.

So, a couple things...
1. I use thin. And it is awesome. And I am lucky that I can use it on a site that has little "blips" for requests. So it hauls complete and utter ass.
2. I also use mongrel. And it too is awesome. And in this particular case, I DO have some long-running requests.

So what does it come down to - just educate yourself on the right tool for the right job. Don't jump ship on something just because it's the new, hip thing. I did just that when thin first started making ripples and then once site volume picked up, *poof* my requests sat in la-la land just waiting to be picked up. Anyone having flashbacks to when they were 13 waiting for their Mother to come pick them up from the mall?

I hate to jump around, but it's just how I write...I'm getting better[?]. Thin has support (oh and merb does too) to defer any long-running requests. So, as long as you're willing to configure thin and tell it which controler:action to defer to a threaded model you'll keep on servin' up those hoe-cakes just as fast as the surfer requests'em. WTF?

I should give the love here as to what triggered this post - the fine folks over at softies on rails had a quickie about thin and mongrel.
So please, weigh the differences - neither of these fantastic ruby-based servers should get any flame for under-achieving if you misuse them.

Related links...http://brainspl.at/articles/2008/04/18/deferred-requests-with-merb-ebb-and-thin
Strengthening the Ruby Ecosystem II: Merb

Saturday, April 26, 2008

osCommerce and PHP5

The splendid little e-commerce application that could[n't]: osCommerce is a bit quirky running on the "bleeding edge" of PHP[5]. Just as a quick heads up to you AND any would-be script-kiddies it requires that both of the following are enabled - just as a caution, anyone concerned about their sites well-being and knows anything about PHP configs should get a bucket:


register_globals = On
register_long_arrays = On


Everyone done dry-heaving? Good! I was absolutely beside myself when I saw what was required to run this application. It's been around for a few years now and it is shocking that they still operate with such disregard for online purchasing security AND performance.

So anyway, if you're seeing issues in your admin area to the tune of tep_href_link NONSSL or really anything related to tep_href_link and then some path (check your query string) it's likely you need to enable those bountiful long arrays.

*Insert drawn out sigh here*

Can't we all just shopify?!?!

Tuesday, April 22, 2008

Earth Day

Not a whole lot to blog about this morning, I did notice one thing. My commute to work today was noticeably shorter than normal, it appeared people actually car-pooled or found another means of transportation to get to work. I left significantly later in the morning rush traffic and just found it odd that parts of i40 were completely empty.

Or, it could just be a coincidence. Nothing more, nothing less...

That's all for now.

Sunday, April 20, 2008

So far so good; no, GREAT!

The other day I wrote about a hosting company that blew me away and I wasn't even a client of theirs. Well, I can now say that I'm the proud owner of two 256MB slices from SliceHost:

1. Gentoo running nginx and a soon-to-be-named rails application.
2. CentOS running a LAMP setup for a soon-to-be-name PHP application (actually, several).

First impressions were everything I had hoped they could have been. I'm about 3-4 years removed from any hardcore system administration. And the background I did have was with RedHat and FreeBSD. Thankfully the Linux community has gotten it right with package installers, making the halcyon days of system administration now uber!

Things learned...
I thought I'd run Feisty on the secondary slice...but, funk dat. I had always wanted to run Cent and heard great things about it and I can say, I really wish that I had installed it on my first slice. Gentoo on the other hand is fabulous for the lean and mean setup that I'm a fan of with web and database servers. Keep all the crap out (who really needs vi anyway?) and bring only what you need to survive.

Finally, I really need to emphasize just how deceptively fast a 256Mb slice is when you begin compiling and installing things like mysql, apache, ruby and imagemagick. What seems to have taken forever (even on my MacBook Pro) in the past, now, literally seemed to have taken a fraction of the time. I can't explain why exactly (grid computing for the win?) but quite frankly, I don't care (I really do - and if anyone can explain it via comments, go for it.) it's fast and I'm as happy as I thought I would be using these guys and their incredible service.

The two times I got stuck (on packages that seemed to exist yet weren't installing) a quick reference to the community pages on SliceHosts absolutely wonderful information repository got me back on track in no time.

Wednesday, April 16, 2008

Sliced Bread. Now, Sliced Hosting!

It slices it dices, it...well, no, it just hosts.

So here I am, not even a paying customer of this place and I'm already excited about using them based on some valid feedback and about 30 minutes of researching customers of theirs. For a project I'm consulting this seems to be an ideal move for what we need. I can add resources when need be, load-balance AND host multiple application platforms. I've got the control from the ground up without an insane price tag.

I mean for $20/month you have a pretty vast development machine which you can control the environment of. Now, granted I'm still trying to find the gap in the armor here, so I'm not going to say this is the greatest thing since sliced (sorry for the pun) bread but...when Engine Yard is floating around at $300/month (however, yes you basically have bought an IT-staff) this seems to be the best way to start out your idea and have a nice path for growth.

Anyway, props to Jason "my name is too easy to Google for" Bynum. for pointing me in their direction.