Integration Engine Solutions to Connect Anything to Anything

Log out?

PilotFish Redis XL User Guide

Table of Contents

Redis XL is an XML evaluation and execution system for making complex command calls to a Redis system. It allows for running any number of command calls in sequence, passing data between them, and outputting the response from the response in an easy to parse Format.

Redis XL benefits from a powerful set of tools that can be used around the actual commands, such as flow control, iteration, conditional logic, exception handling, outputting data, etc. It also has the ability to simply and effectively express any Redis command call needed.

This document will explain how to use all of Redis XL’s features so that this tool can be used effectively within the PilotFish application.

In many cases, Redis XL will be generated using XSLT in the PilotFish Data Mapper. In many ways, Redis XL is very similar in concept to XSLT: a series of special XML elements that provide instructions to a Processor that evaluates them. Because of how XSLT can dynamically build an output Format based on the values in an input format, it is ideal to use the Data Mapper to generate Redis XL using the data coming in.

However, it is important to always be aware that Redis XL and XSLT are completely independent of each other. They are each evaluated separately, by totally separate components. The XSLT created by the Data Mapper is evaluated during the XSLT Transformation stage, whereas the Redis XL is evaluated by a subsequent stage, usually the PilotFish Redis XL Transport.

This means that any XSLT instruction elements will only be used for creating the Redis XL document, and will not be present when the Redis XL is being evaluated. A good example would be iteration. An <xsl:for-each /> element will be used by the XSLT Transformation to produce XML output during its iteration. A <http:Iterate /> (covered later in this document) element will achieve the same iteration, but it will run only later when the Redis XL is evaluated.

The simple rule of thumb is that anything with the XSLT namespace prefix will only be present for the XSLT Transformation, while anything with the Redis XL namespace prefix will only be evaluated later on.

Redis XL supports a large subset of the currently available Redis commands but doesn’t include those that would be too cumbersome to understand and work with or wouldn’t make logical sense within the scope of the Redis XL. BITOP is an example of a command that would be far too cumbersome to try and represent in an XML-based structure. Redis XL currently supports nearly all commands available for Strings, Sets, Hashes, and HyperLogLog, as well as the PUBLISH command for Pub/Sub functionality and key-related commands like EXISTS, KEYS, and FLUSHALL.

This is a quick overview of what a typical Redis XL document looks like and how the different pieces are assembled. Each piece will be explained in more detail later in this Guide.

The main structure of the Redis XL format is centered around the call/response nature of Redis itself, where issuing a command is done in two XML parts: CommandCall and CommandResponse.

The CommandCall piece is what actually executes the desired command. Any parameters required for the command, like the key and value information for this SET command, are provided as attributes. In the event a command can take multiple keys or values, provide those in a comma-separated format like so:

The tooltip documentation in the mapper itself also describes the necessary format. The commands are broken down by general type, where the children of the CommandCall element are Strings, Sets, etc., and nested within each of those are the actual GET, SET… commands.

Once the command is executed, the actual response from the Redis server is handled in the CommandResponse element. In this example, we are using the ‘as’ attribute to set the response into the variable ‘values’, and then using Output to write the response into the actual result XML generated after execution. Since the GET command here retrieves the value at the specified key, the response here would be a simple ‘testValue’ string. Array return types will be in a [field1, field2, field3…] format, and any integer returns will simply be displayed and handled as strings.

The Redis XL Listener and Transport operate essentially the same, though the Listener runs a provided Redis XML file on a polling schedule and begins Transactions while the Transport typically ends a transaction by evaluating and running the Redis XML contained in the Transaction Data. Both modules take the same set of Redis-related configuration as well, shown in the screenshot below:

Basic Tab

Debug Tab

Advanced Tab

This is a unique website which will require a more modern browser to work! Please upgrade today!