Home Database Mysql Tutorial 开篇有益:为什么选择MongoDB?

开篇有益:为什么选择MongoDB?

Jun 07, 2016 pm 05:38 PM
mongodb Why choose

开篇有益:为什么选择MongoDB? 为啥用MongoDB? 赶NoSQL时髦? Auto-shard等激动人心的特性? No! 08年,还都是浮云。 最初的想法是寻找一个可靠的分布式K/V解决MySQL的问题。 NoSQL(NoSQL = Not Only SQL ),意即反SQL运动,是一项全新的数据库革命性运动,早

开篇有益:为什么选择MongoDB?

为啥用MongoDB?

赶NoSQL时髦?
Auto-shard等激动人心的特性?
•No! 08年,还都是浮云。
最初的想法是寻找一个可靠的分布式K/V解决MySQL的问题。

NoSQL(NoSQL = Not Only SQL ),意即反SQL运动,是一项全新的数据库革命性运动,早期就有人提出,发展至2009年趋势越发高涨。NoSQL的拥护者们提倡运用非关系型的数据存储,相对于目前铺天盖地的关系型数据库运用,这一概念无疑是一种全新的思维的注入。

所以说,NoSQL不仅仅是产品,更是一项运动!

原来的架构

image_thumb[24]

•MySQL(Percona),,

Master-Master-Slaves

•HA:MMM

新需求 如何解决?

原有MySQL的方案:

  • 使用文本字段,JSON存储
  • schema自由度高
  • 更新容易,直接检索困难
  • 使用关联表
  • schema自由度有限,类型控制
  • 更新频繁,query缓存失效
  • 新思路

    image_thumb[23]

    继续使用Memcached?

  • 缓存失效,内存不足
  • 决定:寻找Memcached替代品

  • 能够持久化的分布式KV
  • 选型条件 一些候选者

  • 最初的选择

    选中Flare:

  • 内置cluster看起来很美好,可靠性有保
  • 使用Memcached协议,现有改动小
  • 代价

    项目开发1个月后:

  • 官方更新显示似乎并非如此可靠
  • 水土不服:
  •    (1)个人能力有限,无法解决一些灵异事件

       (2)没有开发者社区

       (3)不懂日文

    新的候选者
  • Cassandra:技术实力无法支撑,用不起
  • CouchDB:灵活,但性能口碑似乎不佳
  • 重新选择

    MongoDB:

    胆子大一点

    MySQL +MongoDB?

  • 多余:很多MySQL的操作MongoDB均
    可实现
  • 同时维护MySQL MongoDB 的数
    据,代码逻辑有些复杂
  • 人员流失,培训新人表示鸭梨大
  • 胆子再大一点

    能否彻底抛弃MySQL?

    胆子再更大一点

    好吧,试试:

    MongoDB,就是它了

    一举两得的加分项:GridFS

  • 简单,符合我们的要求
  • 无需再考虑分布文件系统
  • 放弃了原来的MogileFS,减轻运维压
  • 综上原因,选对了!

  • SourceForge等一些大站应用增强信心
  • 分享的信息逐渐丰富
  • 10gen核心团队在mailing-list快速响应,
    有问必答
  • NoSQL开始受到追捧,MongoDB的口
    碑良好
  • 本文参收集网络资料整理,作为我选择MongoDB的一个参考。

     

    posted on

    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

    Hot AI Tools

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Clothoff.io

    Clothoff.io

    AI clothes remover

    AI Hentai Generator

    AI Hentai Generator

    Generate AI Hentai for free.

    Hot Article

    R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
    2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
    Hello Kitty Island Adventure: How To Get Giant Seeds
    1 months ago By 尊渡假赌尊渡假赌尊渡假赌
    Two Point Museum: All Exhibits And Where To Find Them
    1 months ago By 尊渡假赌尊渡假赌尊渡假赌

    Hot Tools

    Notepad++7.3.1

    Notepad++7.3.1

    Easy-to-use and free code editor

    SublimeText3 Chinese version

    SublimeText3 Chinese version

    Chinese version, very easy to use

    Zend Studio 13.0.1

    Zend Studio 13.0.1

    Powerful PHP integrated development environment

    Dreamweaver CS6

    Dreamweaver CS6

    Visual web development tools

    SublimeText3 Mac version

    SublimeText3 Mac version

    God-level code editing software (SublimeText3)

    Is the conversion speed fast when converting XML to PDF on mobile phone? Is the conversion speed fast when converting XML to PDF on mobile phone? Apr 02, 2025 pm 10:09 PM

    The speed of mobile XML to PDF depends on the following factors: the complexity of XML structure. Mobile hardware configuration conversion method (library, algorithm) code quality optimization methods (select efficient libraries, optimize algorithms, cache data, and utilize multi-threading). Overall, there is no absolute answer and it needs to be optimized according to the specific situation.

    xml online formatting xml online formatting Apr 02, 2025 pm 10:06 PM

    XML Online Format Tools automatically organizes messy XML code into easy-to-read and maintain formats. By parsing the syntax tree of XML and applying formatting rules, these tools optimize the structure of the code, enhancing its maintainability and teamwork efficiency.

    Why do all values ​​become the last element when using for range in Go language to traverse slices and store maps? Why do all values ​​become the last element when using for range in Go language to traverse slices and store maps? Apr 02, 2025 pm 04:09 PM

    Why does map iteration in Go cause all values ​​to become the last element? In Go language, when faced with some interview questions, you often encounter maps...

    Does XML modification require programming? Does XML modification require programming? Apr 02, 2025 pm 06:51 PM

    Modifying XML content requires programming, because it requires accurate finding of the target nodes to add, delete, modify and check. The programming language has corresponding libraries to process XML and provides APIs to perform safe, efficient and controllable operations like operating databases.

    What is the priority of C language !x? What is the priority of C language !x? Apr 03, 2025 pm 02:06 PM

    The logical non-operator (!) has the priority next to parentheses, which means that in expressions, it will precede most other operators. Understanding priority not only requires rote memorization, but more importantly, understanding the logic and potential pitfalls behind it to avoid undetectable errors in complex expressions. Adding brackets can clarify expression intent, improve code clarity and maintainability, and prevent unexpected behavior.

    Why does the code using locks in Go occasionally lead to panic? Why does the code using locks in Go occasionally lead to panic? Apr 02, 2025 pm 04:36 PM

    Why does using locks cause panic occasionally? Let's take a look at an interesting question: Why in Go, even if locks are added in the code, sometimes...

    Best practices for C language default Best practices for C language default Apr 03, 2025 pm 03:48 PM

    The best practices of default in C language: place it at the end of the switch statement as the default processing for unmatched values; it is used to handle unknown or invalid values ​​to improve program robustness; avoid duplication with case branches to maintain conciseness; comment clearly on the purpose of the default branch to improve readability; avoid using multiple defaults in one case to maintain clarity; keep the default branch concise and avoid complex operations; consider using enumeration values ​​as case conditions to improve maintainability; in large switch statements, use multiple default branches to handle different situations.

    Front-end FileReader file reading: Why do you need to instantiate first and then read? Front-end FileReader file reading: Why do you need to instantiate first and then read? Apr 04, 2025 pm 01:48 PM

    Regarding FileReader instantiation and file reading In front-end development, we often need to process files uploaded by users. use

    See all articles