Simple Redis Connector

Category: Connectors
Subcategory: Connectors

Overview

This application was developed in order to provide a simple way to connect your mendix app to a running Redis instance. Redis is an open source (BSD licensed), in-memory data structure store, used as database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperlog logs and geospatial indexes with radius queries.

Documentation

This module implements and abstracts the required methods from the jedis library, available at: 
https://github.com/redis/jedis

Getting Started

In the Examples folder, you can see some ways to implement the available methods. Feel free to use the java actions to do what you need. At this moment, the methods implemented are: Ping, GetValue, SetValue, HGetValue, HSetValue, HGetAll, Destroy. Each of them have a correspondent java action.

The log node name of this module is named SRC.

Be sure that when you exrport the module, you select "commons-pool2-2.4.2.jar", "jedis-3.7.0.jar" and "slf4j-api-1.7.32.jar"

Chage constants on Settings folder to your Redis URL and port.

Add the Microflow Destroy via Settings->Before Shutdown microflow or to your own after shutdown microflow to close connections to current Redis.

Commands implemented

  •  GetValue –  Get the value of a key.
  •  SetValue – Sets the string value of a key.
  •  HGetAll – Returns all fields and values of the hash stored at key.
  •  HGetValue – Returns the value associate with the field in the hash stored at key.
  •  HSetValue – Sets field in the hash stored at key to value.
  •  Ping – Check if the redis connection is working.
  •  Destroy – Close the connection to current Redis.

 

Feel free to ask for new features and updates.

    Releases

    Version: 3.0.0
    Framework Version: 9.6.0
    Release Notes: Added Auth option. Added EnableSSl option.
    Version: 2.0.0
    Framework Version: 9.6.0
    Release Notes: Improved microflows.
    Version: 1.0.0
    Framework Version: 9.6.0
    Release Notes: Initial version.