realtime bigdata use cases for retail

22
Catch Them in the Act: CEP for Realtime Ecommerce Influence Srinath Perera Director, Research WSO2 Inc.

Upload: srinath-perera

Post on 18-Dec-2014

454 views

Category:

Software


1 download

DESCRIPTION

Big data analytics play a key role in the retail industry where common use cases include product recommendations, targeted marketing, dynamic offers, product selection, and A/B testing based on product placement. Most current systems use batch processing technologies like MapReduce to process transaction logs a few hours later and extract useful insights. Although such insights are useful for trends that last a long time, they often come in too late. On one hand, the store cannot act on any short term trends (e.g. very common in auction use cases) and even long-term trends would have progressed by the time action is taken. This session will focus on a sample system and explain in detail how a retail store can incorporate real-time updates into recommendation, product offers, and other analytics using WSO2 Complex Event Processor. Our system can react to short-term trends, provide dynamic offers within milliseconds, and react immediately to any new trends.

TRANSCRIPT

Page 1: Realtime Bigdata Use Cases for Retail

Catch Them in the Act: CEP for Realtime Ecommerce

InfluenceSrinath Perera

Director, ResearchWSO2 Inc.

Page 2: Realtime Bigdata Use Cases for Retail

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).

Page 3: Realtime Bigdata Use Cases for Retail

Usecases

Page 4: Realtime Bigdata Use Cases for Retail

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 recommendations)

Page 5: Realtime Bigdata Use Cases for Retail

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

Page 6: Realtime Bigdata Use Cases for Retail

Recommendations (Collaborative Filtering)

Page 7: Realtime Bigdata Use Cases for Retail

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!!

Page 8: Realtime Bigdata Use Cases for Retail

Big data Processing Technologies Landscape

Page 9: Realtime Bigdata Use Cases for Retail

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/

Page 10: Realtime Bigdata Use Cases for Retail

Complex Event Processing (CEP)• Sees inputs as Event streams SQL like Queries language • Supports Filters, Windows, Join, Patterns and Sequences • Fast, 300K+/sec over network per node!

from p=PINChangeEvents#win.time(3600) join t=TransactionEvents[p.custid=custid][amount>10000]

#win.time(3600)return t.custid, t.amount;

Page 11: Realtime Bigdata Use Cases for Retail

Lambda Architecture with WSO2 Products

Page 12: Realtime Bigdata Use Cases for Retail

WSO2 Big Data Platform

Page 13: Realtime Bigdata Use Cases for Retail

Demo Usecases

• Operations Dashboard • Automatic Offers• Recommendations

based on personal trends

• Recommendations based on overall trends

Page 14: Realtime Bigdata Use Cases for Retail

Architecture

Page 15: Realtime Bigdata Use Cases for Retail

Demo

Page 16: Realtime Bigdata Use Cases for Retail

Usecase 1: Dashboard

• CEP will do realtime analytics – Most queries are look very SQL like

• Then push updates to Dashboard.

from transactionStream[metadata== 'purchase' or metadata== 'select']#window.time(1 min)

select tag, count(*) as count group by tag

Page 17: Realtime Bigdata Use Cases for Retail

Recommendations (Collaborative Filtering)

Page 18: Realtime Bigdata Use Cases for Retail

Realtime Recommendations

• As part of Collaborative filtering, data is broken into similar groups– E.g. Via collaborative filtering – This is done batch style, e.g. once a day

• For realtime matching, we will search only within that group

Page 19: Realtime Bigdata Use Cases for Retail

Usecase 2 & 3: Realtime Recommendations with CEP

Page 20: Realtime Bigdata Use Cases for Retail

Usecase 4: Automatic Offers

• Often pretty straight forward CEP scenario! Track and trigger when conditions match.

define partition transactionStream.customerID{from transactionStream#window.time(1 week)

having sum(amount) > 20 or count (*) > 3

insert into OfferStream}

Page 21: Realtime Bigdata Use Cases for Retail

Usecases

Page 22: Realtime Bigdata Use Cases for Retail

Thank You