quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.59k stars 2.63k forks source link

[Extension Proposal] Infinispan Embedded Quarkus extension #43449

Open karesti opened 10 hours ago

karesti commented 10 hours ago

Infinispan Embedded extension

Infinispan embedded extensions for Quarkus let you use Infinispan's in-memory data storage directly within your Quarkus applications. Infinispan Client extension connects to an external Infinispan server. The new embedded extension runs Infinispan inside your app. This allows for faster data access and efficient caching, taking full advantage of Quarkus's lightweight and high-performance features.

Infinispan Embedded in a nutshell

Using Infinispan embedded offers advantages like faster data access due to reduced latency from running in the same process as the application. It simplifies setup for smaller applications by eliminating the need for a separate server, resulting in lower overhead and improved efficiency. This setup allows for greater control over caching and data management, speeding up development and testing, making it ideal for use cases where performance and simplicity are priorities.

However, using Infinispan embedded instead of the client-server model can lead to increased resource consumption within the app, making scaling harder since the whole app must scale together. Deployment becomes more complex, and there may be resource conflicts with other instances. Configuration can be challenging as both Infinispan and app settings need optimization, and data persistence must be managed carefully.

Side note for Kubernetes: Using Infinispan in a client-server model in Kubernetes is preferable. It allows independent scaling of the Infinispan Server, making it easier to manage workloads. This centralized approach is more resource-efficient and simplifies configuration and monitoring. It also provides high availability and fault tolerance through clustering and replication, supports effective load balancing, and enables access to advanced features like distributed caching, making it ideal for robust data management.

READ MORE : Embedding Infinispan

Voting

Interested in this extension, please +1 via the emoji/reaction feature of GitHub (top right).

Repository name

quarkus-infinispan-embedded

Short description

A Quarkus extension for embedded Infinispan integrates in-memory data grid features directly into Quarkus applications, enabling efficient caching and data storage.

Repository Homepage URL

No response

Repository Topics

Team Members

quarkus-bot[bot] commented 10 hours ago

/cc @aloubyansky (extension-proposal), @gastaldi (extension-proposal), @geoand (kubernetes), @gsmet (extension-proposal), @iocanel (kubernetes), @maxandersen (extension-proposal), @wburns (infinispan)

maxandersen commented 10 hours ago

I always found it interesting to be able to have infinispan cache directly - if for nothing else for development purpose its useful. is this for standalone only or clustered usecase?

There are some possible "semi-cyclic" dependency alignment that could be problematic, like elasticsearch/hibernate search but if not in the quarkus platform that at least technically isn't a blocker.

gastaldi commented 10 hours ago

I think for clustered use-case you'd use the infinispan client extension, but I agree it's awesome to use it in a standalone use case.

yrodiere commented 10 hours ago

cc @Sanne who I think will have a few things to say (though I see you already mentioned the "better use client/server on Kubernetes" disclaimer)