RedisGears ¶
What is RedisGears? ¶
RedisGears is a serverless engine for transaction, batch and event-driven data processing in Redis. It is a dynamic framework for the execution of functions that, in turn, implement data flows in Redis, while (almost) entirely abstracting the data's distribution and choice of deployment (i.e. stand-alone vs. cluster, OSS vs. Enterprise). Functions can be implemented in different languages, including Python and C APIs .
For example, you can use RedisGears to count the words in Redis:
gb = GearsBuilder()
gb.map(lambda x: x['value']) # map records to "sentence" values
gb.flatmap(lambda x: x.split()) # split sentences to words
gb.countby() # count each word's occurances
gb.run()
In broad strokes, the following diagram depicts RedisGears' components:
+---------------------------------------------------------------------+
| Redis Server +--------------------------------------+ |
| | RedisGears Module | |
| +----------------+ | | |
| | Data | Input | +------------+ +-------------------+ | |
| | +-------->+ | Function | | APIs | | |
| | Key1 : Value1 | | | +--------+ | | C, Python, ... | | |
| | Key2 : Value2 | Output | | | Reader | | +-------------------+ | |
| | Key3 : Value3 <---------+ | +---+----+ | +-------------------+ | |
| | ... | | | v | | Redis commands | | |
| +----------------+ | | +---+----+ | | Gears admin & ops | | |
| | | | Step 1 | | +-------------------+ | |
| | | +---+----+ | +-------------------+ | |
| +----------------+ | | v | | Coordinator | | |
| | Events | | | +---+----+ | | Cluster MapReduce | | |
| | | Trigger | | | Step 2 | | +-------------------+ | |
| | Data update +-------->+ | +---+----+ | +-------------------+ | |
| | Stream message | | | v | | Engine | | |
| | Time interval | | | ... | | Runtime execution | | |
| | ... | | +------------+ +-------------------+ | |
| +----------------+ +--------------------------------------+ |
+---------------------------------------------------------------------+
Where Next? ¶
- The Introduction is the recommended starting point
- The Overview page summarizes the concepts used by RedisGears
- The reference pages about RedisGears' Runtime , Functions , Readers and Operations
- The RedisGears Commands reference
- The Quickstart page provides information about getting, building, installing and running RedisGears
- There are interesting uses and RedisGears recipes in the Examples
Quick Links ¶
Contact Us ¶
If you have questions, want to provide feedback or perhaps report an issue or contribute some code , here's where we're listening to you:
License ¶
RedisGears is licensed under the Redis Source Available License Agreement .