Learn to stop using shiny new things and love MySQL
They have awesome new ideas with down-to-earth technical requirements, so I kept wondering why they choose this shiny (and risky) new stuff when all they need is a good ol’ trustworthy database. I think it’s because many assume that building the latest and greatest needs the latest and greatest! 人们通常认为实现最新需求就要用最新技术
It turns out that’s only one of three bad reasons (traps) why people go for the shiny and new. Reason two is people mistakenly assume older stuff is slow, not feature rich or won’t scale. “MySQL is sluggish,” they say. “Java is slow,” I’ve heard. “Python won’t scale,” they claim. None of it’s true. 第二个原因则是因为他们错误地认为旧技术已经完全过时淘汰了。
The third reason people go for shiny is because older tech isn’t advertised as aggressively as newer tech. The younger companies needs to differentiate from the old guard and be bolder, more passionate and promise to fulfill your wildest dreams. But most new tech sales pitches aren’t generally forthright about their many failure modes. 第三个原因则是新技术为了能够表现突出,在宣传上比旧技术要投入更多,然而他们对自己许多失败(落后)之处却避而不谈。
Through the gauntlet, two of the most important lessons I learned building Pinterest were: (不要过早地瞎JB折腾,还是选择简单实在一些的技术吧!)
- Don’t be the biggest. If you’re the biggest user of a technology, your challenges will be greatly amplified.
- Keep it simple. No matter what technology you’re using, it will fail.
To help guide us and our choices, we built a set of questions to apply to every different technology: (如何做技术产品的选型)
- *Does the technology meet your needs?*Solidify your requirements. Do you need simple lookups, ordered lookups and/or lookup by geography? Graph walking? One technology may not be able to support all of your requirements, but it’s nice when it does. (一些requirement其实是可以取舍的)
- *How well does it scale? *Some technology is designed for massive scale and some is not. You may have to layer a little scale magic on top. With scale comes more complexity and less agility. Keep that in mind, and avoid scaling prematurely. (可扩展性问题)
- *Is the cost justified?*Consider the support contract or licensing and whether or not you can get by without a support contract. If you’re an angel funded startup, ideally you’d like to spend your money on the lights and Ramen, and not on a mainframe.(成本是否合适)
- *How mature is the technology?*Maturity of a product is the most important question you can ask next to basic requirements. This is where I’ll spend the lion share of this post.(产品成熟度. 在招聘,社区,运维上都有好处)
If you’re starting or growing a company, and your scale is smaller than huge, consider maturity to be your most important factor aside from basic requirements. Ask yourself — does MySQL sufficiently meet my needs? If so, use it. If you’re wondering if MySQL will be fast enough, the answer is YES. Even better than fast, MySQL’s performance will be consistent.
So I’ve wailed away on a bunch of technologies, but I seem to have a near-romantic thing for MySQL. I’d like to take a moment to mention that MySQL, while mature, does not solve all your problems. Sometimes you’ll have to venture away from the comforting warming glow of maturity.(还有一些问题是MySQL搞不定的,这时候你就必须选择离开社区,去寻找其他解决方案了)
- Cartesian Distance 基于距离检索. 二维三维可以用Geohashes. 高维度的话就得自己动手了
- Speed of writes 写入速度. HBase, C*
- FIFOs, such as feeds 考虑一下Redis
- Logs 考虑一下Kafka
- Scale beyond one box