SlideShare a Scribd company logo
Catch Them in the Act:
CEP for Realtime
Ecommerce Influence
Srinath Perera
Director Research WSO2, Apache Member
(@srinath_perera)
srinath@wso2.com
Retail
World 7B People
- 6.5B have a phone
- 2.5B online
Global E-commerce itself was 1.5
Trillion market (215$/year for
everyone in the world).
Catch Them in the Act: CEP for Real-time Ecommerce Influence
Recommendations
One of the main retail
scenarios, can be extended
to targeted marketing and
deals
Search let us make sense of
unstructured Web
In retail, there are too many
choices, Recommendations
help us make a decision.
A Main driver of traffic (e.g.
70% amazon site is devoted
for recommendations, 70%
Netflix sales though
Finding Recommendation
Problem: based on customer activities (purchases, ratings,
views) etc., find out products that are of interest to him
- Done by finding similar items or similar users (common case)
There are often Millions of customers and even millions of
items
Recommendations (Collaborative Filtering)
What if you can freeze time!!
Most solutions are overnight
Think how you would buy something!
Research a bit and buy, often overnight is
too late.
But not all trends takes time
- People change their mind
- Trends move fast
- React to what customer is doing (do not let
him move away)
At CEP speed 400k/sec, if each event
takes a second, it takes 4 days to pass a
second in real world!!
Catch Them in the Act: CEP for Real-time Ecommerce Influence
Real-time Analytics
Idea is to process data as they are received
in streaming fashion
Used when we need
- Very fast output
- Lots of events (few 100k to millions)
- Processing without storing (e.g. too much
data)
Two main technologies
- Stream Processing (e.g. Strom,
http://storm-project.net/ )
- Complex Event Processing (CEP)
http://wso2.com/products/complex-event-
processor/
Complex Event Processing
Lambda Architecture with WSO2 Products
WSO2 Big Data Platform
Demo Usecases
Operations Dashboard
Automatic Offers
Recommendations based
on personal trends
Recommendations based
on overall trends
Demo Usecase Architecture
Catch Them in the Act: CEP for Real-time Ecommerce Influence
Dashboard
Dashboard to show Realtime Analytics about the site
Example query (e.g. number of purchases or views for each
tag last minute)
from transactionStream[metadata== 'purchase'
or metadata== 'select']#window.time(1 min)
select tag, count(*) as count group by tag
update tagInfo on tagInfo.tag == transactionStream.tag;
Catch Them in the Act: CEP for Real-time Ecommerce Influence
Automatic Offers
If user have brought books worth more than 50$ within a
day, given 25% off on the next book
from SalesStream#window.time(1d)
select sum(price) as total having total > 50
insert into ..
Catch Them in the Act: CEP for Real-time Ecommerce Influence
Recommendations based on
personal trends
Look at recent history of the user, and find items he has
viewed in last day
Find a user close to his recent items, and recommend
accordingly ( a listener to Recommendations Stream will do
that)
from transactionStream_user#window.time(7d)
select session_id, user_id,
custom:genLSHID(user_id,book_id,metadata) as book_id,
"user" as metadata, "0" as discount
insert into RecommendationsStream;
Recommendations based on
overall trends
Use items sold it last 10 minutes
Find a user close to his recent items, and recommend
accordingly ( a listener to TrendsOutputStream will
do that)
from trendTransactionStream#window.time(10 min)
select session_id, user_id,
custom:genLSHID("trend",book_id,metadata) as book_id,
"trend" as metadata
insert into TrendsOutputStream;
Questions?

More Related Content

PDF
Big Data & Analytics to Improve Supply Chain and Business Performance
PDF
Intelligent integration with WSO2 ESB & WSO2 CEP
PDF
WSO2Con ASIA 2016: Keynote: Want to Improve Customer Experience? Analytics Ca...
PDF
WSO2Con ASIA 2016: WSO2 Analytics Platform: The One Stop Shop for All Your Da...
PDF
WSO2Con US 2013 - View, Act, and React: Shaping Business Activity with Analyt...
PDF
WSO2Con EU 2016: Keynote - Want to Improve Customer Experience? Analytics Ca...
PPTX
Analyzing a Soccer Game with WSO2 CEP
PDF
WSO2Con USA 2017: Why Swiss Chocolate Relies on WSO2
Big Data & Analytics to Improve Supply Chain and Business Performance
Intelligent integration with WSO2 ESB & WSO2 CEP
WSO2Con ASIA 2016: Keynote: Want to Improve Customer Experience? Analytics Ca...
WSO2Con ASIA 2016: WSO2 Analytics Platform: The One Stop Shop for All Your Da...
WSO2Con US 2013 - View, Act, and React: Shaping Business Activity with Analyt...
WSO2Con EU 2016: Keynote - Want to Improve Customer Experience? Analytics Ca...
Analyzing a Soccer Game with WSO2 CEP
WSO2Con USA 2017: Why Swiss Chocolate Relies on WSO2

Similar to Catch Them in the Act: CEP for Real-time Ecommerce Influence (20)

PDF
Making the Most of Customer Data
PDF
Solutions Using WSO2 Analytics
PDF
Generating Insights from WSO2 API Manager Statistics
PDF
WSO2 Analytics Platform - The one stop shop for all your data needs
PDF
Driving Insights in the Digital Enterprise
PDF
WSO2 Data Analytics Server - Product Overview
PPTX
Big data analytics
PPTX
Big Data, Analytics and Real Time Event Processing
PDF
Deep-Dive: Predicting Customer Behavior with Apigee Insights
PPTX
Big Data Analytics Strategy and Roadmap
PPTX
Data to Insight in a Flash: Introduction to Real-Time Analytics with WSO2 Com...
PPTX
WSO2Con USA 2015: WSO2 Analytics Platform - The One Stop Shop for All Your Da...
PDF
WSO2Con USA 2017: Discover Data That Matters: Deep Dive into WSO2 Analytics
PDF
Turning Events and Big Data into Insight with WSO2 CEP and WSO2 BAM
PDF
Open Blueprint for Real-Time Analytics with In-Stream Processing
PDF
Open Blueprint for Real-Time Analytics in Retail: Big data applications in fa...
PDF
Introduction to Big Data Analytics: Batch, Real-Time, and the Best of Both Wo...
PDF
Simultaneous analysis of massive data streams in real time and batch
PPTX
Introduction to WSO2 Data Analytics Platform
PDF
API and Big Data Solution Patterns
Making the Most of Customer Data
Solutions Using WSO2 Analytics
Generating Insights from WSO2 API Manager Statistics
WSO2 Analytics Platform - The one stop shop for all your data needs
Driving Insights in the Digital Enterprise
WSO2 Data Analytics Server - Product Overview
Big data analytics
Big Data, Analytics and Real Time Event Processing
Deep-Dive: Predicting Customer Behavior with Apigee Insights
Big Data Analytics Strategy and Roadmap
Data to Insight in a Flash: Introduction to Real-Time Analytics with WSO2 Com...
WSO2Con USA 2015: WSO2 Analytics Platform - The One Stop Shop for All Your Da...
WSO2Con USA 2017: Discover Data That Matters: Deep Dive into WSO2 Analytics
Turning Events and Big Data into Insight with WSO2 CEP and WSO2 BAM
Open Blueprint for Real-Time Analytics with In-Stream Processing
Open Blueprint for Real-Time Analytics in Retail: Big data applications in fa...
Introduction to Big Data Analytics: Batch, Real-Time, and the Best of Both Wo...
Simultaneous analysis of massive data streams in real time and batch
Introduction to WSO2 Data Analytics Platform
API and Big Data Solution Patterns
Ad

More from WSO2 (20)

PDF
Demystifying CMS-0057-F - Compliance Made Seamless with WSO2
PDF
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
PDF
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
PDF
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
PDF
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
PDF
Platformless Modernization with Choreo.pdf
PDF
Application Modernization with Choreo for the BFSI Sector
PDF
Choreo - The AI-Native Internal Developer Platform as a Service: Overview
PDF
[Roundtable] Choreo - The AI-Native Internal Developer Platform as a Service
PPTX
WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)
PPTX
WSO2Con 2025 - Building Secure Business Customer and Partner Experience (B2B)...
PPTX
WSO2Con 2025 - Building Secure Customer Experience Apps
PPTX
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
PPTX
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
PPTX
WSO2Con 2025 - Unified Management of Ingress and Egress Across Multiple API G...
PPTX
WSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on Code
PPTX
WSO2Con 2025 - Architecting Cloud-Native Applications
PDF
Mastering Intelligent Digital Experiences with Platformless Modernization
PDF
Accelerate Enterprise Software Engineering with Platformless
PDF
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
Demystifying CMS-0057-F - Compliance Made Seamless with WSO2
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
Platformless Modernization with Choreo.pdf
Application Modernization with Choreo for the BFSI Sector
Choreo - The AI-Native Internal Developer Platform as a Service: Overview
[Roundtable] Choreo - The AI-Native Internal Developer Platform as a Service
WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)
WSO2Con 2025 - Building Secure Business Customer and Partner Experience (B2B)...
WSO2Con 2025 - Building Secure Customer Experience Apps
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
WSO2Con 2025 - Unified Management of Ingress and Egress Across Multiple API G...
WSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on Code
WSO2Con 2025 - Architecting Cloud-Native Applications
Mastering Intelligent Digital Experiences with Platformless Modernization
Accelerate Enterprise Software Engineering with Platformless
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
Ad

