Wednesday, June 17, 2009
It's up!
I have to give a shout out to my man Shahmir. I was working on this new django base blog and was having trouble financing a location. My man Shahmir was like...
Dude, I got this box you see? Let me make you a VM real quick. How many megs you want? Here's a dedicated IP! Do you want the new Debian on this thing?
Less then 10 minutes later I'm loging into my new dedicated VM installing Django and Apache.
Thanks Man!
On a side note this is a first draft of this application, next on the list are tags, rss and atom feeds, Flickr, Twitter and Facebook integration. I might even get around to intagrating Google calender and Google Reader feeds. How cool would that be?
Wednesday, May 6, 2009
Amazon's EC2. How Cost Effective is it?
I began looking into EC2 to find out if it could be used for a personal website. I wanted to create a common programmers testbed, to hold a subversion repository, a blog, and to have a place to show case some of my work. I found that, quit bluntly, EC2 is expensive! I also found that EC2 could not just save my clients(read employer) money, but it could put money directly into there pockets.
When I looked at the service from a single instance perspective I was floored at the prices. The cost of running one server for one year is comparable to running a managed hosting server for a year. In fact EC2 cost more, because I do not get unlimited bandwidth like I could with the managed hosting server. This made me sad as It would cost more money just to be able to say that, "My blog runs in the Cloud!"
I then figured out that I was asking the wrong question. The question is not, "How Cost Effective is EC2?," the question is, "When is EC2 Cost Effective?." The answer is one of the most incredible and simple things I have ever come across.
EC2 is Cost Effective When You Have the Need for More Then One Computer to do a Single Task. What does that mean? That means that when you have need for Clustering or Load Balancing, EC2 puts money in your pocket.
We have already talked about how each computer spawned in the cloud cost more then each computer booted in the real world over time. Now, I want to talk about how we can make the difference between a physical computer and virtual computer into real money. Lets say, you have a large web site. This site is currently running on two computers. The first is a web server and the second is the database server. Both of these servers are running 24 hours a day 7 days a week. One day your IT guy comes in and tells you that the database server has been running with a high load for a while now and last night it peaked and crashed. You need a load balancer. In the physical world when you add a load balancer you have just gone from two servers to 4 servers. One web server, one load balancer, and two database servers. However, with some nifty scripts in the virtual world(read EC2) you have only added one server, the load balancer. The fourth server, one of the database servers, does not need to be run 24 hours a day 7 days a week. In fact in may only need to be run during the peak hours on the peak months of the year. This equals money. For this small situation your saving is just short the cost of an entire server for a whole year.
You see, on EC2 you can run a script on the load balancer that monitors how many connections it is getting over a period of time. With that number gets high it asked EC2 to spawn a new database server to balance instantly. If the load gets to high again it could even spawn more. Then once the load starts to drop. The load balancer could destroy the extra servers until it only has one again. The higher the ratio between the number of servers needed during peak hours and the number of servers needed during non-peak hour, the bigger the savings.
Although, no numbers have been run yet, there may even be a way to reduce another one of the servers during non-peak hours by combining the use of a shared network storage device like Amazons S3.
Harmon Wood
Special thanks to Matt York and Corban Johnson for letting me blatantly steal some of your ideas and call them mine ;)
Tuesday, April 28, 2009
A note to docs guy over at lighttpd.net
Check out the last paragraph of this section!
Dear Documentation Writer,
Here are some useful things that can NOT be done with a blog.
1) Change a flat tire
2) Clean the dishes
3) Put on your shoes
4) Start your car
5) .....
Seriously dude? The rest of the documentation was spot on and very helpful, I just thought that telling what I could not do in such detail was a little bit duchy. Proposing a way to get around it was actually helpful. I guess I have nothing against you or what you write. I'm just frustrated at the way I interacted with the information.
I'm skimming through the docs and see:
var.not_sure_if_it_exists == undefined { ... set to default value ... }
I get all exited. YES! That's what I want to do!!!....."# testing if a variable has been set is NOT possible" ..... ahhhhhhhhh, Sigh*.
Peace
Tuesday, February 10, 2009
Sha1 and md5 password hashing from the cli
I have some bash functions I wrote yesterday that could help everyday password hashing.
function sha1(){
echo -n "$1" | sha1sum | sed "s/ -$//g"
}
function md5(){
echo -n "$1" | md5sum | sed "s/ -$//g"
}
just add those lines to your .bashrc file and re-source it.
# source .bashrc
Sunday, December 28, 2008
The existential discussion of my work
It seems lately that I have had a lack of project motivation outside of my "9 to 5." I feel that I should explain.
I have always had a strong motivation to build and create things. Not everything that I have built or created has made money, but some of it has, and that was always a bonus. I just love building things.
A couple of days ago I had some free time on my hands. So, In my boredom I sat down to work on a small Django project I had started about a month ago. Like many of my projects I have started in the last year or so, I began to feel like I was forcing it. I felt like I was making myself write this web application instead of wanting to write it.
I have begun to wander why. Why, is there no passion left in my personal work? Why do I have some many projects I have not finished. Why do I feel a need to have these projects if I don't actully feel like doing them? Is there a good reason for this or is it just time to move on to something new? If I need to move on to something new, What is it?
I have always had a passion for understanding the brain on a hardware level. Mabie I should prosue that for a while. I have also loved the idea of nano bots. Perhaps I should go back to school and study current nano tech.
Mabie I need just need to find my modivation for my personal projects agian. I mean, I still have modivation at work. I sit down at the computer and code like crazy, it's eazy and fun. But, when I get home, after I've put my son to bed, and have spent some time with my wife. I sit down at the computer and there's nothing.