Developers can define server-side functions that events trigger for execution.
A trigger is an event associated with data processing within Redis. Triggers encompass on-demand calls to a function, a specific command execution, stream processes, or time-related events. Any of these conditions can trigger the execution of a function stored in Redis.
Faster application logic
The application logic runs where the data lives and it executes when the data is changed. This removes network latency caused by data requests to and from the database used by third-party services.
Simpler application logic
Eliminates the need to maintain the same code across different applications. You can move application functionality inside the Redis database instead of transporting the code from the client application to the database every time you execute that code.
Better data consistency
Maintain consistent data when applications react to changing real-time conditions in the keyspace instead of using Pub/Sub notifications. The application performs the same functions when a defined trigger is encountered.
Improved code resiliency
The database contains the code to execute these functions. The triggers and functions are backed up and replicated along with the database.
Extend and validate data
Instead of sending metadata, process data, or validation requests to client applications for processing, add them directly on Redis.
Avoid duplicating code in each application. Each developer-defined function executes consistently in the Redis database regardless of the programming language used.
Construct complex database operations in a single transaction, ensuring data integrity and consistent processing directly in the Redis database.