Solution Patterns: Event-Driven Intelligent Applications
This solution pattern showcases an architecture which is scalable and efficient system capturing and responding to streaming data using Kafka as the streaming platform and AIML. With Event-Driven Architecture this system can connect to, and consume from a number of systems, services and data sources by responding to triggering events.
This architecture demonstrates how an Event-Driven Architecture with Red Hat AMQ Streams and OpenShift Serverless can help build an intelligent system with OpenShift Data Science platform to drive business insights and drive an event-driven workflow.
Contributors : Jaya Baskaran (Red Hat), Ritesh Shah (Red Hat)
1. Use cases
Common use cases that can be address with this architecture are:
-
Machine Learning and Real-Time Analytics to build business intelligence
-
Fraud Detection in financial institutions
-
Personalized Recommendations
-
Forecasting demand
-
Image and Video Analysis for object detection, monitoring, face recognition
-
Sentiment analysis
2. The story behind this solution pattern
This solution pattern extends Globex a fictitious retail store which has undergone modernization journey and has already adopted Kafka as a streaming platform. Globex wants to now extend their eCommerce website to allow customers to leave their reviews of the product catalogue.
Globex would like to
-
Moderate the language comments to ensure foul language is appropriately filtered out
-
Build a Sentiment Analysis system to gain business intelligence based on the product reviews
3. The Solution
The solution based on an Event Driven Architecture which based on Apache Kafka as the data streaming platform for product reviews. The Product Reviews submitted by a customer is pushed in a Kafka topic, which is then consumed by both a Review Moderation Service (moderate for foul/abusive language) and Sentiment Analysis Service (scores the sentiment as positive or negative).
The data flows in and out of different systems through the OpenShift Serverless Eventing architecture which uses brokers, sources and triggers to build a scalable, fully decoupled system.
Once a review is moderated and marked as suitable, this is persisted in the Globex Product Review DB (PostgreSql) to be then show on the Products page. The Sentimenet Analysis score is persisted within a Time Series DB (InfluxDB in this case) then used to build a Dashboard (Grafana) to view how well a particular category of products is performing over different time period