Page cover
githubEdit

What's New With 2.x

Version 2 is a major rewrite of our Java Extension. You can find the release notes and the major areas of improvement here.

Major Updates

Redis Logical Database Support

By default Redis supports the concept of logical databasesarrow-up-right. In our previous extension you could only connect to database 0, which is the default database. This meant that all cache connections had to connect to this database and add a prefix key per connection to avoid collisions.

Now, you can add which logical database to connect to and partition your installation by logical database rather than by prefix. Thus, providing great separation of concerns for your connections and applications. On your cache connection details for the Redis Cache, just select which database number to connect to. That's it!

Redis Cluster Support

Cluster Support

We have added the capability to connect to not only standalone Redis instances via our Redis Cache connector, but we have now introduced the Redis Cluster Cache connector. This connector can connect to any Redis Cluster and give you all the great features our extension gives.

Cluster Configuration

Redis Cluster Functions

We have also introduced several new functions for usage in a cluster cache:

Function
Description

RedisGetCluster( cacheName )

Get access to the underlying Redis Cluster Java class so you can execute native cluster commands.

RedisGetClusterNodes( cacheName )

Returns a struct of all the nodes and their appropriate Java classes representing their node connection pools.

Redis Pub/Sub

https://dingyuliang.me/wp-content/uploads/2018/02/redis-pubsub-768x407.png

We have introduced the capability for your CFML code to now leverage Redis Publish and Subscribe constructs. This will allow your CFML code to have native messaging via Redis.

Documentation

What is Pub/Sub?

Redis Pub/Sub implements the Publish/Subscribe messaging paradigm. This decoupling of publishers and subscribers can allow for greater scalability and a more dynamic network topology.

  1. Subscribers express interest in one or more channels (literal channels or pattern channels).

  2. Publishers send messages into channels.

  3. Redis will push these messages into different subscribers which have matched the channel's message.

Pub/Sub Functions

In order to leverage this pattern you will use the following two functions:

Function
Description

RedisPublish( channel, message, cacheName )

Publish a message into Redis into a specific channel.

RedisSubscribe( subscriber, channels, cacheName )

Subscribe to a channel for messages using a closure/lambda or a listener CFC

Publish Example

Subscribe Example

Subscriber Listener CFC

Code Quality

We have completely refactored our internal Java code to include code quality metrics via SonarLint, upgrades to JDK 8-11 constructs, internal streams and so much more.

Better Exception Handling

Dealing with exceptions is always nasty. However, in this release we have optimized all exceptions so better debugging is added and we can pinpoint bugs and improvements.

Release Notes

Fixed

Added

Last updated

Was this helpful?