Tutorials and examples

Infinispan is easy. Let us walk you through it!

Tutorials

Tutorials are a way to get into Infinispan using a step-by-step approach.

Name Description
The Weather App A complete tutorial on how to embed Infinispan in your application, progressing from a simple local-only cache to a fully-distributed compute grid

Examples

Very simple, straight-to-the-point, code examples of specific Infinispan features and integrations. All of these are part of the Infinispan Simple Tutorials GitHub project.

Name Description
Map Using a cache with the map-based API
Transactions Using a cache with transactions
JCache Using a cache with the JCache API
Functional Using a cache with the functional lambda-based API
Remote Access a remote cache using the HotRod protocol
C++ Access a remote cache using the HotRod protocol in C++
C# Access a remote cache using the HotRod protocol in C#
Javascript Access a remote cache using the HotRod protocol in Javascript
Replicated Using a replicated cache
Distributed Using a distributed cache
Listen (embedded) Detect when data changes in an embedded cache
Listen (remote) Detect when data changes in a remote cache
Query Querying a cache
Remote Scripting Execute scripts on an Infinispan Server from a HotRod client
Streams Use the Java Streams API to perform operations on the data
Distributed Execution Run code concurrently on all nodes in the cluster
Cluster Executor Run code concurrently on all nodes in the cluster, using a ClusterExecutor which doesn't require a cache.
Integration with Apache Spark Run Apache Spark jobs on data stored within Infinispan

Quickstarts

Quickstarts are self-contained, fully-fledged applications based on Infinispan which are ready-to-run. They showcase Infinispan in the context of more complex applications such as JavaEE deployments.

Name Description
CarMart a basic Infinispan example
CarMart-TX a basic Infinspan example with JTA transactions
HelloWorld-JDG another basic Infinispan example
HotRod-Endpoint using Infinispan remotely via the Hot Rod protocol
Memcached-Endpoint using Infinispan remotely via the Memcached protocol
REST-Endpoint using Infinispan remotely over REST
Remote query using Infinispan queries remotely over Hot Rod
The Quickstarts are written for JBoss Data Grid, (JDG) which is Red Hat's officially supported version of Infinispan. The tutorials are just as valid for Infinispan though, so are still worth a look.
back to top