Recommendation Engine

Real-Time Recommendation Engine with SQL

Build a recommendation engine that reflects what users are doing right now. RisingWave continuously updates preference scores and behavioral signals from Kafka — no batch pipelines, no stale features.

Sub-Second
Feature Freshness
User preference scores and item affinity signals update as clicks and purchases arrive — recommendations reflect the current session
SQL
Feature Engineering
Define collaborative filtering signals, item co-occurrence, and user embeddings with standard SQL — no Spark jobs required
PostgreSQL
Serving Interface
Query recommendation features from any ML serving framework via standard SQL using JDBC, psycopg2, or pgvector
Session-Aware
Window Support
Native sliding, tumbling, and session windows for in-session behavior aggregation without custom streaming code

Why Real-Time

Why do recommendation engines need real-time features?

User intent changes within a session. A batch-computed preference profile from last night does not reflect that a user just spent 20 minutes browsing hiking boots. Real-time recommendation engines capture in-session signals — page views, add-to-cart events, search queries — and update feature values as they happen, so model predictions stay relevant throughout the browsing session.

FactorBatch PipelineRisingWave
Feature FreshnessHours (batch job)Sub-second (streaming)
Session AwarenessNone (stale snapshot)Full (sliding windows)
InfrastructureSpark + Feature Store + CacheSingle SQL system
Iteration SpeedHours to deploy new signalMinutes (SQL iteration)
  • Capture in-session intent signals that batch jobs miss entirely
  • Eliminate training-serving skew by using the same SQL logic for both training features and online inference
  • Reduce recommendation staleness from hours to sub-second
  • Enable rapid iteration — add a new behavioral signal by writing a SQL view, not a Spark job

Use Cases

Where do real-time recommendations matter most?

Any platform where user intent changes faster than a batch job runs benefits from real-time recommendations. E-commerce, content streaming, news feeds, and ad targeting all see measurable improvements in click-through and conversion rates when recommendations reflect current session behavior.

E-Commerce Product Recommendations

Compute real-time co-purchase signals, cart affinity, and category preferences from clickstream and order events to surface relevant products during active browsing sessions

Content Streaming Personalization

Update watch history, genre affinity, and completion rate features continuously from play events, keeping content feeds aligned with what users are watching right now

News and Article Feeds

Aggregate topic engagement scores, reading time, and share signals in real time to rank articles by predicted relevance for each user's current interests

Ad Targeting and Retargeting

Maintain real-time behavioral segments, intent signals, and conversion likelihood features to improve ad relevance and reduce wasted impressions

How It Works

How does RisingWave power a real-time recommendation engine?

RisingWave consumes clickstream, purchase, and behavioral events from Kafka and continuously updates SQL materialized views that serve as recommendation features. Your model inference layer queries these views at prediction time via a PostgreSQL interface, getting always-fresh features without caching infrastructure.

  • Ingest clickstream and transaction events from Kafka using a native source connector
  • Define user preference features, item affinity scores, and co-purchase signals as SQL materialized views
  • Use sliding or session window aggregations to capture in-session behavior
  • Join real-time behavioral features with offline item embeddings or popularity rankings
  • Serve features at inference time via any PostgreSQL client — no Redis or DynamoDB caching layer needed

Frequently Asked Questions

How do I build a real-time recommendation engine?
How does RisingWave compare to Feast or Tecton for recommendations?
Can I build session-based recommendations with RisingWave?
How fresh are recommendation features in RisingWave?

Build smarter recommendations with real-time SQL

Connect Kafka clickstream data to materialized views and start serving fresh recommendation features in minutes.

Start Building
Best-in-Class Event Streaming
for Agents, Apps, and Analytics
GitHubXLinkedInSlackYouTube
Sign up for our to stay updated.