Using JSR-107 Caching in Java-based rooms
Caching is one of those awkward bits of function you can totally avoid adding when first creating a bit of code. Everything will work just fine during your initial testing, but worries start to creep in when you start to consider what happens when running at scale: will remote services be invoked too frequently? And what happens to session data when processes are added or removed to accommodate changes in load?
There are many Caching libraries for Java, ranging from simple in memory thread safe caches, to distributed transactional remote based services. In this new two-part walkthrough, we'll go through using Redis as a backing store for JSR-107 caching via the Redisson library.
We also have a new chronicle relating our experience using Redis in the game core:
Go play!