How to use IBM App Connect with Redis
Redis (REmote DIctionary Server) is an open source data store, which holds data in memory and functions as a database, cache, and message broker.
As a NoSQL database, Redis stores key/value pairs in data structures (such as string, hash, and list data types) rather than within tables and other database objects, which are used by SQL-based relational databases. Redis also provides a set of commands that can be used to execute operations on the Redis server (for example, SET and GET) in much the same way as SQL-based statements such as INSERT or SELECT.
- Cloud-managed connector
- Local connector in containers (Continuous Delivery release)
- Local connector in containers (Extended User Support release)
- Local connector in containers (Long Term Support release)
Connecting to Redis
To connect App Connect to an Redis account that you want App Connect to use, you need the following connection details, which should be available from your instance. For example, if using IBM Cloud® Databases for Redis, you can obtain the connection values from the Connections panel and Service Credentials panel of your service instance in IBM Cloud.
- Redis host name or IP address: Specify the host name or IP address of the Redis server.
- Redis port number: Specify the port number of the Redis server.
- Password: Specify the password required for authentication.
- Database number: Optionally specify the database index of the database to connect to,
typically from a range of
15. (The index is generally shown at the end of a Redis URL.) The default is
- Allow certificate validation: Set to
falseto indicate whether the database is secured using TLS authentication and encryption. If set to
true, you'll need to provide an SSL or a TSL certificate to validate against the root certificate from the certificate authority (CA). The default is
- Certificate: If Allow certificate validation is set to
true, a certificate is mandatory. Specify the contents of the CA signed certificate for the cluster that hosts the database, in Base64 format. You can copy and paste the Base64-encoded contents directly from your instance.
To connect to Redis from the App Connect Designer Catalog page for the first time, under Redis click Connect. This creates an account in App Connect. For more information about ways to connect to Redis, see Managing accounts in App Connect.
Before you use the account that is created in App Connect in a flow, rename the account to something meaningful that helps you to identify it. To rename the account on the Catalog page, select the account, open its options menu (⋮), then click Rename Account.
What should I consider first?
Before you use App Connect Designer with Redis, take note of the following considerations:
- (General consideration) You can see lists of the trigger events and
actions that are available on the Catalog page of the App Connect Designer.
For some applications, the events and actions in the catalog depend on the environment (IBM Cloud Pak for Integration or App Connect on IBM Cloud) and whether the connector supports configurable events and dynamic discovery of actions. If the application supports configurable events, you see a Show more configurable events link under the events list. If the application supports dynamic discovery of actions, you see a Show more link under the actions list.
- (General consideration) If you are using multiple accounts for an application, the set of fields that is displayed when you select an action for that application can vary for different accounts. In the flow editor, some applications always provide a curated set of static fields for an action. Other applications use dynamic discovery to retrieve the set of fields that are configured on the instance that you are connected to. For example, if you have two accounts for two instances of an application, the first account might use settings that are ready for immediate use. However, the second account might be configured with extra custom fields.
- App Connect supports the following cloud-hosted Redis deployments:
- App Connect supports the following Redis data structures, which are exposed as objects:
- Sorted Sets
- App Connect also supports a subset of Redis commands, which are exposed as actions. You can see which Redis commands are supported by expanding the list of objects on the Applications tab. For example, the following commands are supported for hashes:
Events and actions
These events are for changes in this application that trigger a flow to start performing the actions in the flow.
These are actions on this application that you want a flow to complete.
- Update or create hash
- Check hash field presence
- Get hash field count
- Get hash field value
- Delete key
- Check key presence
- Get data type of key
- Set expiry timeout of key (seconds/milliseconds)
- Set expire-at time of key
- Get time to live of key (seconds/milliseconds)
- Remove expiry timeout from key
- Rename key
- Update or create list
- Update list
- Get list length
- Trim list
- Update or create set
- Check set member presence
- Get set member count
- Sorted sets
- Update or create sorted set
- Get sorted set member count
- Get sorted set member count by score range
- Get sorted set member rank
- Get sorted set member score
- Update or create string
- Append value to string
- Get value of string