Wednesday, 20 July 2016

Improved Infinispan Docker image available

The Infinispan Docker image has been improved, making it easier to run Infinispan Servers in clustered, domain and standalone modes, with different protocol stacks.

In this blog post we'll show a few usage scenarios and how to combine it with the jgroups-gossip image to create Infinispan Server clusters in docker based environments.

Getting started

By default the container runs in clustered mode, and to start a node simply execute:

Bringing a second container will cause it to form a cluster.The membership can be verified by running a command directly in the newly launched container:

Example output:

Using a different JGroups stack

The command above creates a cluster with the default JGroups stack (UDP), but it's possible to pick another one provided it's supported by the server. For example, to use TCP:

Running on cloud environments

We recently dockerized the JGroups Gossip Router to be used as an alternative discovery mechanism in environments where multicast is not enabled, such as cloud environments.

Employing  a gossip router will enable discovery via TCP, where the router acts as a registry: each member will register itself in this registry upon start and also discover other members.

The gossip router container can be launched by: 

Take note of the address where the router will bind to, it's needed by the Infinispan nodes. The address can be easily obtained by:

Finally we can now launch our cluster specifying the tcp-gossip stack with the location of the gossip router:

Launching Standalone mode

Passing an extra parameter allows to run a server in standalone (non-clustered) mode:

Server Management Console in Domain mode

Domain mode is a special case of clustered mode (and currently a requirement to use the Server Management Console), that involves launching a domain controller process plus one or more host controller processes. The domain controller does not hold data, it is used as a centralized management process that can replicate configuration and provision servers on the host controllers.

Running a domain controller is easily achievable with a parameter:

Once the domain controller is running, it's possible to start one or more host controllers. In the default configuration, each host controller has two Infinispan server instances:

The command line interface can be used to verify the hosts managed in the domain:

It should output all the host names that are part of the domain, including the master (domain controller):

To get access to the Management console, use credentials admin/admin and go to port 9990 of the domain controller, for example:


The image is built on Dockerhub shortly after each Infinispan release (stable and unstable), and the improvements presented in this post are available for Infinispan 9.0.0.Alpha3 and Infinispan 8.2.3.Final. As a reminder, make sure to pick the right version when launching containers:

Getting involved

The image was created to be flexible and easy to use, but if something is not working for you or if you have any suggestions to improve it, please report it at


Bleeding edge on Docker

As you may have noticed our Docker images are published together with (or very soon after) releases. But what if you want to try out some brand features which have just been merged? In that case you need to build an image by yourself.

Step #1 - Clone JBoss Docker image repository

At first you will need to clone our Infinispan Docker images:

Step #2 - Build or download the latest SNAPSHOT

There are two options here - you can build the distribution yourself or use SNAPSHOTs available on JBoss Nexus repository.

The first option requires checking out the Infinispan source code and performing a Maven build:

