How to Build a Machine Learning Feature Store With GridGain and Feast
Use GridGain 8 as a low-latency Feast online store for real-time machine learning feature serving, illustrated with a CGM glucose-prediction demo.
Prerequisites
A running GridGain 8 cluster on bare metal or a VM
Feast, the feature store platform used to store, manage, and serve features
Python, to run the feature engineering and serving code
Overview
Features are individual measurable properties used as input for machine learning models. Feature engineering and extraction is the process of transforming raw data into formats that best represent the underlying problem to the predictive models. For example, in a CGM (Continuous Glucose Monitoring) system, features might include current glucose levels, time of day, day of week, and historical glucose levels.
Feature serving is the process of making these engineered features available for both training and inference.
Feast is a platform that combines feature management capabilities with storage backend integrations. It serves as a centralized repository for storing, managing, and serving features to machine learning models.
This guide explains how GridGain works as a low-latency online feature store for Feast, using a real CGM glucose-prediction system as the example.
Online vs Offline Feature Stores
Feature stores typically operate in two modes:
Offline feature store:
Stores historical feature values used for model training
Optimized for batch processing
Usually implemented using data warehouses or data lakes
Online feature store:
Serves features in real-time for model inference
Requires extremely low latency (milliseconds)
Usually implemented using in-memory databases
Why GridGain for an Online Feature Store?
GridGain serves as an ideal online feature store due to its distributed in-memory architecture:
Low-latency access:
In-memory data storage provides sub-millisecond access times
Critical for real-time feature serving in production environments
Enables immediate feature updates and retrieval
Horizontal scalability:
Distributed architecture allows seamless scaling across clusters
Handles growing feature sets and increasing request volumes
Maintains performance as demand increases
High availability:
Built-in data replication ensures fault tolerance
Automatic failover capabilities
No single point of failure
The CGM Prediction System: A Real Example
The demonstration project implements a sophisticated CGM (Continuous Glucose Monitoring) prediction system that leverages GridGain's capabilities as a Feast online store. This system showcases how GridGain can serve as a high-performance backend for real-time feature serving in healthcare applications.
Glucose Prediction Model
The system includes a pre-trained model (glucose_prediction_model-v1) that predicts future glucose levels based on historical data and current readings. Key aspects of the model include:
Personalized predictions: The model takes into account individual subject data to provide personalized glucose predictions
Time-based features: Incorporates temporal features like day of the week and time of day to capture daily and weekly patterns
Historical context: Uses historical glucose readings to understand trends and patterns
Real-time updates: Continuously updates predictions as new CGM readings arrive
Under the Hood
Data organization
Raw CGM readings are fetched by the Kafka producer and stored in Kafka for real-time processing
Historical data maintained in offline store (Parquet or Snowflake)
Real-time features served from GridGain online store
Custom feature transformations for time-based aggregations
Feature engineering
Time-based feature extraction (hour of day, day of week)
Event-based feature generation from CGM data streams
Performance
Sub-millisecond feature retrieval times
Real-time feature updates from streaming data
Model integration
Seamless integration with pre-trained glucose prediction model
Real-time feature serving for immediate predictions
This implementation demonstrates how GridGain's distributed computing capabilities can be leveraged to build a scalable, high-performance feature store that provides accurate and timely features for glucose prediction while maintaining low latency and high availability.
Demonstration Project
A fully functional demo project is available on GitHub in the Feast demo repository. It includes functional sample code, as well as step-by-step instructions on setting up and running the project.
Related
Feast - The feature store platform used for storing, managing, and serving features.
GridGain Feast CGM demo - The demonstration project with sample code and setup instructions.
This page is: Copyright © 2026 MariaDB. All rights reserved.
Last updated
Was this helpful?

