Infinispan RESTful API

[Updated with the latest version of Infinispan] Infinispan servers provide RESTful HTTP access to data via a REST module built on Netty. REST endpoints listen on port 11222 by default instead of port 8080 like in earlier server release. First off, you can configure authentication to the REST endpoint with the user-tool.sh script in the … 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

Clustering Infinispan – a complete example

Infinispan can be configured to behave in different ways. These ways are called Caching Modes, and determine which strategy will be used to manage Infinispan objects within machines that are designated as the cluster members. Infinispan uses the JGroups library to provide network communication capabilities. JGroups is a toolkit for reliable group communication and provides … Read more

Getting Started with Infinispan – Part 1

This tutorial has been updated to work with the lastes Infinispan 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

Create Stored Tasks on Infinispan 8

This tutorial will teach you how to use Stored Tasks in Infinispan 8 which can be executed from an Hot Rod Client, much the same way you can execute a Stored Procedure on a Database Stored Tasks are functions which can be deployed on a Server cache and executed locally. They are especially useful in … Read more