This article is a step by step guide for setting up a remote Infinispan cluster as an HTTP session store for your HTTP Sessions running on WildFly application server. You can carry out equivalent steps to externalize JBoss EAP 7 session on Red Hat Data Grid.
infinispan
Infinispan is an open-source in-memory data grid that provides flexible deployment options and advanced capabilities for storing, managing, and processing data.
Infinispan features a JSR-107 compatible cache that can hold all types of data, from Java objects to plain text.
Infinispan distributes your data across elastically scalable clusters to guarantee high availability and fault tolerance, whether you use Infinispan as a volatile cache or a persistent data storage
Infinispan latest version is: 15.0.0.Dev01 – June 2023
<dependency> <groupId>org.infinispan</groupId> <artifactId>infinispan-core</artifactId> <version>${infinispan.version}</version> </dependency>
Getting Started with Infinispan data grid -the right way
Infinispan is a distributed in-memory key/value data grid. An in-memory data grid is a form of middleware that stores sets of data for use in one or more applications, primarily in memory. The data is typically distributed across grid nodes in a network.
Clustering Infinispan made simple
This tutorial will discuss how to configure and start an Infinispan cluster. As next step, we will show how to connect to the cluster remotely using a Java application. Infinispan uses the JGroups library to provide network communication capabilities. JGroups is a toolkit for reliable group communication and provides many useful features and enables cluster … Read more
What is Infinispan ? a quick introduction
What is Infinispan ? In a nutshell, Infinispan is an open source data grid platform written in Java which exposes a JSR-107 compatible cache interface in which you can store objects. There are several use cases for Infinispan: let’s discuss the three most common use cases: Using Infinispan as a Cache Firstly, Infinispan can be … Read more
Infinispan REST API made simple
Infinispan servers provide RESTful HTTP access to data via a REST module built on Netty. In this tutorial we will learn how to use it to manage Cache data with regards to all major Infinispan versions starting from the latest version. Using Infinispan REST API (latest version) REST endpoints listen on port 11222 by default. … Read more
Getting started with Infinispan Command Line Interface
The version 10 of Infinispan features a brand new server replacing the WildFly-based server with a smaller, leaner implementation. In this tutorial we will check how to use its Command Line Interface to connect to an Infinispan cluster First off, let’s check some of the highlights of Infinispan 10: Reduced disk (50MB vs 170MB) and … Read more
Generate Sequences with Infinispan Clustered Counters
In this tutorial we will learn how to use Clustered Counters with Infinispan 9.1.0. Cluster Counters are an useful feature of Infinispan which lets you generate unique identifiers in a cluster. Typically reliable counters are generated through a Database’s Sequence schema but this requires a connection to a Database limiting how the application scales for … Read more
How to iterate over an Infinispan cache
The simplest way to iterate over an Infinispan Cache is by means of iterating over its Set of entries, as in the following example, which uses JDK 1.8 (Lambda expression) style: cache.entrySet().forEach(entry -> System.out.printf(“%s = %s\n”, entry.getKey(), entry.getValue())); The above example will print cache statistics for the whole cluster. On the other hand, if you … Read more
Monitoring remote Infinispan caches with Listeners
Event listeners can be used with Infinispan caches to notify remote clients of events happening on the Cache, such as CacheEntryCreated, CacheEntryModified or CacheEntryRemoved. In this tutorial we’ve learnt how to monitor a local embedded Infinispan cache: Monitoring WildFly’s Infinispan caches. The following example shows how a remote client, using the Hot Rod protocol, is able … Read more
How to set up an Infinispan cluster with Docker
In this quick tutorial we will learn how to use Docker to run a cluster of Infinispan servers in no time! First of all, we need to find out the Docker image to pull: $ docker search infinispan INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED docker.io docker.io/jboss/infinispan-server 2 [OK] The list is quite large, however we … Read more