The second one is much simpler (Infinispan SNAPSHOTs are pushed into the repository after each successful build:

Step #3 - building Infinispan Docker image

One of the steps for building Infinispan Docker image is to download the distribution from Infinispan Download page. We need to slightly modify this step and use our manually downloaded packages.

Modify the Dockerfile as shown below:
Now you are ready to invoke the Docker build:


As you can see building a SNAPSHOT based docker image is very simple. From my own experience I can tell you that pushing it into Docker Hub is the fastest way to start playing with it in any PaaS environment (e.g. Openshift Online)

Happy building!

Monday, 11 July 2016

Infinispan 9.0.0.Alpha3 (and 8.2.3.Final)

Dear Infinispan users,

As we have lately been releasing Infinispan 8 and 9 releases in pairs, today's releases are no different. We have 9.0.0.Alpha3 and 8.2.3.Final ready for you!

A new micro release of our stable 8.2 branch fixes 16 issues. If you are using any other 8.x release, we recommend an upgrade to 8.2.3.Final as this release contains latest bugfixes, performance improvements, and Hibernate Search library update.

A brand new Alpha release from our development branch: 9.0.0.Alpha3 has more than 50 bug fixes, and many enhancements, among which we single out: improved distributed streams, documentation enhancements, admin console improvements, and various component upgrades.

Download it now, try it and tell us what you think on the infinispan forums or come and meet us on IRC: channel #infinispan on Freenode.

Friday, 8 July 2016

Remote Execution with C++ client

Version 8 of the Infinispan C++ Hotrod Client implements the Execute on Server (Exec) operation. This feature was introduced with Hotrod protocol v 2.1 and has been described for the Java client here.

The user can now store the javascript code on the server then invoke it when needed and let the server take care of the execution both locally on the near node or distibuited on the whole cluster.

The following annotated code is  an example of a C++ Exec that addresses the following use case: the user wants to get a string value and wants to count how many times it has been accessed from all the connected clients.

You can git the whole source following this link.

//Client setup

//Cache setup and scripts installation

//Exec operation and output

Thursday, 30 June 2016

DevNation Live Blog: Building Reactive Applications with Node.js and Red Hat JBoss Data Grid

Last Tuesday I gave a talk at DevNation 2016 on building Reactive Applications with Node.js and Red Hat JBoss Data Grid. The slides for it will be uploaded to the DevNation site shortly, but for those who want to play around with the application demoed in the talk, you can find the code and instructions in this repository.

The Red Hat Developers blog posted a review of the talk in this address:

Please find below review as written by Rob Terzi:

DevNation Live Blog: Building Reactive Applications with Node.js and Red Hat JBoss Data Grid

At DevNation, Red Hat’s Galder Zamarreño gave a talk with a live demo, Building reactive applications with Node.js and Red Hat JBoss Data Grid. The demo consisted of building an event-based three tier web application using JBoss Data Grid (JDG) as the data layer, an event manager running on Node.js, and a web client. Recently, support for Node.js clients was added to JDG, opening up the performance of a horizontally scalable in-memory data grid, to reactive web and mobile applications.
JDG is capable of processing and storing real-time streams of data, while maintaining very fast response times. It does this by using the memory available from a dynamically scalable grid of machines. Galder described JDG as a four-in-one package capable of being:
  • a distributed cache.
  • a high performance NoSQL primary data store.
  • an event-driven data store, particularly for real time event processing.
  • a big data and Internet of Things (IoT) data store.
The three-tiered web app in the demo consisted of:
  • A web client written in Elm, which is a functional language that compiles to JavaScript.  It is statically typed, which the presenter feels leads to well architected code. Elm competes with platforms such as React and Angular. Any of those other platforms could be used, but Galder chose Elm for the live demo, particularly given the useful error messages the compiler generates as a virtue of using a statically typed language.
  • An event manager running on Node.js using Express.js.
  • JBoss Data Grid as the data store.  Three nodes were used, running on the same laptop. Each element was guaranteed to be stored in two nodes, providing redundancy for fail over.
Node.js based applications have become very popular. Many use JavaScript on all three tiers, including NoSQL data stores. However, most of those data stores can’t match the scalability and response times of JDG. Traditionally, developers have needed to use Java to take advantage of JBoss Data Grid. The new fully asynchronous Node.js interface to JBoss Data Grid should enable developers to build some truly interesting next-generation reactive applications.
You can download JBoss Data Grid from If you’d like to get involved, join the open source community at

Monday, 20 June 2016

DevNation 2016: Galder Zamarreño on “Building reactive applications with Node.js and Red Hat JBoss Data Grid”

Earlier this month I did an interview with the DevNation 2016 organizers to talk about my talk on forthcoming talk on building reactive applications with Node.js and JBoss Data Grid, the Infinispan version for which Red Hat provides professional support, certified integration, patches...etc.

The talk will be happen next Tuesday, 28th June at 3:30pm PDT, so if you're in DevNation and want to find out more about Infinispan and our new Node.js Javascript client, make sure you join us then!


Originally posted in:

Building reactive applications with Node.js and Red Hat JBoss Data Grid

JBoss Data Grid is a distributed in-memory key/value data store from Red Hat, which can be used for caching, temporary and permanent storage. Although Java developers were its primary audience initially, the team has been expanding its appeal to C++, C# and even Javascript developers.
The latest JBoss Data Grid release includes a fully asynchronous Node.js client for interacting with JBoss Data Grid servers and my talk at DevNation is focused on how Javascript developers can make the most of the client to cache or store their data.
The talk has been designed around a web application that promotes JBoss Data Grid talks in forthcoming conferences, user groups… etc. The application will contain a Node.js component whose job will be to interact with the backend JBoss Data Grid servers to store and retrieve data, as well as receiving events when new information has been added to the backend. Through the live coding of this application, the audience will get an understanding of how to interact with the newly released Node.js JBoss Data Grid client, and after the talk they’ll have access to the code to be able to try it themselves.
3:30 p.m. to 4:30 p.m.
Room 133
About the presenter:
This will be my first time speaking at DevNation and I’m really excited about it because it brings together speaks and attendees not only from the Java/JVM space, but from other important developer communities such as Javascript.
Although I started as a Java developer, over the past decade I’ve become more and more interested in other programming languages, in particular functional programming languages such as Scala and Javascript, which I’ve been able to apply directly at my job.
These days I’m hugely interested by the purely functional ones such as Haskell, Elm or Purescript because the lack of mutability makes their solutions both elegant and easier to reason about. I’m also keeping a close eye as well on the Erlang ecosystem, e.g. Elixir, because I feel that the predictable latency offered by the Erlang VM is something that it’s not so easy to achieve in Java Virtual Machine.
I think learning other programming languages is one of the best things a developer can do, because it opens your mind to different points of view, different ways to solve problems, and widens the solution space.

Monday, 6 June 2016

Node.js Javascript Client 0.3.0 out with improved stability and API docs

Earlier today Infinispan Javascript client version 0.3.0 was released whose primary focus has been stabilising and tightening existing functionality, deprecating some older methods, and documentation:

  • Multiple fixes around remote execution, remote listeners and iteration.
  • Improved failover handling logic to correctly deal with socket error and remote disconnect situations.
  • Removed getVersioned, getBulk and getBulkKeys methods since these are deprecated in favour of getWithMetadata and getAll. The examples in the README file have been updated.
  • Added API documentation for Javascript client. Online API docs for Javascript client can be found here.
If you're a Javascript user and want to store data remotely in Infinispan Server instances, please give the client a go and tell us what you think of it via our forum, via our issue tracker or via IRC on the #infinispan channel on Freenode.