- Docker / Podman
- Java 21+
The Docker Compose file sets up:
- A LON cluster with 3 nodes
- A NYC cluster with 1 node
Both clusters use Cross Site replication.
docker/podman compose up
- Log in to LON at
localhost:11222
(user: admin, password: pass) - Log in to NYC at
localhost:31222
(user: admin, password: pass)
The leaderboard is a Quarkus app that shows the top 10 players. Data is stored in Infinispan with Protobuf serialization. Build and run the application:
./mvnw clean install
java -jar ./target/quarkus-app/quarkus-run.jar
Visit http://localhost:8080 to view the app.
This demo doesn't use indexed caches for simplicity. Adding indexing is recommended for better query performance.
You should be able to see in the console (LON and NYC):
Query:
select p.username, p.score from org.infinispan.PlayerScore p WHERE p.human=true ORDER BY p.score DESC, p.timestamp ASC
The app creates a cache in NYC, using active-active replication:
- LON is the backup for NYC
- NYC is the backup for LON
Test and remove caches via the cache creation wizard in the console.
Here is the PDF holding presentation slides
- Infinispan https://infinispan.org/get-started/
- Quarkus https://quarkus.io/get-started/