Member-only story
Real-time Stream Analytics and User Scoring Using Apache Druid, Flink & Cassandra at Deep.BI
Last October, we were honored to join the likes of Netflix, Alibaba, Salesforce, Airbus, Uber, Goldman Sachs, Yelp, Pinterest and many others presenting at Flink Forward in Berlin covering our area of expertise working with Apache Flink in combination with Apache Druid and Cassandra for real-time user and event scoring applications.
One of the hardest challenges we were able to tackle at Deep.BI is how to deliver customizable insights based on billions of data points in real-time, that fully scale from a single perspective up to millions of users.
At Deep.BI we track user habits, engagement, product and content performance — processing up to terabytes or billions of events of data daily. Our goal is to provide real-time insights based on custom metrics from a variety of self-created dimensions. The platform allows the performing of tasks from various domains such as adjusting websites using real-time analytics, running AI optimized marketing campaigns, providing a dynamic paywall based on user engagement and AI scoring, or detecting frauds based on data anomalies and adaptive patterns.
To accomplish this, our system collects every user interaction. We use Apache Flink for event enrichment, custom transformations, aggregations and serving machine learning models. The processed data is then indexed by Apache Druid for real-time analytics and Apache Cassandra for delivery of the scores. Historical data is also stored on Apache Hadoop for machine learning model building. Using the low-level DataStream API, custom Process Functions, and Broadcasted State, we have built an abstract feature engineering framework that provides re-usable templates for data transformations. This allowed us to easily define domain-specific features for analytics and machine learning, and migrate our batch data preprocessing pipeline from Python jobs deployed on Apache Spark to Flink, resulting in a significant performance boost.