Welcome to Ask Away where I answer some of the questions sent to me or found on the web. Today’s question comes from a comment on one of my Reddit threads that I answered recently about language selection for high performance:
NakedHowler: I’m thinking about creating an app that hopefully one day will have tons of people using it. My problem is should I learn Python and Django or just stick with PHP and advance further to learn Laravel? I want this app to be like Instagram, or something like imgur but better.
wat do ?
When talking about scaling at that level, the real discussion is on server architecture, not programming language. Programming language performance differences at that point are trivial compared to the massive amount of processing and storage needs you’ll run into. You’ll need to worry about spinning up multiple servers with multiple databases, not the fact that with this language you’d only need 20 servers but with this other language you’ll need 21.
So if you know PHP (and yes, learn Laravel or a similar framework), go with it. In fact, imgur is built with PHP, Wikipedia is built with PHP and even Facebook is built with PHP and they don’t crash and burn from heavy usage. (Not to poke too much fun, but reddit does crash and burn from time to time and it’s written in Python.) Facebook has also released their custom runtime for PHP called HHVM that really speeds up PHP execution times, a big advance in the language.
At some point it will probably make sense to write some of the complex image processing code in a functional language like Scala or Erlang, but I would even recommend you not worry about that now. You’ll get to that when the time comes.
In the end, if large applications like Twitter and Basecamp can get Rails to scale (one of the slowest languages in most benchmark tests) then picking a language is not the important part of scaling an app up to a large amount of users.
So stick with what you know if you like it. If you’d rather learn Python, go for it. In the end, it won’t matter. Every popular language has a big website using it and you’ll be able to get it working too.