elasticsearch和gem redis search的区别

利用ElasticSearch和Redis检索和存储十亿信息-五星文库
免费文档下载
利用ElasticSearch和Redis检索和存储十亿信息
导读:利用ElasticSearch和Redis检索和存储十亿信息如果从企业应用的生存,选择企业团队信息作为主要业务,12亿的信息存储意味着他们现在每隔几个月的信息发送、存储和索引量都会翻一番,比如他们如何及时索引和搜索十亿信息,在负载下索引和存储信息,丢失信息是一个艰巨的挑战,?每秒60条消息12亿文档存储4TB的EBSRAID在AWS上8个Elastic,占用大部分流量的并不是聊天信息,而是状态
利用ElasticSearch和Redis检索和存储十亿信息 如果从企业应用的生存率来看,选择企业团队信息作为主要业务,HipChat的起点绝非主流;但是如果从赚钱的角度上看,企业市场的高收益确实值得任何公司追逐,这也正是像JIRA和Confluence这样的智能工具制造商Atlassian于2012年收购HipChat的原因。
同时,或许你不知道的是,在Atlassian资源和人脉的帮助下,HipChat已经进入了一个指数增长周期。12亿的信息存储意味着他们现在每隔几个月的信息发送、存储和索引量都会翻一番。
如此快速的增长给曾经充足的基础设施带来了很大的压力,HipChat给我们展示了一个通用的扩展思路。从简单开始,经历流量高峰,然后思考现在怎么办?使用更大的计算机通常是第一个和最好的答案,他们也是这样做的。这给了他们一些喘息空间去考虑下一步怎么做。在AWS上,在某一个拐点之后,你开始走向云特性,也就是横向扩展,这就是HipChat所做的事情。
然而HipChat的发展也并未是顺风顺水,安全性的担忧推动了HipChat的云(SaaS)版本之外内部部署版本的发展。
即使HipChat没有谷歌那么大规模,我们仍能从中学到好东西,比如他们如何及时索引和搜索十亿信息,这也是IRC之类和HipChat之间的关键区别。在负载下索引和存储信息,丢失信息是一个艰巨的挑战。
这是HipChat选择的路,我们一起展开……
? 每秒60条消息 12亿文档存储 4TB的EBS RAID 在AWS上8个ElasticSearch服务器 26个前端代理服务器,是后端应用服务器的一倍 18个人 0.5TB的搜索数据
? 主机:AWS EC2 East上的75个实例全部使用Ubuntu 12.04 LTS
数据库:目前用于聊天记录的CouchDB,过渡到ElasticSearch。MySQL-RDS用
于其它的一切
? 缓存:Redis 搜索:ElasticSearch 队列/Worker 服务器:Gearman(队列),Curler(Worker) 语言:Twisted Python(XMPP Server)和PHP(Web前端) 系统配置:开源Chef+Fabric 代码部署:Capistrano 监控:Sensu和monit将警告抽送至Pagerduty 图:statsd + Graphite
产品 ? 流量突发。在周末和假期将是安静的。在高峰负荷期间每秒有几百个请求。实际上
占用大部分流量的并不是聊天信息,而是状态信息(away、idle、available),人们连接/断开等。因此每秒60条消息似乎很少,但是它只是一个平均水平。
? 通知中心HipChat,在这里与团队合作,并得到来自工具和其他系统的所有信息。
有助于使每个人都在消息圈内,特别是远程办公。
使用HipChat而不是IRC之类,很大的原因是HipChat存储和索引每一次对话,以便你以后搜索它们。强调搜索,这个特性的好处是你可以在任何时候做回溯,了解发生了什么和同意了什么。如果在发送一条信息时,你的设备无法访问,它也会将消息路由到同一个用户的多台设备中,并做临时消息缓存/重试。 ?
? 更多的用户带来更快的增长,他们在各个方面使用产品而带来的更多预定,也可以
从他们的API集成中看到增长。
存储和搜索信息是系统中主要的可扩展性瓶颈。
HipChat使用XMPP协议,因此任何XMPP客户端都可以连接到系统中,这点非常有利于采用。他们已经建立了自己的本地客户端(Window、Linux、Mac、iOS、Android),并带有类似PDF浏览、自定义表情符号、自动用户注册等扩展。 ? ?
? 在以前,将Wiki这样的工具引入到企业文化是几乎不可能的。现在,企业级的工具
多已在企业落脚,这是为什么?
? 基于文本通信已被广泛接受。我们有短信、IM和Skype的形式,所以现在使用聊
天工具是自然的事情。
异地工作模式的崛起。团队越来越分散,我们不能只是坐在一起进行一个讲座,一切文档化的需要意味着组织通信将有一笔巨大的财富。
增强的功能。把像内嵌图片、GIF动画等功能做得生动有趣,会吸引更广泛的群体。 HipChat有一个API,这使得它可以编写类似IRC bots这样的工具。例如使用? ? ?
Bitbucket提交――在10:08开发者X提交一些代码来修复一个漏洞。代码发送通过HipChat直接连接到代码提交和提交日志,完全的自动化。Bitbucket提交会击中一个web hook,并使用一个addons来张贴信息。Addons帮助编写bots,转入你的Bitbucket账户。比如我有我的API令牌,我想在每次提交发生时张贴到这个API上,工作原理类似GitHub。
? 在客户端Adobe Air启动时,内存泄露会导致宕机,因此将其移动到本地应用上。
这是个麻烦,也是机遇。同一个公司中都存在许多跨平台跨部门的用户,你需要站在用户的角度思考。希望用户在所有的系统中都有很好的体验,用户不仅仅是技术人员。 XMPP服务器架构 ? HipChat是基于XMPP协议的,XMPP节里的内容就是消息,可能是一行文本或者
日志输出的长段等等。他们不想谈论自己的XMPP架构,所以没有很多的细节。
他们没有使用第三方的XMPP服务器,而是利用Twisted Python和XMPP库建立了自己的服务器。这使得可以创建一个可扩展的后端、用户管理,并轻松的添加功能而不用在其它代码库上修改。 ?
? AWS上的RDS用于用户身份验证和其它使用事务及SQL的地方。这是一个稳定、
成熟的技术。对于内部部署的产品,则使用MariaDB。
Redis用于缓存。信息,如哪些用户在哪些房间,状态信息,谁在线等都是信息。所以,你连接的是哪个XMPP服务器并不重要,XMPP服务器本身并不是一个限制。 ? ? 痛点是Redis(还)没有集群,因此使用了高可用性的hot/cold模式,所以,一个
从属节点已经准备就绪。故障转移从主节点到从属节点大概需要7分钟,从属节点的发布是手动的,不是自动的。
? 提高负载可以发现代理服务器中的弱点所在,也可以清楚能支撑多少个客户端。 这是一个真正的问题,正如不丢失信息是一个很大的优势。显而易见,不丢失信息
比低延迟更重要――用户更愿意晚点接收信息,而不是根本没有信息。
? 使用6个XMPP服务器系统运作良好,然而随着连接点的增加,他们开始看到不可
接受的延迟。连接不仅来自客户端,还来自bots支持他们的程序设计界面。
在第一遍的时候,他们分离出前端服务器和应用服务器。代理服务器处理连接,后端应用程序处理的stanza。前端服务器数量由有效收听客户数量驱动,而不是由信息发送数量驱动。保持那么多的连接打开,同时提供及时的服务是一个挑战。 ? ? 修复数据存储问题之后的计划是调查如何优化连接管理。Twisted的效果很好,但
是他们有很多的连接,所以必须弄清楚如何更好地处理这些连接。
? 向HipChat发送的消息已达10亿条,同时还在不停增长,他们将CouchDB和
Lucene对存储和搜索信息的解决方案推向极限。
? 认为Redis将会是故障点,而Couch/Lucene会足够好。没有做合适的容量计划和
查看信息增长率。增长速度比他们想象的更快,不应该集中那么多精力在Redis上,而应该专注于数据存储。
? 当时他们相信通过增加容量来扩展,向上移动到越来越大的亚马逊实例。他们发现
一点,随着不断地增长,他们利用这种方法只能再工作两个月。所以,他们不得不采用其他的办法。
? Couch/Lucene超过一年没有更新,它不能做分类。这是采用其他办法的另一个原
在亚马逊上大约10亿消息的一半是一个临界点。用一个专用的服务器和200G的?
RAM,他们之前的架构可能仍能工作,但在有限资源的云上就不能工作了。 ?
? 他们想留在亚马逊。 喜欢AWS的灵活性,性能的添加只需要通过租用实例完成。 亚马逊的片状。不要把你所有的鸡蛋都放到一个篮子里,如果一个节点出现故障,
你必须要处理它,否则一些用户将会失去流量。
? 使用动态模型。可以快速关闭一个实例,并带来新的实例。云原生类型的东西。可
以随时关闭节点。关闭一个Redis主节点,可以在5分钟内恢复。目前美国东岸分割4个可用地区,但是还没有多区域。
? EBS只让你拥有1TB的数据。在遇到之前,他们并不知道这个限制。使用Couch
时他们遇到了EBS磁盘大小限制。HipChat的数据是0.5TB。为了压缩,Couch必须将数据复制到有双倍容量的压缩文件中。2TB的RAID在周末压缩过程中遇到了限制,不想使用RAID解决方案。
? 不选择亚马逊的DynamoDB,因为他们创建了一个HipChat服务器,在防火墙后面
的托管服务。
? HipChat服务器驱动技术堆栈的决定。私人版是建立在自己主机上的解决方案。某
些客户不能使用云/SaaS解决方案,比如银行和金融机构,国家安全局已经吓坏了国际客户,因此聘请了两名工程师创建产品的安装版本。
? Redis集群可以自托管,也可以像ElasticSearch那样工作在AWS上。在内部部署
版本中他们使用MariaDB,而不是RDS。
不能考虑一个完整的SaaS解决方案,因为那会是一个锁定。
现在过渡到ElasticSearch
移动到ElasticSearch作为他们的存储和搜索后端,因为它可以储存他们的所有数据,它是高度可用的,它可以通过简单增加更多的节进行扩展,它是多用户的,它可以通过分区和复制透明的处理节点损失,并且它建立在Lucene之上。 ? ? ? ? 并不真的需要一个MapReduce功能。看着BigCouch和Riak的搜索(表现一般),
但ES在GET上的表现是相当不错的。喜欢坏了就扔,省去了故障检测。 ES HA已令他们在系统的坚固性上感到非常有信心。
? Lucene的兼容是一个巨大的胜利,因为所有的查询都已经兼容Lucene,因此它是
一个自然的迁移路径。
客户数据是相当多样的,从聊天记录到图像响应类型的差别也随处可见,他们需要能够快速地直接从12亿文档中查询数据。
此举正变得越来越普遍,HipChat也使用ElasticSearch作为他们的key-value存储,减少需要数据库系统的数量,从而降低整体的复杂性。既然性能和响应时间都不错,那完全没有不用的理由。 10ms到100ms的响应时间。在没有任何缓存的情况下,某些领域仍然超过Couch。那为什么还要用多个工具? ? ?
包含总结汇报、人文社科、党团工作、资格考试、办公文档、word文档、专业文献、应用文书、考试资料、工作范文、教学教材以及利用ElasticSearch和Redis检索和存储十亿信息等内容。本文共2页
相关内容搜索搭建logstash+kibana+elasticsearch+redis搭建集中式日志分析平台
我的图书馆
搭建logstash+kibana+elasticsearch+redis搭建集中式日志分析平台
LogStash架构专为收集、分析和存储日志所设计,正适合分布式系统,因此我根据官方文档和网上经验搭建了这个平台。
采用LogStash的官方推荐
10.2.169.64(CentOS5.5):Broker
10.2.169.234(CentOS5.5):Indexer,Storage&Search,Web Interface
10.2.169.21/10.2.169.22....(CentOS5.5):Shiper
在10.2.169.64安装并启动Redis
下载解压# cd /usr/local
# wget /files/redis-2.6.14.tar.gz
# tar -xzvf redis-2.6.14.tar.gz
创建软链接(非必须)这里是个人习惯,以后版本变迁的时候便于升级,可以跳过,但如果跳过的话下面相应的目录就要变更。# ln -s redis-2.6.14 redis
编译# cd redis# make
建立Redis目录(非必须)这步只是习惯将Redis相关的资源统一管理,可以跳过。
# mkdir -p bin
# mkdir -p etc
# mkdir -p var
# cp src/redis-server src/redis-cli src/redis-benchmark src/redis-sentinel src/redis-check-dump src/redis-check-aof&bin/
# cp redis.conf etc/
§配置参数# vi etc/redis.conf对redis.conf做如下变更
daemonize yes
pidfile /usr/local/redis/var/redis.pid
timeout 300
loglevel debug
logfile /usr/local/redis/var/redis.log
databases 16
save 900 1
save 300 10
save 60 10000
rdbcompression yes
dbfilename dump.rdb
dir /usr/local/redis/var/
appendonly no
appendfsync always
§启动# bin/redis-server etc/redis.conf
在10.2.169.234安装并启动ElasticSearch
下载解压,可到官网直接下载,也可使用wget。# cd /usr/local
# wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.1.tar.gz
# tar -zxvf elasticsearch-1.1.1.tar.gz
创建软连接。这里是个人习惯,以后版本变迁的时候便于升级,可以跳过,但如果跳过的话下面相应的目录就要变更。# ln -s elasticsearch-1.1.1 elasticsearch
这里我们使用默认配置,直接启动。# elasticsearch/bin/elasticsearch
在10.2.169.234安装并启动LogStash
下载并解压Logstash。
# curl -O https://download.elasticsearch.org/logstash/logstash/logstash-1.4.1.tar.gz# tar -xzvf logstash-1.4.1
创建软连接。这里是个人习惯,以后版本变迁的时候便于升级,可以跳过,但如果跳过的话下面相应的目录就要变更。# ln -s logstash-1.4.1 logstash
创建配置文件# cd logstash
# mkdir conf# vi conf/redis.conf
input&{& redis&{&& & host&=&&'10.2.169.64'&& & data_type&=&&'list'& & port&=&&"6379"&& & key&=&&'logstash:redis'&& & type&=&&'redis-input'&& }}output&{&& elasticsearch&{&& & host =& "127.0.0.1"& }}&
解释一下 logstash的配置文件由 input filter output 等几个基本的部分组成,顾名思义 input 就是在哪收集数据,output就是输出到哪,filter代表一个过滤规则意思是什么内容会被收集。上面这段是让 logstash 去10.2.169.64 这个redis服务器上去收集日志 redis端口为6379,key是 logstash:redis 类型为 redis-input ,(注意:这几个值必须跟logstash agent的output 所对应),收集完成后输出到 elasticsearch ,如果elasticsearch有更改端口,需要将这条改为host =& 'elasticsearch的ip' port =& 端口&
启动logstash index
# bin/logstash -f conf/redis.conf -l /data/logs/logstash.log &其中-f是指以指定的配置文件启动,-l是设置logstash本身的日志位置。&是以守护进程方式启动。
启动logstash web# bin/logstash-web
在10.2.169.21/10.2.169.22....安装并启动LogStash agent 这里的机器就是我们应用部署的各台机器了。这里的步骤与logstash index的步骤差不多,差异除了不用启动logstash web外,主要有两个。
redis.conf的配置内容。
input { &&& file { &&& type =& "dev_integrate" &&& path =& "/data/logs/integrate/integrate.log"&&& }&& &file { &&& type =& "dev_custom" &&& path =& "/data/logs/custom/custom.log"&&& }&& &}filter {& multiline {&&& pattern =& "^[^2014]"&&& what =& "previous"& }& } &output { &&&&& redis { &&&&& host =& '10.2.169.64' &&&&& data_type =& 'list' &&&&& key =& 'logstash:redis' &&&&&& } &&&&&& }
其中input指定了本机部署的两个应用的log文件。type是我自定义的一个类型,用来在后面的UI中区分各应用,path就是log文件路径了。如果有更多应用,照格式添加即可。filter用来处理log中的error信息,因为我的应用java程序,部署在tomcat下,所以错误信息类似如下:
&02:17:16&[emailJMSContainer-1]&ERROR&com.xxx.xxx.email.EmailSender.errorLog(79)):&-&exception&occurred:javax.mail.SendFailedException:&Invalid&A&&nested&exception&is:&&&&com.sun.mail.smtp.SMTPAddressFailedException:&553&5.7.1&&xxx-&:&Sender&address&rejected:&not&owned&by&user&&&&&at&com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)&&&&at&com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)&&&&at&javax.mail.Transport.send0(Transport.java:169)&&&&at&javax.mail.Transport.send(Transport.java:98)&&&&at&munication.email.EmailSender.sendEmail(EmailSender.java:97)&&&&at&com.xxx.notification.EmailNotificationConsumer.processTxtMsg(EmailNotificationConsumer.java:24)&&&&at&com.xxx.asyncmsg.consumer.AbstractConsumer.onMessage(AbstractConsumer.java:78)&&&&at&org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562)&&&&at&org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500)&&&&at&org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468)&&&&at&org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:326)&&&&at&org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:264)&&&&at&org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1071)&&&&at&org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1063)&&&&at&org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:960)&&&&at&java.lang.Thread.run(Thread.java:662)Caused&by:&com.sun.mail.smtp.SMTPAddressFailedException:&553&5.7.1&&xxx-&:&Sender&address&rejected:&not&owned&by&user&&&&&at&com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047)&&&& &15&more
如果不加fitler,那采集来的message就是单独的一条。所以这里我配置了一个fitler,所有不是以2014开头(这里演示我偷了一下懒,应该用正则)的都并到上一条。output就是输入到我们的redis服务器。
# bin/logstash -f conf/redis.conf -l /data/logs/logstash.log &
查看和搜索日志打开浏览器,输入以下地址:
http://10.2.169.234:9292/index.html#/dashboard/file/logstash.json即可看到如下界面。
这个界面可以设置各种检索条件,就不细说了。
到此为止,整个平台就搭建完毕。当然,这三者的功能不仅仅只有这么一点,而是能够提供更有趣的日志分析,大家可以自己研究。
TA的最新馆藏转自:http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis-------[title3]The most popular ones[/title3]Redis (V3.2)Written in: CMain point: Blazing fastLicense: BSDProtocol: Telnet-like, binary safeDisk-backed in-memory database,Master-slave replication, automatic failoverSimple values or data structures by keysbut
like ZREVRANGEBYSCORE.INCR & co (good for rate limiting or statistics)Bit and bitfield operations (for example to implement bloom filters)Has sets (also union/diff/inter)Has lists ( blocking pop)Has hashes (objects of multiple fields)Sorted sets (high score table, good for range queries)Lua scripting capabilitiesHas transactionsValues can be set to expire (as in a cache)Pub/Sub lets you implement messagingGEO API to query by radius (!)Best used: For rapidly changing data with a foreseeable database size (should fit mostly in memory).For example: To store real-time stock prices. Real-time analytics. Leaderboards. Real-time communication. And wherever you used memcached before.Cassandra (2.0)Written in: JavaMain point: Store huge datasets in "almost" SQLLicense: ApacheProtocol: CQL3 & ThriftCQL3 is very similar SQL, but with some limitations that come from the scalability (most notably: no JOINs, no aggregate functions.)CQL3 is now the official interface. Don't look at Thrift, unless you're working on a legacy app. This way, you can live without understanding ColumnFamilies, SuperColumns, etc.Querying by key, or key range (secondary indices are also available)Tunable trade-offs for distribution and replication (N, R, W)Data can have expiration (set on INSERT).Writes can be much faster than reads (when reads are disk-bound)Map/reduce possible with Apache HadoopAll nodes are similar, as opposed to Hadoop/HBaseVery good and reliable cross-datacenter replicationDistributed counter datatype.You can write triggers in Java.Best used: When you need to store data so huge that it doesn't fit on server, but still want a friendly familiar interface to it.For example: Web analytics, to count hits by hour, by browser, by IP, etc. Transaction logging. Data collection from huge sensor arrays.MongoDB (3.2)Written in: C++Main point: JSON document storeLicense: AGPL (Drivers: Apache)Protocol: Custom, binary (BSON)Master/slave replication (auto failover with replica sets)Sharding built-inQueries are javascript expressionsRun arbitrary javascript functions server-sideGeospatial queriesMultiple storage engines with different performance characteristicsPerformance over featuresDocument validationJournalingPowerful aggregation frameworkOn 32bit systems, limited to ~2.5GbText search integratedGridFS to store big data + metadata (not actually an FS)Has geospatial indexingData center awareBest used: If you need dynamic queries. If you prefer to define indexes, not map/reduce functions. If you need good performance on a big DB. If you wanted CouchDB, but your data changes too much, filling up disks.For example: For most things that you would do with MySQL or PostgreSQL, but having predefined columns really holds you back.ElasticSearch (0.20.1)Written in: JavaMain point: Advanced SearchLicense: ApacheProtocol: JSON over HTTP (Plugins: Thrift, memcached)Stores JSON documentsHas versioningParent and children documentsDocuments can time outVery versatile and sophisticated querying, scriptableWrite consistency: one, quorum or allSorting by score (!)Geo distance sortingFuzzy searches (approximate date, etc) (!)Asynchronous replicationAtomic, scripted updates (good for counters, etc)Can maintain automatic "stats groups" (good for debugging)Best used: When you have objects with (flexible) fields, and you need "advanced search" functionality.For example: A dating service that handles age difference, geographic location, tastes and dislikes, etc. Or a leaderboard system that depends on many variables.Classic document and BigTable storesCouchDB (V1.2)Written in: ErlangMain point: DB consistency, ease of useLicense: ApacheProtocol: HTTP/RESTBi-directional (!) replication,continuous or ad-hoc,with conflict detection,thus, master-master replication. (!)MVCC - write operations do not block readsPrevious versions of documents are availableCrash-only (reliable) designNeeds compacting from time to timeViews: embedded map/reduceFormatting views: lists & showsServer-side document validation possibleAuthentication possibleReal-time updates via '_changes' (!)Attachment handlingthus,
(standalone js apps)Best used: For accumulating, occasionally changing data, on which pre-defined queries are to be run. Places where versioning is important.For example: CRM, CMS systems. Master-master replication is an especially interesting feature, allowing easy multi-site deployments.Accumulo (1.4)Written in: Java and C++Main point: A BigTable with Cell-level securityLicense: ApacheProtocol: ThriftAnother BigTable clone, also runs of top of HadoopOriginally from the NSACell-level securityBigger rows than memory are allowedKeeps a memory map outside Java, in C++ STLMap/reduce using Hadoop's facitlities (ZooKeeper & co)Some server-side programmingBest used: If you need to restict access on the cell level.For example: Same as HBase, since it's basically a replacement: Search engines. Analysing log data. Any place where scanning huge, two-dimensional join-less tables are a requirement.HBase (V0.92.0)Written in: JavaMain point: Billions of rows X millions of columnsLicense: ApacheProtocol: HTTP/REST (also Thrift)Modeled after Google's BigTableUses Hadoop's HDFS as storageMap/reduce with HadoopQuery predicate push down via server side scan and get filtersOptimizations for real time queriesA high performance Thrift gatewayHTTP supports XML, Protobuf, and binaryJruby-based (JIRB) shellRolling restart for configuration changes and minor upgradesRandom access performance is like MySQLA cluster consists of several different types of nodesBest used: Hadoop is probably still the best way to run Map/Reduce jobs on huge datasets. Best if you use the Hadoop/HDFS stack already.For example: Search engines. Analysing log data. Any place where scanning huge, two-dimensional join-less tables are a requirement.Hypertable (0.9.6.5)Written in: C++Main point: A faster, smaller HBaseLicense: GPL 2.0Protocol: Thrift, C++ library, or HQL shellImplements Google's BigTable designRun on Hadoop's HDFSUses its own, "SQL-like" language, HQLCan search by key, by cell, or for values in column families.Search can be limited to key/column ranges.Sponsored by BaiduRetains the last N historical valuesTables are in namespacesMap/reduce with HadoopBest used: If you need a better HBase.For example: Same as HBase, since it's basically a replacement: Search engines. Analysing log data. Any place where scanning huge, two-dimensional join-less tables are a requirement.Graph databasesOrientDB (2.0)Written in: JavaMain point: Document-based graph databaseLicense: Apache 2.0Protocol: binary, HTTP REST/JSON, or Java API for embeddingHas transactions, full ACID conformityCan be used both as a document and as a graph database (vertices with properties)Both nodes and relationships can have metadataMulti-master architectureSupports relationships between documents via persistent pointers (LINK, LINKSET, LINKMAP, LINKLIST field types)SQL-like query language (Note: no JOIN, but there are pointers)Web-based GUI (quite good-looking, self-contained)Inheritance between classes. Indexing of nodes and relationshipsUser functions in SQL or JavaScriptShardingAdvanced path-finding with multiple algorithms and Gremlin traversal languageAdvanced monitoring, online backups are commercially licensedBest used: For graph-style, rich or complex, interconnected data.For example: For searching routes in social relations, public transport links, road maps, or network topologies.Neo4j (V1.5M02)Written in: JavaMain point: Graph database - connected dataLicense: GPL, some features AGPL/commercialProtocol: HTTP/REST (or embedding in Java)Standalone, or embeddable into Java applicationsFull ACID conformity (including durable data)Both nodes and relationships can have metadataIntegrated pattern-matching-based query language ("Cypher")Also the "Gremlin" graph traversal language can be usedIndexing of nodes and relationshipsNice self-contained web adminAdvanced path-finding with multiple algorithmsIndexing of keys and relationshipsOptimized for readsHas transactions (in the Java API)Scriptable in GroovyClustering, replication, caching, online backup, advanced monitoring and High Availability are commercially licensedBest used: For graph-style, rich or complex, interconnected data.For example: For searching routes in social relations, public transport links, road maps, or network topologies.The "long tail"Couchbase (ex-Membase) (2.0)Written in: Erlang & CMain point: Memcache compatible, but with persistence and clusteringLicense: ApacheProtocol: memcached + extensionsVery fast (200k+/sec) access of data by keyPersistence to diskAll nodes are identical (master-master replication)Provides memcached-style in-memory caching buckets, tooWrite de-duplication to reduce IOFriendly cluster-management web GUIConnection proxy for connection pooling and multiplexing (Moxi)Incremental map/reduceCross-datacenter replicationBest used: Any application where low-latency data access, high concurrency support and high availability is a requirement.For example: Low-latency use-cases like ad targeting or highly-concurrent web apps like online gaming (e.g. Zynga).Scalaris (0.5)Written in: ErlangMain point: Distributed P2P key-value storeLicense: ApacheProtocol: Proprietary & JSON-RPCIn-memory (disk when using Tokyo Cabinet as a backend)Uses YAWS as a web serverHas transactions (an adapted Paxos commit)Consistent, distributed write operationsFrom CAP, values Consistency over Availability (in case of network partitioning, only the bigger partition works)Best used: If you like Erlang and wanted to use Mnesia or DETS or ETS, but you need something that is accessible from more languages (and scales much better than ETS or DETS).For example: In an Erlang-based system when you want to give access to the DB to Python, Ruby or Java programmers.Aerospike (3.4.1)Written in: CMain point: Speed, SSD-optimized storageLicense: License: AGPL (Client: Apache)Protocol: ProprietaryCross-datacenter replication is commercially licensedVery fast access of data by keyUses SSD devices as a block device to store data (RAM + persistence also available)Automatic failover and automatic rebalancing of data when nodes or added or removed from clusterUser Defined Functions in LUACluster management with Web GUIHas complex data types (lists and maps) as well as simple (integer, string, blob)Secondary indicesAggregation query modelData can be set to expire with a time-to-live (TTL)Large Data TypesBest used: Any application where low-latency data access, high concurrency support and high availability is a requirement.For example: Storing massive amounts of profile data in online advertising or retail Web sites.RethinkDB (2.1)Written in: C++Main point: JSON store that streams updatesLicense: License: AGPL (Client: Apache)Protocol: ProprietaryJSON document storeJavascript-based query language, "ReQL"ReQL is functional, if you use Underscore.js it will be quite familiarSharded clustering, replication built-inData is JOIN-able on referencesHandles BLOBSGeospatial supportMulti-datacenter supportBest used: Applications where you need constant real-time upates.For example: Displaying sports scores on various displays and/or online. Monitoring systems. Fast workflow applications.
如果您想留下此文,您可以将其发送至您的邮箱(将同时以邮件内容&PDF形式发送)
相关文章推荐
(Ctrl+Enter提交) &&
已有0人在此发表见解
&在& 16:38收藏到了
&&在信息爆炸的时代,您的知识需要整理,沉淀,积累!Lai18为您提供一个简单实用的文章整理收藏工具,在这里您可以收藏对您有用的技术文章,自由分门别类,在整理的过程中,用心梳理自己的知识!相信,用不了多久,您收藏整理的文章将是您一生的知识宝库!
· 蜀ICP备号-1}

我要回帖

更多关于 redis search4j 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信