Delphi Redis Client is the official Redis client usable with Delphi. Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster (source https://redis.io/).
The official project repository is https://github.com/danieleteti/delphiredisclient
However, since novembre 2016 Delphi Redis Client is available through the GetIt package manager included in RAD Studio. To install it, run RAD Studio, go to Tools->GetIt Package Manager and search for “redis”.
You should see the following screen:
Click on Install, wait the completion of the installation and you are up and running to use redis. At the end of the installation, a demo project is automatically opened in RAD Studio. To check you installation (and if you have a redis instance running on localhost with the standard port) you can simply run the project and check the output, otherwise change the sample code to connect to your running redis instance.
In the sample folder you can find some other classic redis utilization and you can get in confidence with the library.
If you need some support, you can use the same facebook group of DelphiMVCFramework: https://www.facebook.com/groups/delphimvcframework/
I really think that a lot of non-trivial applications (if not all) can get a huge benefit using redis for one of the following things:
- Caching (even database query caching)
- Job Queue
- Distributed Locks
- Implementing rate limit strategies
- Push Notifications
- Optimizing searches
- Asynchronous report generations (or other heavy weight activities)
- …a lot of other things