November 25, 2008

5 Ways to Scale Your Web Application

Writing web applications is a time consuming process, and when the application begins to get popular, it may not have been built to scale and handle volume. A great example of this is Twitter, a popular web 2.0 application that often has downtime. Here are some ways you can build your application with scaling in mind.

  1. If you can, build your application with scaling in mind from the ground up. Write tighter code, test it against perceived loads, and continually try to lower the amount of time and resource usage required to run the application.
  2. Build your application on cloud computing. Services like Amazon's Cloud computing service allow you to host your code, databases and files on their servers, and can scale instantly with your demand. It also saves you money in the long run, as you don't need to constantly plan to build new servers, database clusters and bandwidth.
  3. If you're not using cloud computing, try using a grid hosting company. These are companies that can give you instant access to more resources as soon as the demand rolls in. The difference primarily lies in the pricing – cloud computing companies charge based on actual usage, while grid hosting companies will charge based on the amount of "slices" you need to meet your requirements over a month.
  4. Optimize your databases and queries. If you're not a true expert in Databases, hire a freelancer to optimize your code. Correctly writing queries, caching queries that are run often, and correctly building the structure of your database can make or break a web application.
  5. Use reusable, well documented code. Try not to reinvent the wheel –find classes and functions that have already been proven in the field, and use them for the heavy lifting part of your projects. Use frameworks and coding methods that have already been proven, and don't try building a heavy use platform on new or untested code.

This is a guest post authored by Maya Richard, who writes on the topic of high speed internet. You can email her at with any feedback.

November 03, 2008

Mind Matters

I just heard the discourse by Swami Swaroopananda on "Mind Matters". Its an excellent speech as you can expect from the great master. Here is a snippet of his teaching. Please listen to the original discourse on CD if possible.

When matters matter, matters mind; When mind minds, matters don't matter.

If the body is unattended... it stinks! does'nt it? It needs daily bath, deos, etc...
What would happen if the mind is unattended. Mind is the real treasure, and the body is just a casing around it. So, Mind Matters!

Why is that we want anything that we want. In my case and most others, it starts with Education.
Why Education? To get a Job
Why Job? To earn Money
Why Money? To buy Things
Why things? To get Happiness!
Why Happiness? ? ? No answer. Thats final!

We only want something, so that we can finally be happy. Afterall, we are all seeking anything that can lead to happiness.
Education -> Job -> Money -> Luxury -> Happiness!
Music -> Melody -> Peace -> Happiness!

In this ever-changing world, can there be permanent happiness? As a child, we seem to be happy but cry all the time. As an adolescent, we live with a hope of happiness. Finally as adults, many sadly conclude that there is no happiness.

There cannot be ONE situation in life that can give happiness to everyone on the planet. So, When matters matter, matters mind.

Our wisdom gurus (rishis) have taught us the art of right contact of the mind with the world. Happiness and Joy does not depend on the objects and situations in the world, but it depends on the condition of our mind. So, When mind minds the mind, matters don't matter.

As our mind, so is the world.
The world we experience is according to the condition of our mind. If the mind is joyful, the world appears beautiful; If the mind is depressed, the world appears gloomy. You can compare it to perspectives of a man who has fallen in love, and the man who just got dumped.

Life is a series of experiences, and the whole world is a pair of opposites (Heat-Cold, Joy-Sorrow, Beauty-Ugly, etc). Even if sorrow comes, it is not permanent and it has to change. Nothing is permanent and everything changes. Whatever happens, consider it as the lord's wish and it happens for the best. If we can fine-tune our mind around this concept, we can have a positive perspective towards Life and stay happy all the time.

Attitude of our mind is very crucial. An optimist/realist will look out for opportunities, while a pessimist looks out for calamities. Everyone of us have a limited self image. When the mind decides that we cannot do something, we will not even try it. Only when we break the barriers in our mind, we can shoot for the stars.

Here is a famous joke. According to laws of aeronautics, flight is impossible for a bumble bee due to its huge body and tiny wings. However, the bumble bee does not know about this and continues to fly. Like the bumble bee, we should forget the constraints and "Just Do It". On a similar note, watch out for the movie YesIsTheNewNo by Jim Carrey.