Real-time context

Real-time serving in FeatureQL enables low-latency feature retrieval for online inference. This section covers the tools for connecting to operational data stores and serving features in production.

Key capabilities

Data source integration:

  • EXTERNAL_REDIS(): Retrieve features from Redis key-value stores
  • EXTERNAL_JDBC(): Query features from JDBC-compatible databases
  • EXTERNAL_HTTP(): Fetch features from REST APIs and microservices

Production patterns:

  • Prepared statements: Pre-compiled feature queries for optimal performance
  • Federated queries: Combine features from multiple real-time sources
  • Feature logging: Track feature values for monitoring and debugging

Real-time constraints

No presentation layer: Real-time serving focuses on individual feature retrieval, not analytical queries. The WHERE, GROUP BY, ORDER BY, and LIMIT clauses used in batch analytics are not applicable.

No aggregations: Aggregations via RELATED() or EXTEND() are not supported in real-time contexts. Use precomputed aggregates or prematerialized collections of ids as sources for your features.

Use prepared statements: While free-form queries work for prototyping, production deployments should use prepared statements for predictable performance and resource usage.

Last update at: 2025/12/05 16:03:14
Last updated: 2025-12-05 16:07:55