If you were looking at writing scalable, self-healing web application, you could have used Java or Erlang. Also Scala came out 2003. PHP is a really crappy choice for a webapp that needs to scale. PHP doesn't have threads, is synchronous and doesn't perform very well when it comes to CPU heavy tasks. But where it is awesome is whipping up small scripts for websites. That's what it was originally meant for.FB would be the single biggest user of anything they use and would indefinitely but pushing far beyond the limits of any choice they made.
I'm honestly curious what was the significantly better choice back in 04-05? I know some of the other choices, but what was so far beyond their choice that makes their choice silly?
The choice of language greatly influences the architecture of a program.
And for the database. Well the choice to put graph data to MySQL was a really, really dumb one. You can do it and it will work but you will later on pay for that decision with having to buy beefy servers because your queries has a lot of JOINs and UNIONs. Just the basic edge finding in social graph with MySQL is very expensive operation. MySQL is great for transactions that are well-defined and always need to be guaranteed to be processed, like for example financial data. I don't remember on top of my head which graph databases were available back then but the truth is that not very many compared to nowadays. Graph database is not an new idea so there still must have been some choices.
I think that Suckerberg chose the most popular stack, kinda like choosing Apache nowadays and went with that. Frankly, in Facebook's case it doesn't matter. They were able to overcome it BUT these kind of decisions and lack of knowledge can break a company. I have witnessed one aspiring analytics company go down because they designed their product with PHP & MySQL.. Sounds a working plan until you get your first BIG customer pumping up so much data that your MySQL server can't take it. Now you need to be able to scale your system but the problem with MySQL is that it scales only up meaning that you need a bigger, more expensive server and it wasn't meant for writing data, it was designed to provide fast queries. Now what happened when this analytics company realized this? They didn't have the capital to write everything all over again so they had to radically change their business plan and at least for the while, dump their visions of getting rich.
Every time you use FB as an example, remember that it is a unique company in many ways. They got incredibly lucky in with Suckerberg's gambles and in many cases they just happened to be able to get the right person to fix the platform. Now imagine all the companies that made the same choices and didn't get so lucky...
Dislike ads? Become a Fastlane member:
Subscribe today and surround yourself with winners and millionaire mentors, not those broke friends who only want to drink beer and play video games. :-)
Membership Required: Upgrade to Expose Nearly 1,000,000 Posts
Ready to Unleash the Millionaire Entrepreneur in You?
Become a member of the Fastlane Forum, the private community founded by best-selling author and multi-millionaire entrepreneur MJ DeMarco. Since 2007, MJ DeMarco has poured his heart and soul into the Fastlane Forum, helping entrepreneurs reclaim their time, win their financial freedom, and live their best life.
With more than 39,000 posts packed with insights, strategies, and advice, you’re not just a member—you’re stepping into MJ’s inner-circle, a place where you’ll never be left alone.
Become a member and gain immediate access to...
- Active Community: Ever join a community only to find it DEAD? Not at Fastlane! As you can see from our home page, life-changing content is posted dozens of times daily.
- Exclusive Insights: Direct access to MJ DeMarco’s daily contributions and wisdom.
- Powerful Networking Opportunities: Connect with a diverse group of successful entrepreneurs who can offer mentorship, collaboration, and opportunities.
- Proven Strategies: Learn from the best in the business, with actionable advice and strategies that can accelerate your success.
"You are the average of the five people you surround yourself with the most..."
Who are you surrounding yourself with? Surround yourself with millionaire success. Join Fastlane today!
Join Today