Dragonfly is a modern in-memory datastore that implements novel algorithms and data structures on top of a multi-threaded, share-nothing architecture. Thanks to its API compatibility, Dragonfly can act as a drop-in replacement for Redis. Due to Dragonfly's hardware efficiency, you can run a single node instance on a small 8GB instance or scale vertically to large 768GB machines with 64 cores. This greatly reduces infrastructure costs as well as architectural complexity.
Similar to Redis, Dragonfly can be used as an online feature store for Feast.
Make sure you have Python and
Install the Feast SDK and CLI
pip install feast
In order to use Dragonfly as the online store, you'll need to install the redis extra:
pip install 'feast[redis]'
Bootstrap a new feature repository:
feast init feast_dragonfly
feature_repo/feature_store.yamlwith the below contents:
There are several options available to get Dragonfly up and running quickly. We will be using Docker for this tutorial.
docker run --network=host --ulimit memlock=-1 docker.dragonflydb.io/dragonflydb/dragonfly
applycommand scans python files in the current directory (
example_repo.pyin this case) for feature view/entity definitions, registers the objects, and deploys infrastructure. You should see the following output:
Created entity driver
Created feature view driver_hourly_stats_fresh
Created feature view driver_hourly_stats
Created on demand feature view transformed_conv_rate
Created on demand feature view transformed_conv_rate_fresh
Created feature service driver_activity_v1
Created feature service driver_activity_v3
Created feature service driver_activity_v2