Redis,CouchDB或Cassandra? [英] Redis, CouchDB or Cassandra?

查看:145
本文介绍了Redis,CouchDB或Cassandra?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

各种NoSQL数据库的优势和弱点是什么?



特别是,当Redis在多个服务器上分配写入负载时, 。是这样的情况吗?这是一个大问题吗?

解决方案

NoSQL数据库的优势和弱点和SQL数据库)高度取决于您的用例。对于非常大的项目,性能是王;但对于全新的项目或时间和金钱有限的项目,简单性和上市时间可能是最重要的。对于自我教学(扩大你的视野,成为一个更好,更有价值的程序员),也许最重要的是简单,坚实的基本概念。





一些优点和缺点,在我的头顶:




  • Redis

    • 非常简单的键值全域变数伺服器



    • 数据集必须适合内存
    • 未成熟的群集,未来的未来(我相信它会很棒,但尚未决定。)


  • Cassandra

    • 可以说是BigTable类数据库>

    • 支持map / reduce,适用于分析和数据仓库



    • 可调一致性/可用性

    • 无单点故障


    • CouchDB strong>

      • 实施最佳同步(复制)支持,支持主/从,主/主和更多异国情结的架构

      • HTTP协议,浏览器/应用程序可以直接与数据库部分或完全交互。 (同步也是通过HTTP进行的)

      • 经过简短的学习曲线,使用Javascript和map / reduce的复杂查询系统

      • 集群操作SPOF,可调谐一致性/可用性)目前是一个重要的分支(BigCouch)。

      • 类似地,集群和多数据中心在理论上是可能的(我提到的异国情调的东西),但是你必须自己编写所有的工具

      • 仅附加文件格式(数据库和索引)使用磁盘的速度惊人地快,您必须手动运行压缩(vacuuming),这会使数据库中的所有记录完全复制。每个索引文件都需要相同的。



    What are the strengths and weaknesses of the various NoSQL databases available?

    In particular, it seems like Redis is weak when it comes to distributing write load over multiple servers. Is that the case? Is it a big problem? How big does a service have to grow before that could be a significant problem?

    解决方案

    The strengths and weaknesses of the NoSQL databases (and also SQL databases) is highly dependent on your use case. For very large projects, performance is king; but for brand new projects, or projects where time and money are limited, simplicity and time-to-market are probably the most important. For teaching yourself (broadening your perspective, becoming a better, more valuable programmer), perhaps the most important thing is simple, solid fundamental concepts.

    What kind of project do you have in mind?

    Some strengths and weaknesses, off the top of my head:

    • Redis
      • Very simple key-value "global variable server"
      • Very simple (some would say "non-existent") query system
      • Easily the fastest in this list
      • Transactions
      • Data set must fit in memory
      • Immature clustering, with unclear future (I'm sure it'll be great, but it's not yet decided.)
    • Cassandra
      • Arguably the most community momentum of the BigTable-like databases
      • Probably the easiest of this list to manage in big/growing clusters
      • Support for map/reduce, good for analytics, data warehousing
      • MUlti-datacenter replication
      • Tunable consistency/availability
      • No single point of failure
      • You must know what queries you will run early in the project, to prepare the data shape and indexes
    • CouchDB
      • Hands-down the best sync (replication) support, supporting master/slave, master/master, and more exotic architectures
      • HTTP protocol, browsers/apps can interact directly with the DB partially or entirely. (Sync is also done over HTTP)
      • After a brief learning curve, pretty sophisticated query system using Javascript and map/reduce
      • Clustered operation (no SPOF, tunable consistency/availability) is currently a significant fork (BigCouch). It will probably merge into Couch but there is no roadmap.
      • Similarly, clustering and multi-datacenter are theoretically possible (the "exotic" thing I mentioned) however you must write all that tooling yourself at this time.
      • Append only file format (both databases and indexes) consumes disk surprisingly quickly, and you must manually run compaction (vacuuming) which makes a full copy of all records in the database. The same is required for each index file. Again, you have to be your own toolsmith.

    这篇关于Redis,CouchDB或Cassandra?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