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

Getting Started with Infinispan data grid -the right way

This tutorial has been updated to work with the Infinispan 12.1.7 release. 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. … 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

Running a cluster of Infinispan servers in a Docker container

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

Developing applications with Infinispan in Library Mode

In this tutorial we want to give some guidelines on developing applications with Infinispan or the supported version named JBoss Data Grid. First of all, make a bookmark on the following page which contains the demo quickstart applications, configured to run on JBoss Data Grid: https://github.com/jboss-developer/jboss-jdg-quickstarts The main difference, if you want to run the above … Read more