Apache Ignite

2015年开源到Github,同年成为Apache顶级项目,支持Java、.Net、C++、Scala。简而言之,是一个比Redis、Spark、Storm更为快速的实时-分布式-内存-支持事务-支持SQL的框架。是Alluxio(前身Tachyon)的挑战者。缺点很明显:未见生产级应用,实操资料很少,近乎只有源码和API。

 

1、Advanced Clustering

通过心跳服务自动发现。从而:

(1)加节点无需重启(支持CacheRebalanceMode);

(2)获取度量指标(如CPU负载、使用内存等);

(3)自修复(自动重连,慢客户端会被自动踢出);

(4)容错性(故障节点的数据也会被自动传播到网格内的其他节点,至少一次保证:Ignite保证只要有一个节点存在,任务就不会丢失)

(5)动态负载平衡(通过LoadBalancingSpi实现可插拔,ExecutorService接口实现动态平衡计算);

 

2、Data Grid

in-memorydistributed key-value store(可理解为distributed partitioned hash map),using a pluggable hashingalgorithm。从而:

(1)加节点即加缓存;

(2)ACID数据一致性;

(3)支持JCache规范(使用IgniteCache接口实现);

(4)支持Hibernate L2 Cache;

(5)支持内存级数据自动分区(允许在内存内缓存TB级的数据);

(6)近缓存(本地客户端侧的缓存,他会存储最近和最频繁访问的数据,“内网中的CDN”);

(7)支持off-heap memory(支持堆内和堆外两种模式,堆外存储可以克服JVM垃圾回收(gc)导致的长时间暂停,堆外提供堆外索引和分层存储,分层存储是指冷数据按堆内->堆外->磁盘分层移动);

(8)支持乐观锁;

(9)Write-Through和 Read-Through通写通读(缓存数据更新会逐条或批次同步到数据库,请求的数据在缓存中不可用时自动从数据库中拉取);

(10)Data Loading,initializing cache dataon startup

 

3、SQL Grid

(1)支持标准SQL(支持基于内存分布式join);

(2)支持执行计划;

(3)Text Query(query cache object ongiven value – new TextQuery(Person.class, "Master"))

(4)continuous queries(持续查询是指执行查询后又想持续的获得之前的查询结果的数据更新通知,其基于CacheEntryUpdatedListener接口实现);

 

4、Streaming & CEP

(1)支持event window滑动窗口;

(2)支持接入Flume、Kafka、Storm数据;

 

5、Compute Grid

通过一组API实现分布式计算处理。

(1)   ForkJoin处理(纯MapReduce并不是为了性能而构建,轻量级MapReduce,MR的简化API);

(2)   作业调度,支持LRU、FIFO、随机、优先级甚至磨洋工;

 

6、Service Grid

在集群中部署各种单例服务,如分布式计数器。

 

7、Ignite File System

Ignite文件系统(IGFS),IGFS提供了和Hadoop HDFS类似的功能,但是仅仅在内存内部。

(1)   IGFS实现了Hadoop的文件系统API,并且可以透明地加入Hadoop或者Spark应用;

(2)   IGFS也可以在另一个Hadoop文件系统上部署为一个缓存层(应用通写通读技术)。

(3)   自带Hadoop,也支持CDH和HDP。

 

8、Data Structures

支持复杂数据结构。

 

9、其他

(1)包含Ignite Web控制台;

(2)支持Spark Shared RDDs,使Spark job在Ignite上运行(IgniteRDD在执行SQL查询时比Spark原生RDD或者DataFrame有百倍的性能提升);

(3)支持混合云(Docker、AWS、Google Compute Engine),也支持Mesos、Yarn;

 

参考:

https://ignite.apache.org/

中文说明:https://www.zybuluo.com/liyuj/note/293596

比较:http://www.infoq.com/cn/articles/apache-ignite-explorer

API:https://ignite.apache.org/releases/1.9.0/javadoc/

例子:https://github.com/apache/ignite/tree/master/examples(留意config)

其他例子:https://dzone.com/articles/getting-started-with-apache-ignite

http://gridgain.blogspot.jp/2015/04/apache-ignite-word-count-streaming.html

      

My first acquaintance with High load systems was at the beginning of 2007, and I started working on a real-world project since 2009. From that moment, I spent most of my office time with Cassandra, Hadoop, and numerous CEP tools. Our first Hadoop project (the year 2011-2012) with a cluster of 54 nodes often disappointed me with its long startup time. I have never been satisfied with the performance of our applications and was always looking for something new to boost the performance of our information systems. During this time, I have tried HazelCast, Ehcache, Oracle Coherence as in-memory caches to gain the performance of the applications. I was usually disappointed from the complexity of using these libraries or from their functional limitations. When I first encountered Apache Ignite, I was amazed! It was the platform that I’d been waiting on for a long time: a simple spring based framework with a lot of awesome features such as DataBase caching, Big data acceleration, Streaming and compute/service grids. In 2015, I had participated in Russian HighLoad++ conference1 with my presentation and started blogging in Dzone/JavaCodeGeeks and in my personal blog2 about developing High-load systems. They became popular shortly, and I received a lot of feedback from the readers. Through them, I clarified the idea behind the book. The goal of the book was to provide a guide for those who really need to implement an in-memory platform in their projects. At the same time, the idea behind the book is not writing a manual. Although the Apache Ignite platform is very big and growing day by day, we concentrate only on the features of the platform (from our point of view) that can really help to improve the performance of the applications. We hope that High-performance in-memory computing with Apache Ignite will be the go-to guide for architects and developers: both new and at an intermediate level, to get up and to develop with as little friction as possible.
### Redis 与 Apache Ignite 特性对比 #### 功能特性 Redis 是一种内存中的数据结构存储系统,支持多种数据类型的原生命令操作。它提供了键值对数据库的功能以及发布/订阅消息传递模式[^1]。 Apache Ignite 则是一个分布式内存计算平台,不仅提供缓存功能还集成了SQL查询引擎、事务处理机制和服务网格等功能模块。Ignite 支持复杂的业务逻辑实现并能作为独立的数据源使用。 #### 性能表现 对于简单的读写请求,在单节点环境下 Redis 表现出色,延迟极低且吞吐量高;然而当涉及到跨多个服务器集群部署时,则需依赖于其复制和分片策略来维持高效运作。 相比之下, Apache Ignite 设计之初就考虑到了大规模分布式的场景需求,因此在多节点间的协调工作方面更加优化,能够更好地应对海量并发访问的压力测试环境下的稳定性和响应速度。 #### 应用案例 - **Redis 使用场景** - 实现会话管理(session store),通过快速查找用户状态信息提高Web应用性能; - 构建实时分析系统,借助高效的列表(list)或集合(set)类型完成事件流处理任务; - **Apache Ignite 使用场景** - 复杂的应用程序开发中充当持久化层之外的主要数据管理层角色; - 需要高度一致性的金融交易记录保存等关键领域内构建高性能的服务架构。 ```bash # 连接到本地运行的 Redis 服务器并设置一个 key-value 对 redis-cli set mykey "Hello" # 查询该 value 值 redis-cli get mykey ``` ```java // Java 客户端连接到 Apache Ignite 并创建 Cache try (Ignition ignite = Ignition.start()) { IgniteCache<Integer, String> cache = ignite.getOrCreateCache("mycache"); // 存储一些数据进入缓存 cache.put(1, "Hello"); } ```
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值