.NET Hot Rod Client Tutorials

Tip
The source code for these tutorials is available on GitHub.

These tutorials demonstrate how to use the Infinispan .NET Hot Rod client to connect to an Infinispan Server and perform common operations.

Prerequisites

  • .NET 10 or later.

  • A running Infinispan server. You can start one with Docker:

docker run -it -p 11222:11222 -e USER="admin" -e PASS="password" infinispan/server

Tutorials

Tutorial Description

Cache

Basic cache operations: put, get, remove.

Cache Administration

Create, configure, list, and remove caches.

Counters

Distributed strong and weak counters.

Listeners

Cache event listeners for create, modify, and remove events.

Multimap

Associate multiple values with a single key.

Near Cache

Client-side near caching with performance benchmark.

Schemas

Register and manage Protobuf schemas.

Security

Cache authorization with role-based access control.

Transactions

Transactional cache operations with commit and rollback.

Running

Each tutorial is an independent project. Run any tutorial from the c# directory:

dotnet run --project cache
dotnet run --project counter

Override the server URI with the INFINISPAN_URI environment variable:

INFINISPAN_URI="hotrod://user:pass@myserver:11222" dotnet run --project cache