Infinispan ~ introduction

Time:2021-11-29

There are not many articles on infinispan in China, so they are basically looking for information from Google and the official API. It took some experience to investigate some problems, but finally solved the problems, and the mood is more pleasant!

introduce

Infinispan is a distributed caching framework, which can be directly embedded into JBoss (wildfly) and deployed independently. Independent deployment is easy to handle and also separates applications, so that your cache does not depend on your applications.

Deployment on Linux

  • Go to the official download installation package. At present, it has reached version 13.0.1
  • Running on 192.168.60.1 server
bin/server.sh -b 192.168.60.1 &
  • Add administrator user
bin/cli.sh user create admin -p admin  -g admin

Docker deployment

  • Using container deployment sometimes has the problem of IP address mapping. At present, no solution has been found to this problem

Quay. IO / infinispan / Server: the scene of 13.0 can be used. When adding cache directly with infinispan / server, 403 will appear

docker run  --name infinispan-server  -it -p 11222:11222 -e USER="admin" -e PASS="password" quay.io/infinispan/server:11.0.9.Final-1

Background management platform

  • Port 11222 of the server has opened the management interface. Enter admin above to manage your cache objects
  • When you add a cache, binary serialization is used by default
{
  "distributed-cache": {
    "mode": "SYNC",
    "encoding": {
      "media-type": "application/x-protostream"
    },
    "statistics": true
  }
}
  • If you want to change to JBoss serialization, you can use the following configuration
{
  "distributed-cache": {
    "mode": "SYNC",
    "encoding": {
      "media-type": "application/x-jboss-marshalling"
    },
    "statistics": true
  }
}

Recommended Today

On the mutation mechanism of Clickhouse (with source code analysis)

Recently studied a bit of CH code.I found an interesting word, mutation.The word Google has the meaning of mutation, but more relevant articles translate this as “revision”. The previous article analyzed background_ pool_ Size parameter.This parameter is related to the background asynchronous worker pool merge.The asynchronous merge and mutation work in Clickhouse kernel is completed […]