Monday, 10 February 2020
Infinispan Spring Boot Starter released with Spring Boot 2.2.4.RELEASE
Dear Infinispan and Spring Boot users,
We are pleased to announce the release of Infinispan Spring Boot 2.1.8.Final and 2.2.0.Final.
2.1.8.Final uses Infinispan 9.4.17.Final and Spring Boot 2.2.2.RELEASE
2.2.0.Final uses Infinispan 10.1.1.Final and Spring Boot 2.2.2.RELEASE
Configuring Marshalling with Infinispan 10.x
Infinispan 10.x servers have some significant changes to marshalling that impact Spring Boot users.
The default Marshaller for Infinispan 10.x is ProtoStream, which uses Protocol Buffers to provide extensible, language and platform neutral serialization.
Unfortunately ProtoStream does not currently work with Infinispan Spring Cache and Session support. As a result, Spring users in Remote Client/Server Mode must use the Java Serialization Marshaller and add classes to a Java serialization whitelist.
Add the following configuration properties:
infinispan.remote.marshaller=org.infinispan.commons.marshall.JavaSerializationMarshaller
infinispan.remote.java-serial-whitelist=org.infinispan.tutorial.simple.spring.remote.*
The infinispan.remote.java-serial-whitelist
property specifies the classes, or packages, that Java serialization can marshall. Separate multiple class names with a comma (,
).
Note that, in previous versions, JBoss Marshaller was the default for Infinispan. Spring users can also use JBoss Marshalling, but it is deprecated as of Infinispan 10.x.
Get it, Use it, Ask us!
You can find these releases in the maven central repository.
Please report any issues in our issue tracker and join the conversation in our Zulip Chat to shape up our next release.
Enjoy,
The Infinispan Team
Tags: release spring boot spring
Friday, 05 April 2019
Infinispan Spring Boot Starter 2.1.5.Final and 1.0.7.Final are out!
Dear Infinispan and Spring Boot users,
We have just released Infinispan Spring Boot Starter 2.1.5.Final and 1.0.7.Final.
2.1.5.Final
* * 2.1.5.Final is using Infinispan 9.4.11.Final and Spring-Boot 2.1.4.RELEASE.
Important Spring-Boot bug fix
Previous versions of Spring-Boot 2.1.x contained a bug related to the multi-release jars. Infinispan contains multi-release jars, in consequence, we could not run our applications using java -jar with Java 11 (Java 8 worked fine). For additional explanations, read here. Spring-Boot team has fixed this bug and released the correction in Spring-Boot 2.1.4.RELEASE, along with many other features and bug fixes, so consider upgrading soon.
Statistics on Client/Server mode and Actuator
Statistics configuration in client/server mode for the client evolved in the latest Infinispan versions. As a remainder, to activate actuator statistics in client/server mode : "Configure 'infinispan.remote.statistics=true' in the", application.properties or - Configure ''infinispan.client.hotrod.statistics=true" in the hotrod-client.properties or - Configure by code, for example:
@Bean public InfinispanRemoteConfigurer infinispanRemoteConfigurer() \{ return () → new ConfigurationBuilder().statistics().enable().build(); }
===== JMX
If you want to use Infinispan and JMX, for example on Client/Server mode, set the 'jmx' property 'true' as explained above with the 'statistics' property. However, you might get a javax.management.InstanceAlreadyExistsException because both Infinispan and Spring will try to register the MXBean.
The correction will land on the next starter release. If you need to avoid this error today, you can tell Spring-Boot not to register the bean with the following code (Thanks Stéphane Nicoll for the tip!):
Testcontainers
This version includes an integration test using Testcontainers, JUnit5 and the Infinispan Server. Grab a look here if you are curious.
1.0.7.Final
* * 1.0.7.Final upgrades to 1.5.19.RELEASE and Infinispan 9.4.11.Final.
⭐ Don’t forget to star the project in GitHub if you like the starter! ⭐
You can find these releases in the maven central repository.
Please report any issues in our issue tracker and join the conversation in our Zulip Chat to shape up our next release.
Enjoy,
The Infinispan Team
Tags: release spring boot
Friday, 22 February 2019
Infinispan Spring Boot Starter 2.1.4.Final is out!
Dear Infinispan and Spring Boot users,
We have just released Infinispan Spring Boot 2.1.4.Final.
2.1.4.Final is using the last Infinispan Release 9.4.8.Final and Spring-Boot 2.1.3.RELEASE.
You can find this release in the maven central repository.
Please report any issues in our issue tracker and join the conversation in our Zulip Chat to shape up our next release.
Enjoy,
The Infinispan Team
Tags: release spring boot
Thursday, 31 January 2019
Infinispan Spring Boot Starter 2.1.3.Final is out!
Dear Infinispan and Spring Boot users,
We have just released Infinispan Spring Boot 2.1.3.Final.
2.1.3.Final is using the last Infinispan Release 9.4.6.Final and contains some bug fixes related to Actuator integration.
You can find this release in the maven central repository.
Please report any issues in our issue tracker and join the conversation in our Zulip Chat to shape up our next release.
Enjoy,
The Infinispan Team
Tags: release spring boot
Tuesday, 15 January 2019
Infinispan Spring Boot Starter 2.1.2.Final is out!
Dear Infinispan and Spring Boot users,
We have just released Infinispan Spring Boot 2.1.2.Final.
2.1.2.Final is using Spring Boot 2.1.2.RELEASE and contains some bug fixes related to JCache and Actuator integration.
The starter is now using Infinispan’s last stable release: 9.4.5.Final.
You can find this release in the maven central repository.
Please report any issues in our issue tracker and join the conversation in our Zulip Chat to shape up our next release.
Enjoy,
The Infinispan Team
Tags: release spring spring boot
Tuesday, 11 December 2018
Infinispan Spring Boot Starter 2.1.1.Final and 1.0.4.Final are out!
Dear Infinispan and Spring Boot users,
We have just released Infinispan Spring Boot 2.1.1.Final and 1.0.4.Final.
1.0.4.Final is using Spring Boot 1.5.17.RELEASE
2.1.1.Final is using Spring Boot 2.1.1.RELEASE
Both starters are now using Infinispan’s last stable release: 9.4.4.Final.
9.4.4.Final provides full support to JDK 11, Spring 4 and 5. Concerning Spring 5, it includes Spring Session 2.1.2.RELEASE support.
You can find these releases in the maven central repository.
Please report any issues in our issue tracker and join the conversation in our Zulip Chat to shape up our next release.
Enjoy,
The Infinispan Team
Tags: release spring-session spring spring boot
Friday, 09 November 2018
Infinispan 9.4.1.Final and Infinispan Spring Boot Starter 2.1.0.Final are out!
Dear Infinispan and Spring Boot users,
We have just released Infinispan 9.4.1.Final and Infinispan Spring Boot 2.1.0.Final.
Highlights of the Infinispan release include:
-
Export Data Grid stats to Prometheus (ISPN-9558)
-
Upgrade to protostream-4.2.2.Final (ISPN-9654)
-
Update Cassandra Store to Infinispan 9.4(ISPN-9595)
-
Handle ClientCacheEntryExpired into InvalidatedNearCacheListener (ISPN-7087)
-
Bug fixes
-
Additional code simple examples such as remote multimap or near caching
Complete release notes can be read here.
Highlights of the Infinispan-Spring-Boot release include:
-
Upgrade Spring-Boot version to 2.1.0
-
Upgrade Infinispan version to 9.4.1
-
Integration with Spring Actuator, to expose production ready metrics (ISPN-9668)
-
Bug fixes
-
Additional code examples
You can find these releases in the maven central repository.
Please report any issues in our issue tracker and join the conversation in our Zulip Chat to shape up our next release.
Enjoy,
The Infinispan Team
Tags: release spring boot
Friday, 02 November 2018
Near caching with Spring-Boot and Infinispan
We have recently released infinispan-spring-boot-starter 2.0.0.Final. This version supports Spring Boot 2.1 and Infinispan 9.4.0.Final.
Before this release, some important features - such as near caching - were only configurable by code. From now on, we can set all of the Hot Rod client configuration using the hotrod.properties file or the Spring application YAML. The latter is an important community requirement we had.
Let’s see how to speed up our applications performance with near caching!
==
==
Hot Rod
Just as a quick reminder, Infinispan can be used embedded in your application or in client/server mode. To connect you application to a server you can use an Infinispan Client and the Infinispan “Hot Rod Protocol”. Other protocols are available, such as REST, but Hot Rod is the most recommended way since it is the one that supports most of the Infinispan functionalities.
Near cache
From the Infinispan documentation: Hot Rod client can keep a local cache that stores recently used data. Enabling near caching can significantly improve the performance of read operations get and getVersioned since data can potentially be located locally within the Hot Rod client instead of having to go remote.
When should I use it?
Near caching can improve the performance of an application when most of the accesses to a given cache are read-only and the accessed dataset is relatively small. When an application is doing lots of writes to a cache, invalidations, evictions and updates to the near cache need to happen. In this scenario we won’t probably get much benefit.
As I said in the introduction, the good news is that this feature can be activated just by configuration. Code doesn’t change, so we can measure the benefits, if such exist, in a very straightforward way.
Spring-Boot
I have created a very simple application, available here. Maven, Java 8 and an Infinispan server are required to run it. You can download the server or use docker.
Docker: docker run -it -p 11222:11222 jboss/infinispan-server:9.4.0.Final
Standalone: PATH/infinispan-server-9.4.0.Final/bin/standalone.sh
Once the server is up and running, build the application using maven
>> infinispan-near-cache: mvn clean install
Activating the near cache
I need to configure two properties:
-
Near Cache Mode: DISABLED or INVALIDATED. Default value is DISABLED, so I turn it on with INVALIDATED.
-
Max Entries: Integer value that sets the max size of the near caches. There is no default value, so I set up one.
The hotrod client configuration is for each client, not for each cache (this might change in the future). With that in mind, note that configuring the previous properties will activate near caching for all the caches. If you need to activate it just for some of them, add the following property:
-
Cache Name Pattern: String pattern. For example "i8n-.*" will activate the near caching for all the caches whose name starts by "i8n-".
Configuration can be placed in the hotrod-client.properties, Spring-boot configuration or code.
Results
My dataset contains 25 contributors. If I activate the near cache with max 12 entries and I run my reader again, I get the job done in ~1900 milliseconds, which is already an improvement. If I configure it to hold the complete dataset, I get it done in ~220 milliseconds, which is a big one!
Conclusions
Near caching can help us speed up our client applications if configured properly. We can test our tuning easily because we only need to add some configuration to the client. Finally, the Spring-Boot Infinispan Starter helps us build services with Spring-Boot and Infinispan.
Further work will be done to help Spring-Boot users work with Infinispan, so stay tuned! Any feedback on the starter or any requirement from the community is more that welcome. Find us in Zulip Chat for direct contact or post your questions in StackOverflow!
Tags: hotrod near caching spring spring boot
Thursday, 11 October 2018
Infinispan Spring Boot 2.0.0.Final is out!
Dear Infinispan and Spring Boot users,
We have just released Infinispan Spring Boot 2.0.0.Final. If you are wondering why it is worth to use this starter, read Sebastian’s article here!
Highlights of this release include:
-
Uses the latest Infinispan 9.4.0.Final
-
Automatic translation of Hot Rod client properties into Spring YAML (ISPN-9437)
-
Bug fixes
You can find the release in the maven central repository.
Please report any issues in our issue tracker and join the conversation in our Zulip Chat to shape up our next release.
Enjoy,
The Infinispan Team
Tags: spring spring boot
Tuesday, 04 September 2018
Infinispan Spring Boot Beta2 is out!
Dear Infinispan and Spring Boot users,
We have just released Infinispan Spring Boot 2.0.0.Beta2.
Highlights of this release include:
-
Upgrade to Spring Boot 2.0.3.RELEASE
-
RemoteCache can be injected now. Example here
You can find the release in the maven central repository.
Please report any issues in our issue tracker and join the conversation in our Zulip Chat to shape up our next release.
Enjoy,
The Infinispan Team
Tags: release spring boot spring beta