Apache Cassandra如何与Infinispan混搭? [英] How does Apache Cassandra mash with Infinispan?

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

问题描述

我已经检查了Cassandra和Infinispan的主要功能。它们似乎具有相似的特征和功能:

I have checked the main features of Cassandra and Infinispan. They seem to have and deliver pretty similar characteristics and functionalities:


  • NoSQL数据存储

  • persistance

  • 分散

  • 支持复制

  • / li>
  • MapReduce支持

  • 查询

  • NoSQL data store
  • persistance
  • decentralized
  • support replication
  • scalability
  • fault tolerant
  • MapReduce support
  • Queries

发现Infinispan不提供可调参数的一致性(每个节点都有相同的数据)。

One difference I have found out is that Infinispan does not provide tunable consistency (every node has the same data).

在学习Infinispan时,我遇到了Cassandra Cache Store =http://infinispan.org/docs/cachestores/cassandra/ =nofollow> http://infinispan.org/docs/cachestores/cassandra/ )。

When learning about the Infinispan I came across Cassandra Cache Store (http://infinispan.org/docs/cachestores/cassandra/). It provides persistance of data.

但是为什么我还是想使用Infinispan,而不是直接使用Cassandra?

But then why I would still want to use Infinispan and not Cassandra directly?

推荐答案

Infinispan主要用作分布式缓存,像memcached / hazelcast等等。
本地数据在内存中写入,但您可以将它们持久化到他们所谓的缓存存储区 - 有许多高速缓存存储器已准备就绪(对于文件/ Cassandra / Hbase / Mongo)或者你可以自己实现。

Infinispan is mainly used as a distributed cache, like memcached/hazelcast and so on. Natively data are written in memory but you can persist them into what they call "cache stores" -- there are many cache-stores ready (for File/Cassandra/Hbase/Mongo) or you can make your own implementation.


我发现一个区别是Infinispan不提供
可调一致性(每个节点都有相同的数据)。

One difference I have found out is that Infinispan does not provide tunable consistency (every node has the same data).

可调一致性和数据分布是两个不同的事情。 每个节点都有相同的数据不是真的,这取决于你如何选择集群数据。 Infinispan像其他一样,提供复制(所有节点存储相同的缓存)和分发(每个节点将负责一系列令牌)。 Cassandra中的可调一致性意味着您可以选择在将控制权返回给客户机之前,应该通知有多少个节点通知您的r / w操作。

Tunable consistency and data distribution are two different things. It's not true that "every node has the same data", it depends on how you choose to cluster data. Infinispan, like others, offers both replication (all nodes stores same cache) and distribution (each node will be responsible for a range of tokens). Tunable consistency in Cassandra means that you can choose how many nodes should be informed about your r/w operation before returning the control to the client.

您可能需要使用Infinispan而不是Cassandra直接由于许多原因。例如,如果您的应用程序服务器中有大量内存,并且希望保存比Cassandra节点内可存储的更大/不同的缓存。您可能需要的其他功能是插入infinispan查询模块为了执行全文搜索,而不安装solr / elasticsearch /任何集群或使用内的事务功能。

You might need to use Infinispan and not Cassandra directly for many reasons. If for instance you have huge amount of memory in your application servers and you want keep a bigger/different cache than what you can store inside your Cassandra nodes. Other feature you might need is to plug the infinispan-query module in order to perform full-text searches without installing a solr/elasticsearch/whatever cluster or use the transactional capability within is.

IMHO这两个产品不直接比较,他们出生不同的用例,并提供不同的功能。您可以使用任何一个或两者,取决于您的应用程序架构和需求。

IMHO these two products does not compare directly, they're born for different use cases and offers different features. You can use any, one or both, depend on what's your application architecture and needs.

HTH,
Carlo

HTH, Carlo

这篇关于Apache Cassandra如何与Infinispan混搭?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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