Pages

Monday, February 17, 2014

How to choose right technology for building scalable software

I am member of a mailing list around start-ups and entrepreneurship in India. The group has some experienced entrepreneurs as members and the mailing list is always flowing with lot of good conversation and advice all the time. Recently someone asked what technology should they be using to build their next software. They wanted scalability and performance built into the software from day one and wanted right programming framework for the job. Some people responded suggesting to use PHP or Java. These suggestions mostly came from their experience of building software which is understandable.

My thoughts on this area are quite different and I responded to the thread. I feel I should share the response with my readers here.

I am a bit surprised on the answered being offered so far. I understand tendency to suggest technology that you have used or you love. But programming language/technology/platform do not offer a ready made formula for performance and scalability. I am a .NET developer and have worked on software that both scaled well and faltered. 

Think of this - Twitter uses Ruby (RoR to be specific) and at one point of time, they determined that Ruby does not scale. What was that point? That point was when more than 12 million tweets went through their networks in a span of one hour when results on US elections were being declared. This point came for twitter after being in business for more than 8 years. Till that time they were quite happy with Ruby. 

Facebook started with plain PHP and did well when user base was well below few millions. Eventually they found out problems with PHP and went on to transport their PHP code into C++. I have even heard that they have built their own PHP implementation.

Examples can go on. But one common theme across all these companies is that they do not use one technology or platform to build their services. They wisely choose tools/technologies based on lot of factors like rate at which they are growing, usage patterns, architecture of their product, latest research and lot more. 

With above background, I would summarize with following

1. Do not rely on a particular technology to offer scalability/performance. It is a carefully designed software combined with carefully designed hardware infrastructure that delivers the scalability and performance and not a programming language
2. Start with a programming language that you know or you think is easy to hire best people knowing that technology. For founders of start-ups it is best to know some programming in the beginning
3. Build the product, launch it and see how it goes. If you are a hit then you would have lot of cash to look back at your initial implementation and make changes where needed
4. Be open to using more than one programming language/technology (this is called polyglot programming)
5. Keep an eye on new frameworks/libraries and assess how you can benefit from them
6. Follow practices like TDD along with Agile that puts you in a position to make major changes to your code-base cheaply and in least amount of time
Building software that scales is more of an art. It takes various iterations of fine tuning and swiping in and out various pieces of code to see what works and what does not. There are example of high performing websites built using almost every web technology exists under the sun. The reason they scale is because they use the right technology at the right layer along with aids like CSS/Javascript minification, caching wherever possible, following correct HTTP semantics, building services in a way that minimizes chattiness etc. There is no "one programming language" solution to the problem and the solution does not come out by following a particular style of coding.

2 comments: