Infinispan 10.0 “Chupacabra”
Dear Infinispan community,
We are very pleased to announce the release of Infinispan 10.0 codenamed “Chupacabra”! We have been busy making many changes over the last months.
Infinispan 10 features a brand new server, replacing the WildFly-based server we’ve had since 5.3 with a smaller, leaner implementation. Here are the highlights:
Reduced disk (50MB vs 170MB) and memory footprint (18MB vs 40MB at boot)
Simpler to configure, since it shares the configuration schema with embedded with server-specific extensions
Single-port design: the Hot Rod, REST and management endpoint are now served through a single port (11222) with automatic protocol detection between HTTP/1.1, HTTP/2 and Hot Rod. The memcached endpoint is handled separately since we don’t implement the binary protocol yet.
New CLI with data manipulation operations
New REST-based API for administration
Security implemented using WildFly Elytron:
Hot Rod authentication support for PLAIN, DIGEST-MD5, SCRAM, EXTERNAL, OAUTHBEARER
HTTP authentication support for BASIC, DIGEST, CLIENT_CERT and TOKEN
Properties, Certificate Store and LDAP realms
Integration with KeyCloak
Caches/counters are created and managed dynamically through Hot Rod / REST
Because of the amount of restructuring, the web-based Console is not yet available in this release. We are working on it and it will be included in 10.1.
A new API (v2) was introduced and users are encouraged to migrate their applications from the old API.
The v2 API offers a completely redesigned endpoint, including dozens of new operations. Besides allowing to manage caches, it also covers cache containers, counters, cross-site replication, servers and clusters.
Apart from the new API, the REST server is now fully non-blocking and also has better performance than 9.4.x. It also fully supports authorization.
The internal marshalling capabilities of Infinispan have undergone a significant refactoring in 10.0. The marshalling of internal Infinispan objects and user objects are now truly isolated. This means that it’s now possible to configure Marshaller implementations in embedded mode or on the server, without having to handle the marshalling of Infinispan internal classes. Consequently, it’s possible to easily change the marshaller implementation user for user types, in a similar manner to how users of the HotRod client are accustomed.
As a consequence of the above changes, the default marshaller used for marshalling user types is no longer based upon JBoss Marshalling. Instead we now utilise the ProtoStream library to store user types in the language agnostic Protocol Buffers format. The ProtoStream library provides several advantages over jboss-marshalling, most notably it does not make use of reflection and so is more suitable for use in AOT environments such as Quarkus.
The persistence SPI has had some much needed TLC, with several deprecations and additions. The aim of this work was to ensure that internal Infinispan classes were no longer leaking into the SPI, in order to ensure that custom store implementations only have to be concerned with their data, not internal Infinispan objects.
Stores by default are now segmented when the segmented attribute is not set. A segmented store allows for greater iteration performance and less memory usage. This is useful for things such as state transfer and other operations that require an entire view of the cache (iteration, size, mass indexer distributed streams etc). All of our provided stores now provided being segmented; these include file store, soft index file store, rocks db, jdbc and remote stores.
To accommodate our brand new server, Infinispan 10.0 also introduces a completely new container image which is much smaller than the old one (366MB vs 684MB) and supports the following features:
Red Hat’s Minimal Universal Base Image based
Simple yaml configuration
Authentication (Enabled by default)
The new image can be pulled from any of the following repositories:
Metrics and Logging
Infinispan has adopted the MicroProfile Metrics ver. 2.0.2 specification and uses the SmallRye Metrics implementation. MicroProfile Metrics allows applications to gather various metrics and statistics that provide insights into what is happening inside an Infinispan cluster.
The current offering includes both cache container and cache level Gauge type metrics. Histograms and Timers will arrive in the next release of the 10.x stream.
The metrics can be read remotely at the well-known /metrics REST endpoint and use JSON format or optionally the OpenMetrics format, so that they can be processed, stored, visualized and analyzed by compatible tools such as Prometheus.
But rest assured, the existing JMX support for metrics has not been superseded by REST. JMX is still alive and kicking and we plan to continue developing it and have it available on all runtimes that support it (Quarkus being the notable exception).
Logging categories for the major subsystems have been introduced (CLUSTER, CONTAINER, PERSISTENCE, SERVER, etc) so that it easier to understand what they refer to. The server also comes with a JSON logger for easy integration with tools such as Fluentd or the ELK stack.
Infinispan is an official extension in Quarkus! If you wish to find out more about Quarkus you can find it at https://quarkus.io/.
We have a very featureful client extension allowing your Quarkus apps to connect to a remote server with lots of the features you are used to: querying, authentication, encryption, counter, dependency injection and others. We recently added support for protostream based annotation marshalling. If you are curious you can find the code at https://github.com/quarkusio/quarkus/tree/master/extensions/infinispan-client.
The Infinispan embedded extension was also just added, but has limited functionality due to its infancy. Although it will allow you to run an embedded clustered cache in a native executable. If you are curious you can find the code at https://github.com/quarkusio/quarkus/tree/master/extensions/infinispan-embedded.
The Infinispan team has also started adding a standalone project to have a Quarkus based Infinispan Server using Infinispan 10 and newer. This is still a work in progress, but the new repository can be found at https://github.com/infinispan/infinispan-quarkus-server.
Quarkus has a different release cycle than Infinispan, so watch out for more improvements over the following weeks !
Async mode cross-site replication received 3 major improvements: Concurrent requests (i.e. write on different keys for example) will be handled simultaneously instead of sequentially. Asynchronous mode is now able to detect disconnections between sites and bring the site offline based on <take-offline> configuration (ISPN-10180) Tracks and exposes some metrics for asynchronous requests (ISPN-9457)
Infinispan’s internal dependency-injection has been completely rewritten so that factories, components and dependencies are discovered and resolved at compile time instead of using runtime reflection. This, together with the marshalling changes and recent JGroups changes, paves the way for usage and native compilation with Quarkus.
Several internal subsystems have been rewritten to be non-blocking, meaning that they will not hold-on to threads while waiting for I/O:
Non-blocking Hot Rod authentication (ISPN-9841)
Non-blocking REST endpoint (ISPN-10210)
Update internal remote listener code to support non blocking (ISPN-9716)
Update internal embedded listeners to be non blocking (ISPN-9715)
Passivation throughput is increased as well as these operations are done asynchronously.
In addition cache stores have been made non blocking for the cases of loading an entry and storing into the data container as well write skew checks. With this we should be at a point where we can start consolidating thread pools, so keep a look-out in the upcoming releases.
Distributed Streams utilizing a terminal operator that returns a single value use non blocking communication methods (ISPN-9813)
Off Heap Storage Improvements
Off Heap has added a few improvements to increase performance and reduce memory usage.
Iteration imrpovements (ISPN-10574)
Removes the need for the address count configuration option
Dynamically resize underlying bucket
Reorder bucket iteration to more CPU friendly, less lock acquisiations as well
StampedLock instead of ReadWriteLock (ISPN-10681)
Cluster Expiration has been improved to only expire entries on the primary node to reduce the amount of concurrent expirations from multiple nodes in the cluster. Also the amount of concurrent expirations on a single node has been improved for better handling.
Additionally, expirations are not replicated cross site to reduce chattiness on the cross site link. Also to note that lifespan works fine without this and max-idle expiration does not work properly with cross site. So in this case the messages were providing no benefit.
We now have a proper sizeAsync method on the Cache interface. This is both for remote and embedded APIs. This method should be preferred over the current size due to not blocking the invoking thread as well as being able to retrieve the size as a long instead of a int.
It is now possible to configure JGroups stacks directly from the Infinispan configuration file. We use this ability to also allow easily creating multiple stacks (for easy cross-site configuration). The distribution comes with several pre-built JGroups stacks for cloud environments which you can quickly adapt for your configuration. Additionally you can extend existing JGroups configurations replacing individual protocols. This makes it easy, for example, to use a different discovery without worrying about all the other protocols.
Infinispan community documentation has been going through some big changes over the past year. The Infinispan 10 release marks the first major step towards adopting a modular structure that supports flexible content for specific use cases. On top of that we’ve also been putting lots of effort into transforming our documentation set to adhere to the principles of minimalism that put focus on user goals and delivering leaner, more concise content.
Our 10.0 release also incorporates work to organize content into three main types: task, concept, and reference. Mapping content to information types makes it easier to write and maintain content by removing worries about style, scope, and other complexities. Writers can separate documentation into logical units of information that can stand alone and then assemble topics into tutorials, how-to articles, explanations, and reference material.
You might also notice some changes to the documentation section of our site and updates to the index page for Infinispan 10 docs. Hopefully the new layout makes it easier to navigate and find the information you’re looking for.
We hope you find the improvements to the documentation helpful. As always, we’re keen to get your feedback and would appreciate. And if you feel like getting involved, see the Contributor’s Guide and start writing Infinispan docs today!
First steps to a new Reactive API. This is still a work in progress and the API will see major changes. We plan on making this API final and default in Infinispan 11. The new API includes a new API module and a new KeyValueStore Hot Rod client where search, continuous search and Key Value store methods are included
A new major release is also an opportunity to do some house-cleaning.
Deprecate GridFileSystem and org.infinispan.io stream implementations (ISPN-10298)
Deprecated Total Order transaction mode (ISPN-10259)
Deprecated Externalizer, AdvancedExternalizer and @SerializeWith (ISPN-10280)
AtomicMap implementations (ISPN-10230)
Deprecated org.infinispan.io classes (ISPN-10297)
Compatibility mode (ISPN-10370)
C3P0 and Hikari Connection Pools (ISPN-8087)
Delta and DeltaAware interfaces (ISPN-8071)
HotRod 1.x support (ISPN-9169)
Tree module (ISPN-10054)
Distributed Executor (ISPN-9784)
Now that Infinispan 10 is out we plan on delivering a 10.1 release in a couple of months. 10.1 will generally be a polishing release.
Get it, Use it, Ask us!We’re hard at work on new features, improvements and fixes, so watch this space for more announcements!
Please, download and test the latest release.
If you have questions, are experiencing a bug or want advice on using Infinispan, you can use StackOverflow. We will do our best to answer you as soon as we can.