Static Redis agent

Target Redis

Prerequisites

To have Gluesync working on your Redis instance you will need to have:

  • Valid user credentials with permission to read, and write to the target database;

The data is written to the target in the form of Redis hashes. Redis hashes are useful to represent objects within the database. Here is an example of what an object stored in a form of redis hashes looks like:

127.0.0.1:6379[1]> HGETALL ARTICLES::1
 1) "ARTICLE_NAME"
 2) "Barramundi2"
 3) "AVAILABILITY"
 4) "8951"
 5) "CURRENCY"
 6) "CNY"
 7) "DESCRIPTION"
 8) "Multi-channelled clear-thinking knowledge user"
 9) "ID"
10) "1"
11) "IMAGE_URL"
12) "http://dummyimage.com/128x128.png/ff4444/ffffff"
13) "PRICE"
14) "68.06"
15) "scope"
16) "demo"
17) "type"
18) "articles"

This type of data structure is very useful for further manipolation of the data. For instance, libraries implemented in different programming laguages are capable of converting this type of data structure directly into more appropriate objects. Here, what follows is an example of Python:

In [6]: r.hgetall("ARTICLES::1")
Out[6]:
{'ARTICLE_NAME': 'Barramundi2',
 'AVAILABILITY': '8951',
 'CURRENCY': 'CNY',
 'DESCRIPTION': 'Multi-channelled clear-thinking knowledge user',
 'ID': '1',
 'IMAGE_URL': 'http://dummyimage.com/128x128.png/ff4444/ffffff',
 'PRICE': '68.06',
 'scope': 'demo',
 'type': 'articles'}

The hash is automatically converted into a Python dictionary.

Setup via Web UI

  • Hostname / IP Address: Hostname or IP Address of your database tenant;

  • Port: Optional, defaults to 6379;

  • Database name/index: Index of your target database;

  • Username: Username with read & write access to the target tables;

  • Password: Password belonging to the given username;

Specific configuration

This agent has no specific configuration properties.

Setup via Rest APIs

Here following an example of calling the CoreHub’s Rest API via curl to setup the connection for this Agent.

Connect the agent

curl --location --request PUT 'http://core-hub-ip-address:1717/pipelines/{pipelineId}/agents/{agentId}/config/credentials' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
        "hostCredentials": {
        "connectionName": "myAgentNickName",
        "host": "host-address",
        "port": 6379,
        "databaseName": "db_name",
        "username": "",
        "password": "",
        "maxConnectionsCount": 100,
        "enableTls": true,
        "certificatePath": "/myPath/cert.pem"
      }
}'