官术网_书友最值得收藏!

In-Memory Data Grid (IMDG)

One of the key features of Apache Ignite is the In-memory Data Grid. You can consider IMDG as a distributed Key-Value pair store; the key and value both must implement the serializable interface as they get transferred over the network. Apache Ignite stores objects in off-heap and on-heap memory (and on disk when native persistence is enabled). Apache Ignite's data grid operations, such as Create, Read, Update, and Delete (CRUD), are many times faster than RDBMs operations as the traditional databases store data in a filesystem (B+ tree), whereas IMDG data is stored in memory.

Apache Ignite IMDG has the following capabilities: 

  • It supports distributed ACID transactions. You can perform more than one cache operation in a transactional manner.
  • Adding more Ignite nodes can store more data and scale elastically.
  • It can store data in off-heap storage and also provides capabilities to persist data in RDBMS, HDFS, and NoSQL databases. 
  •  JCache (JSR 107)-compliant cache APIs.
  • Supports Spring Framework Integration. You can annotate your Java methods with a Spring cache annotation to access data from the Ignite cache. As we know, SQL summation is a costly time consuming database operation; the following code snippet calculates total PTO hours for a department and stores it in an Apache Ignite cache. Now, if you again invoke the retrieveTotalPaidTimeOffFor method with the same departmentId, it will be served from the cache instead of performing a costly database aggregation:
 @Cacheable("ptoHours")
 public double retrieveTotalPaidTimeOffFor(int departmentId) {
          String sql =
              "SELECT SUM(e.ptoHrs) " +
              "FROM Employee e " +
              "WHERE e.deptId= ?";

         return jdbcTemplate.queryForObject(sql, Double.class, 
departmentId); }
  • Hibernate can be configured to store an L2 cache in a Data Grid.
  • Web Session Data clustering for high availability.

We will cover the IMDG in Chapter 3, Working with Data Grids.

主站蜘蛛池模板: 汝城县| 沙雅县| 吴堡县| 甘洛县| 巢湖市| 远安县| 沛县| 巴青县| 郓城县| 四川省| 秀山| 宿迁市| 鱼台县| 崇阳县| 思南县| 太保市| 平武县| 墨江| 方正县| 呼和浩特市| 海城市| 溧阳市| 隆尧县| 克山县| 西和县| 尖扎县| 资源县| 武冈市| 利辛县| 凤冈县| 新民市| 普格县| 浦东新区| 集安市| 麻栗坡县| 五家渠市| 城口县| 珠海市| 闸北区| 扶风县| 正蓝旗|