Tutorials The Weather App

The Weather App

If you want to learn how to use Infinispan embedded into your Java application, you've come to the right place. This tutorial will guide you through all of the steps required to get a simple Infinispan-based application running, starting with a local-only instance and ending with a fully clustered application. The application will retrieve the current weather conditions for some cities and store them in a cache, for quicker retrieval. It will also show how to configure the cache for expiration, so that entries get removed as they age. It will then demonstrate how to cluster multiple nodes together and reacting to events in the cluster. Finally, a computation of average temperatures per country will show the power of the streams functionality.

For this tutorial you will need the following:

This tutorial assumes you will be using the command-line to launch the various commands. The tutorial code itself is hosted as a project on GitHub where each step has been enclosed and tagged in a separate commit. In this way you can easily see the changes being made to the code from each step to the next.

So, to get things started, move on to the first step