Catch Them in the Act: CEP for Real-time Ecommerce Influence

  • 1. Catch Them in the Act: CEP for Realtime Ecommerce Influence Srinath Perera Director Research WSO2, Apache Member (@srinath_perera) srinath@wso2.com
  • 2. Retail World 7B People - 6.5B have a phone - 2.5B online Global E-commerce itself was 1.5 Trillion market (215$/year for everyone in the world).
  • 4. Recommendations One of the main retail scenarios, can be extended to targeted marketing and deals Search let us make sense of unstructured Web In retail, there are too many choices, Recommendations help us make a decision. A Main driver of traffic (e.g. 70% amazon site is devoted for recommendations, 70% Netflix sales though
  • 5. Finding Recommendation Problem: based on customer activities (purchases, ratings, views) etc., find out products that are of interest to him - Done by finding similar items or similar users (common case) There are often Millions of customers and even millions of items
  • 7. What if you can freeze time!! Most solutions are overnight Think how you would buy something! Research a bit and buy, often overnight is too late. But not all trends takes time - People change their mind - Trends move fast - React to what customer is doing (do not let him move away) At CEP speed 400k/sec, if each event takes a second, it takes 4 days to pass a second in real world!!
  • 9. Real-time Analytics Idea is to process data as they are received in streaming fashion Used when we need - Very fast output - Lots of events (few 100k to millions) - Processing without storing (e.g. too much data) Two main technologies - Stream Processing (e.g. Strom, http://storm-project.net/ ) - Complex Event Processing (CEP) http://wso2.com/products/complex-event- processor/
  • 11. Lambda Architecture with WSO2 Products
  • 12. WSO2 Big Data Platform
  • 13. Demo Usecases Operations Dashboard Automatic Offers Recommendations based on personal trends Recommendations based on overall trends
  • 16. Dashboard Dashboard to show Realtime Analytics about the site Example query (e.g. number of purchases or views for each tag last minute) from transactionStream[metadata== 'purchase' or metadata== 'select']#window.time(1 min) select tag, count(*) as count group by tag update tagInfo on tagInfo.tag == transactionStream.tag;
  • 18. Automatic Offers If user have brought books worth more than 50$ within a day, given 25% off on the next book from SalesStream#window.time(1d) select sum(price) as total having total > 50 insert into ..
  • 20. Recommendations based on personal trends Look at recent history of the user, and find items he has viewed in last day Find a user close to his recent items, and recommend accordingly ( a listener to Recommendations Stream will do that) from transactionStream_user#window.time(7d) select session_id, user_id, custom:genLSHID(user_id,book_id,metadata) as book_id, "user" as metadata, "0" as discount insert into RecommendationsStream;
  • 21. Recommendations based on overall trends Use items sold it last 10 minutes Find a user close to his recent items, and recommend accordingly ( a listener to TrendsOutputStream will do that) from trendTransactionStream#window.time(10 min) select session_id, user_id, custom:genLSHID("trend",book_id,metadata) as book_id, "trend" as metadata insert into TrendsOutputStream;