Introducing the anypoint connector for redis

14
Introducing the Anypoint Connector for Redis

Transcript of Introducing the anypoint connector for redis

Page 1: Introducing the anypoint connector for redis

Introducing the Anypoint Connector for

Redis

Page 2: Introducing the anypoint connector for redis

• REmote DIctionary Server (REDIS) is an open source, in-memory data structure store which was created by Salvatore Sanfilippo in 2009 for real-time web analytics. This open source project had been sponsored by VMware and Pivotal Software, and since June 2015, has been sponsored by Redis Labs. According to Redis Day TLV 2016, Redis has gained lots of adoption in thousands of companies including American Express, Atlassian, Ariba, Facebook, Intuit, TripAdvisor, Twitter, and Verizon.

Page 3: Introducing the anypoint connector for redis

• You can use Redis to cache a user profile, create a leaderboard, track real-time activities on a website, implement a spam filtering system, use it as a message queue, and more. At MuleSoft, we have seen customers use Redis as a cache storage layer while using MongoDB as a persistent message storage layer, to process huge amounts of payroll and employee data with Redis Cluster, and as a NoSQL database. To support the growing number of customers leveraging Redis, we are thrilled to release the Anypoint Connector for Redis today.

Page 4: Introducing the anypoint connector for redis

• Here is a quick example of how to use the Redis Connector, compatible with Redis 2.8, 3.0 and 3.2. This demo app allows you to test basic operations of Redis Connector. The app consists of two flows; the first flow shows 12 different operations which will be triggered by your choice, the second flow shows you a web page where you can pick an operation.

Page 5: Introducing the anypoint connector for redis

Let’s configure this Redis Connector first. Go to Global Elements, and find “Redis.” After selecting “Redis,” click on “Edit”.

Page 6: Introducing the anypoint connector for redis
Page 7: Introducing the anypoint connector for redis

• In the Redis: Configuration, you can specify the configuration of your Redis server. You could directly add your Redis Server information in the configuration, but I recommend that you use the properties file to add your configuration information. Since I’m running a Redis Server locally on my Mac, the configuration of my Redis Server I will use looks like this:

Page 8: Introducing the anypoint connector for redis

• config.host=localhost• config.connectionTimeout=60000• config.port=6379• After you complete the configuration for your Redis environment, run

the app. When you open up a browser and hit localhost:8081, your browser will show the following page.

Page 9: Introducing the anypoint connector for redis
Page 10: Introducing the anypoint connector for redis

• Since implementing a leaderboard is one of main use cases, I’d like to show an example of using a sorted set. When you scroll down on the webpage, you will see the following page.

Page 11: Introducing the anypoint connector for redis
Page 12: Introducing the anypoint connector for redis

• I added the following data to a sorted set called “Max the Mule.”• Key Value Score• Max the Mule Nathan 50• Max the Mule Anton 70• Max the Mule Ashley 110• Max the Mule Alex 150

• I’m only interested in those who scored higher than 100, so when I put the following information in “Get range by score”, Redis will show only Ashley and Alex who scored more than 100.

Page 13: Introducing the anypoint connector for redis
Page 14: Introducing the anypoint connector for redis

• For new users, try the above example to get started, and for others, please share with us how you are planning to use the Redis Connector! Also, explore the Anypoint Exchange to see other resources you can leverage today.