RisingWave use cases
RisingWave excels in a variety of real-time data processing scenarios, making it an ideal choice for several categories of use cases, including:
- Streaming analytics
- Event-driven applications
- Real-time data enrichment
- Feature engineering
This article will explore these use cases in detail, complete with practical examples to demonstrate how RisingWave can be effectively utilized.
Streaming analytics
Consider scenarios like stock trading, sports betting, IoT monitoring, or other domains where you are dealing with high-velocity event streams from APIs, sensors, Kafka, or other sources. The need to continuously analyze this data is crucial for detecting buy or sell opportunities in financial markets, monitoring real-time sensor data for anomalies, or tracking live sports events for betting insights. In such cases, the analysis must be both fresh and consistent, ensuring that decisions are made based on the most current information.
Example: Stock trading analytics
Take stock trading as an example. Imagine you want to analyze real-time market data to identify potential trading opportunities. Suppose your data is streaming from Kafka. Here is how RisingWave can streamline this process.
- Connect to Kafka
Begin by connecting RisingWave to your Kafka topic to ingest the live market data.
- Express analytics logic in materialized views
Define your analytics logic using SQL in materialized views. For instance, you might want to detect price movements that indicate a buy or sell signal.
- Check the result
Query the materialized view to get real-time insights on potential buy signals.
With RisingWave, you can efficiently process and analyze streaming data in real-time, enabling timely and informed decision-making.
Event-driven applications
In event-driven architectures, the ability to respond to events as they happen is paramount. Whether you are building sophisticated monitoring and alerting systems for critical applications like fraud detection, anomaly detection, or customer engagement systems like marketing automation, RisingWave provides the real-time capabilities you need.
Example: Fraud detection system
Imagine building a fraud detection system that monitors credit card transactions. You want to trigger an alert when a credit card is used more than five times within a short period for purchases exceeding a certain amount.
- Connect to Kafka
Ingest the transaction data from Kafka.
- Define the event logic
Create a materialized view that tracks suspicious activity for cards that are used more than five times within five minutes and have a total purchase amount over 5000.
- Send alerts
Deliver the results to another Kafka topic or directly trigger alerts.
By leveraging RisingWave, you can implement real-time monitoring and alerting systems that react instantly to critical events, enhancing security and operational efficiency.
Real-time data enrichment
Real-time data enrichment is essential in scenarios where raw data needs to be augmented with additional context before being processed further. This is particularly useful for industries like finance, e-commerce, and ad tech, where combining real-time data streams with historical or reference data can significantly enhance decision-making.
Example: Real-time customer personalization in E-Commerce
Imagine running an e-commerce platform and wanting to personalize customer experiences in real-time. As customers browse your site, you collect clickstream data and combine it with historical purchase data to offer personalized recommendations instantly.
- Ingest real-time clickstream data
Connect RisingWave to your clickstream data from Kafka and your historical data source from PostgreSQL.
- Enrich data with historical purchases
Join the real-time clickstream data with historical purchase data to generate personalized product recommendations.
- Deliver personalized recommendations
Send the enriched data to the recommendation engine for immediate use.
RisingWave empowers you to enhance customer experiences in real-time by enriching raw data with valuable context, leading to more accurate and effective personalization.
Feature engineering
Feature engineering is the process of creating feature vectors from raw data, which are essential inputs for machine learning models. In industries like ad tech, where predicting user behavior in real-time is crucial, generating accurate feature vectors from streaming data can significantly enhance the performance of your models.
Example: Real-time ads bidding
In the context of online advertising, predicting the optimal bidding price for ad slots is a key challenge. By using the previous day’s bidding data, you can build feature vectors that help predict future bidding prices in real-time.
- Ingest previous day’s bidding data
Start by ingesting the previous day’s bidding data from Kafka into RisingWave.
- Build feature vectors
Create feature vectors that capture important attributes such as average bid amount, maximum bid, and bid frequency. These features will be used to train your model and make predictions.
- Use feature vectors for prediction
These feature vectors can then be used by your machine learning model to predict the optimal bid for future ad slots.
- Real-time inference
As new bidding data arrives, you can continuously update your feature vectors and use them for real-time inference, ensuring your bids are always informed by the most recent data. For instance, you can create a User-defined function, PREDICT_BID
, that predicts the next bid given the most recent data.
RisingWave enables the seamless creation and updating of feature vectors from streaming data, ensuring that your machine learning models are always working with the most relevant and up-to-date information for real-time ad bidding.
Was this page helpful?