SlideShare uma empresa Scribd logo
1 de 19
Baixar para ler offline
View,	
  Act,	
  and	
  React:	
  Shaping	
  Business	
  
Ac6vity	
  with	
  Analy6cs,	
  BigData	
  Queries,	
  and	
  
Complex	
  Event	
  Processing	
  
	
  
Srinath	
  Perera	
  
	
  
WSO2	
  
Director,	
  Research	
  
•  1942,	
  Asimov	
  wrote	
  a	
  book	
  called	
  
Founda6on,	
  in	
  which	
  	
  the	
  character	
  
Hari	
  Seldon	
  use	
  mathema6cal	
  models	
  
to	
  predict	
  the	
  future	
  of	
  civiliza6on	
  and	
  
then	
  to	
  save	
  it.	
  	
  
•  Paul	
  Krugman,(	
  the	
  Nobel	
  Laureate	
  in	
  
Economics),	
  said	
  his	
  interest	
  in	
  
economic	
  begin	
  with	
  founda6on.	
  	
  
•  We	
  are	
  entering	
  that	
  Era	
  of	
  our	
  history	
  
where	
  Mr.	
  Asimov	
  might	
  have	
  a	
  point.	
  

Start	
  

	
  

Image	
  cedit,	
  CC	
  licence,	
  hWp://ansem315.deviantart.com/art/
Asimov-­‐Founda6on-­‐395188263	
  
Consider	
  a	
  day	
  in	
  your	
  life	
  
•  What	
  is	
  the	
  best	
  road	
  to	
  take?	
  
•  Would	
  there	
  be	
  any	
  bad	
  weather?	
  
•  What	
  is	
  the	
  best	
  way	
  to	
  invest	
  the	
  
money?	
  
•  Should	
  I	
  take	
  that	
  loan?	
  
•  Can	
  I	
  op6mize	
  my	
  day?	
  
•  Is	
  there	
  a	
  way	
  to	
  do	
  this	
  faster?	
  
•  What	
  have	
  others	
  done	
  in	
  similar	
  
cases?	
  
•  Which	
  product	
  should	
  I	
  buy?	
  	
  
	
  
Bigdata	
  Landscape	
  
Big	
  Data	
  Architecture	
  
Why	
  it	
  is	
  hard?	
  
•  System	
  build	
  of	
  many	
  computers	
  (1000	
  
nodes	
  to	
  store	
  1PB	
  with	
  1TB	
  each)	
  	
  
•  That	
  handles	
  lots	
  of	
  data	
  (10Gb	
  =>	
  83	
  
days	
  to	
  copy	
  1PB)	
  
•  Running	
  complex	
  logic	
  (models	
  can	
  be	
  
complex	
  as	
  the	
  system)	
  	
  
•  This	
  pushes	
  us	
  to	
  the	
  fron6er	
  of	
  
Distributed	
  Systems	
  and	
  Databases	
  	
  
	
  
hWp://www.flickr.com/photos/mariachily/5250487136,	
  
	
  Licensed	
  CC	
  
Big	
  Data	
  Architecture	
  with	
  WSO2	
  
Each	
  stream	
  has	
  a	
  name	
  

{
'name':'PlayStream',
'version':'1.0.0',
'payloadData':[
'name':'sid',
'ts':'BIGINT',
'x':'DOUBLE',
...
]
}

Each	
  event	
  has	
  a-ributes,	
  
that	
  has	
  types	
  

Event	
  Streams	
  
We	
  view	
  the	
  world	
  as	
  event	
  streams	
  	
  
Event	
  stream	
  is	
  series	
  of	
  events	
  over	
  6me	
  	
  
We	
  use	
  SQL	
  like	
  languages	
  (Hive/	
  CEP)	
  to	
  process	
  
event	
  streams	
  and	
  create	
  new	
  event	
  streams	
  
Select from PlayStream[x>2500 and .. ]
İnsert into NearGoalStream
Demo	
  Usecase	
  (DEBS	
  2013)	
  
•  Football	
  game,	
  players	
  and	
  ball	
  has	
  
sensors	
  (DESB	
  Challenge	
  2013)	
  
sid,	
  ts,	
  x,y,z,	
  v,a	
  
•  Use	
  cases:	
  Running	
  analysis,	
  Ball	
  
Possession	
  and	
  Shots	
  on	
  Goal,	
  
Heatmap	
  of	
  Ac6vity	
  
•  Siddhi	
  did	
  100K+	
  on	
  each	
  usecase	
  
•  For	
  this	
  talk,	
  we	
  will	
  look	
  at	
  user	
  
ac6vity	
  by	
  region	
  of	
  the	
  field.	
  	
  
Demo	
  High	
  level	
  Architecture	
  
Data	
  Collec6on	
  
•  Can	
  receive	
  events	
  via	
  
SOAP,	
  HTTP,	
  JMS,	
  ..	
  
•  WSO2	
  Events	
  is	
  highly	
  
StreamDefinition definition =
new StreamDefinition(STREAM_NAME,
op6mized	
  version	
  
VERSION);
definition.addPayloadData("sid", STRING);
(400K	
  events	
  TPS)	
  
...
publisher.addStreamDefinition(definition);
•  Default	
  Agents	
  and	
  you	
  
...
can	
  write	
  custom	
  
Event event = new Event();
event.setPayloadData(eventData);
agents.	
  	
  
publisher.publish(STREAM_NAME, VERSION, event);
Agent agent = new Agent(agentConfiguration);
publisher = new AsyncDataPublisher(
"tcp://localhost:7612", .. );
Business	
  Ac6vity	
  Monitor	
  
BAM	
  Hive	
  Query	
  
Find	
  how	
  much	
  6me	
  spent	
  in	
  each	
  cell.	
  	
  
CREATE EXTERNAL TABLE IF NOT EXISTS PlayStream …
select sid,
ceiling((y+33000)*7/10000 + x/10000) as cell,
count(sid)
from PlayStream
GROUP BY sid, ceiling((y+33000)*7/10000 + x/10000);
Complex	
  Event	
  Processor	
  
CEP	
  Query	
  

Calculate	
  the	
  mean	
  loca6on	
  of	
  
each	
  player	
  every	
  second	
  
	
  

define partition sidPrt by PlayStream.sid, LocBySecStream.sid
from PlayStream#window.timeBatch(1sec)
select sid, avg(x) as xMean, avg(y) as yMean, avg(z) as zMean
insert into LocBySecStream partition by sidPrt
from every e1 = LocBySecStream ->
e2 = LocBySecStream [e1.yMean + 10000 > yMean
or yMean + 10000 > e1.yMean]
Detect	
  more	
  than	
  
within 2sec select e1.sid
10m	
  run	
  
insert into LongAdvStream partition by sidPrt ;
	
  
Run	
  Demo	
  
Visualiza6on	
  
Conclusion	
  
Thank	
  You!	
  

Mais conteúdo relacionado

Semelhante a WSO2Con US 2013 - View, Act, and React: Shaping Business Activity with Analytics, BigData Queries, and Complex Event Processing

Big Data Analytics Strategy and Roadmap
Big Data Analytics Strategy and RoadmapBig Data Analytics Strategy and Roadmap
Big Data Analytics Strategy and Roadmap
Srinath Perera
 
Making the Most of Customer Data
Making the Most of Customer DataMaking the Most of Customer Data
Making the Most of Customer Data
WSO2
 
WSO2Con Asia 2014 - Simultaneous Analysis of Massive Data Streams in real-tim...
WSO2Con Asia 2014 - Simultaneous Analysis of Massive Data Streams in real-tim...WSO2Con Asia 2014 - Simultaneous Analysis of Massive Data Streams in real-tim...
WSO2Con Asia 2014 - Simultaneous Analysis of Massive Data Streams in real-tim...
WSO2
 
Operational Intelligence with WSO2 BAM
Operational Intelligence with WSO2 BAM Operational Intelligence with WSO2 BAM
Operational Intelligence with WSO2 BAM
WSO2
 

Semelhante a WSO2Con US 2013 - View, Act, and React: Shaping Business Activity with Analytics, BigData Queries, and Complex Event Processing (20)

View, Act, and React: Shaping Business Activity with Analytics, BigData Queri...
View, Act, and React: Shaping Business Activity with Analytics, BigData Queri...View, Act, and React: Shaping Business Activity with Analytics, BigData Queri...
View, Act, and React: Shaping Business Activity with Analytics, BigData Queri...
 
Data Science in the Real World: Making a Difference
Data Science in the Real World: Making a Difference Data Science in the Real World: Making a Difference
Data Science in the Real World: Making a Difference
 
Snowplow: evolve your analytics stack with your business
Snowplow: evolve your analytics stack with your businessSnowplow: evolve your analytics stack with your business
Snowplow: evolve your analytics stack with your business
 
Big Data Analytics Strategy and Roadmap
Big Data Analytics Strategy and RoadmapBig Data Analytics Strategy and Roadmap
Big Data Analytics Strategy and Roadmap
 
Making the Most of Customer Data
Making the Most of Customer DataMaking the Most of Customer Data
Making the Most of Customer Data
 
WSO2Con Asia 2014 - Simultaneous Analysis of Massive Data Streams in real-tim...
WSO2Con Asia 2014 - Simultaneous Analysis of Massive Data Streams in real-tim...WSO2Con Asia 2014 - Simultaneous Analysis of Massive Data Streams in real-tim...
WSO2Con Asia 2014 - Simultaneous Analysis of Massive Data Streams in real-tim...
 
Big Data Tutorial V4
Big Data Tutorial V4Big Data Tutorial V4
Big Data Tutorial V4
 
MongoDB Sharding
MongoDB ShardingMongoDB Sharding
MongoDB Sharding
 
Understanding cloud costs with analytics
Understanding cloud costs with analyticsUnderstanding cloud costs with analytics
Understanding cloud costs with analytics
 
Introduction to WSO2 Data Analytics Platform
Introduction to  WSO2 Data Analytics PlatformIntroduction to  WSO2 Data Analytics Platform
Introduction to WSO2 Data Analytics Platform
 
Data Visualization for Big Data: Experience from the Front Line
Data Visualization for Big Data: Experience from the Front LineData Visualization for Big Data: Experience from the Front Line
Data Visualization for Big Data: Experience from the Front Line
 
Snowplow - Evolve your analytics stack with your business
Snowplow - Evolve your analytics stack with your businessSnowplow - Evolve your analytics stack with your business
Snowplow - Evolve your analytics stack with your business
 
SPSNYC2019 - What is Common Data Model and how to use it?
SPSNYC2019 - What is Common Data Model and how to use it?SPSNYC2019 - What is Common Data Model and how to use it?
SPSNYC2019 - What is Common Data Model and how to use it?
 
Siddhi - cloud-native stream processor
Siddhi - cloud-native stream processorSiddhi - cloud-native stream processor
Siddhi - cloud-native stream processor
 
Artificial Intelligence (ML - DL)
Artificial Intelligence (ML - DL)Artificial Intelligence (ML - DL)
Artificial Intelligence (ML - DL)
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
Machine Learning for Web Developers
Machine Learning for Web DevelopersMachine Learning for Web Developers
Machine Learning for Web Developers
 
Operational Intelligence with WSO2 BAM
Operational Intelligence with WSO2 BAM Operational Intelligence with WSO2 BAM
Operational Intelligence with WSO2 BAM
 
Real-time big data analytics based on product recommendations case study
Real-time big data analytics based on product recommendations case studyReal-time big data analytics based on product recommendations case study
Real-time big data analytics based on product recommendations case study
 
WSO2Con ASIA 2016: An Introduction to the WSO2 Analytics Platform
WSO2Con ASIA 2016: An Introduction to the WSO2 Analytics PlatformWSO2Con ASIA 2016: An Introduction to the WSO2 Analytics Platform
WSO2Con ASIA 2016: An Introduction to the WSO2 Analytics Platform
 

Mais de WSO2

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Fueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected ProductsFueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected Products
WSO2
 
A Reference Methodology for Agile Digital Businesses
 A Reference Methodology for Agile Digital Businesses A Reference Methodology for Agile Digital Businesses
A Reference Methodology for Agile Digital Businesses
WSO2
 

Mais de WSO2 (20)

Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
Mastering API Lifecycle: Design, Deployment, and Effective Consumption
Mastering API Lifecycle: Design, Deployment, and Effective ConsumptionMastering API Lifecycle: Design, Deployment, and Effective Consumption
Mastering API Lifecycle: Design, Deployment, and Effective Consumption
 
Utilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native IntegrationsUtilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native Integrations
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
How to Create a Service in Choreo
How to Create a Service in ChoreoHow to Create a Service in Choreo
How to Create a Service in Choreo
 
Ballerina Tech Talk - May 2023
Ballerina Tech Talk - May 2023Ballerina Tech Talk - May 2023
Ballerina Tech Talk - May 2023
 
Platform Strategy to Deliver Digital Experiences on Azure
Platform Strategy to Deliver Digital Experiences on AzurePlatform Strategy to Deliver Digital Experiences on Azure
Platform Strategy to Deliver Digital Experiences on Azure
 
GartnerITSymSessionSlides.pdf
GartnerITSymSessionSlides.pdfGartnerITSymSessionSlides.pdf
GartnerITSymSessionSlides.pdf
 
[Webinar] How to Create an API in Minutes
[Webinar] How to Create an API in Minutes[Webinar] How to Create an API in Minutes
[Webinar] How to Create an API in Minutes
 
Modernizing the Student Journey with Ethos Identity
Modernizing the Student Journey with Ethos IdentityModernizing the Student Journey with Ethos Identity
Modernizing the Student Journey with Ethos Identity
 
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
 
CIO Summit Berlin 2022.pptx.pdf
CIO Summit Berlin 2022.pptx.pdfCIO Summit Berlin 2022.pptx.pdf
CIO Summit Berlin 2022.pptx.pdf
 
Delivering New Digital Experiences Fast - Introducing Choreo
Delivering New Digital Experiences Fast - Introducing ChoreoDelivering New Digital Experiences Fast - Introducing Choreo
Delivering New Digital Experiences Fast - Introducing Choreo
 
Fueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected ProductsFueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected Products
 
A Reference Methodology for Agile Digital Businesses
 A Reference Methodology for Agile Digital Businesses A Reference Methodology for Agile Digital Businesses
A Reference Methodology for Agile Digital Businesses
 
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
 
Lessons from the pandemic - From a single use case to true transformation
 Lessons from the pandemic - From a single use case to true transformation Lessons from the pandemic - From a single use case to true transformation
Lessons from the pandemic - From a single use case to true transformation
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

WSO2Con US 2013 - View, Act, and React: Shaping Business Activity with Analytics, BigData Queries, and Complex Event Processing

  • 1. View,  Act,  and  React:  Shaping  Business   Ac6vity  with  Analy6cs,  BigData  Queries,  and   Complex  Event  Processing     Srinath  Perera     WSO2   Director,  Research  
  • 2. •  1942,  Asimov  wrote  a  book  called   Founda6on,  in  which    the  character   Hari  Seldon  use  mathema6cal  models   to  predict  the  future  of  civiliza6on  and   then  to  save  it.     •  Paul  Krugman,(  the  Nobel  Laureate  in   Economics),  said  his  interest  in   economic  begin  with  founda6on.     •  We  are  entering  that  Era  of  our  history   where  Mr.  Asimov  might  have  a  point.   Start     Image  cedit,  CC  licence,  hWp://ansem315.deviantart.com/art/ Asimov-­‐Founda6on-­‐395188263  
  • 3. Consider  a  day  in  your  life   •  What  is  the  best  road  to  take?   •  Would  there  be  any  bad  weather?   •  What  is  the  best  way  to  invest  the   money?   •  Should  I  take  that  loan?   •  Can  I  op6mize  my  day?   •  Is  there  a  way  to  do  this  faster?   •  What  have  others  done  in  similar   cases?   •  Which  product  should  I  buy?      
  • 6. Why  it  is  hard?   •  System  build  of  many  computers  (1000   nodes  to  store  1PB  with  1TB  each)     •  That  handles  lots  of  data  (10Gb  =>  83   days  to  copy  1PB)   •  Running  complex  logic  (models  can  be   complex  as  the  system)     •  This  pushes  us  to  the  fron6er  of   Distributed  Systems  and  Databases       hWp://www.flickr.com/photos/mariachily/5250487136,    Licensed  CC  
  • 7. Big  Data  Architecture  with  WSO2  
  • 8. Each  stream  has  a  name   { 'name':'PlayStream', 'version':'1.0.0', 'payloadData':[ 'name':'sid', 'ts':'BIGINT', 'x':'DOUBLE', ... ] } Each  event  has  a-ributes,   that  has  types   Event  Streams   We  view  the  world  as  event  streams     Event  stream  is  series  of  events  over  6me     We  use  SQL  like  languages  (Hive/  CEP)  to  process   event  streams  and  create  new  event  streams   Select from PlayStream[x>2500 and .. ] İnsert into NearGoalStream
  • 9. Demo  Usecase  (DEBS  2013)   •  Football  game,  players  and  ball  has   sensors  (DESB  Challenge  2013)   sid,  ts,  x,y,z,  v,a   •  Use  cases:  Running  analysis,  Ball   Possession  and  Shots  on  Goal,   Heatmap  of  Ac6vity   •  Siddhi  did  100K+  on  each  usecase   •  For  this  talk,  we  will  look  at  user   ac6vity  by  region  of  the  field.    
  • 10. Demo  High  level  Architecture  
  • 11. Data  Collec6on   •  Can  receive  events  via   SOAP,  HTTP,  JMS,  ..   •  WSO2  Events  is  highly   StreamDefinition definition = new StreamDefinition(STREAM_NAME, op6mized  version   VERSION); definition.addPayloadData("sid", STRING); (400K  events  TPS)   ... publisher.addStreamDefinition(definition); •  Default  Agents  and  you   ... can  write  custom   Event event = new Event(); event.setPayloadData(eventData); agents.     publisher.publish(STREAM_NAME, VERSION, event); Agent agent = new Agent(agentConfiguration); publisher = new AsyncDataPublisher( "tcp://localhost:7612", .. );
  • 13. BAM  Hive  Query   Find  how  much  6me  spent  in  each  cell.     CREATE EXTERNAL TABLE IF NOT EXISTS PlayStream … select sid, ceiling((y+33000)*7/10000 + x/10000) as cell, count(sid) from PlayStream GROUP BY sid, ceiling((y+33000)*7/10000 + x/10000);
  • 15. CEP  Query   Calculate  the  mean  loca6on  of   each  player  every  second     define partition sidPrt by PlayStream.sid, LocBySecStream.sid from PlayStream#window.timeBatch(1sec) select sid, avg(x) as xMean, avg(y) as yMean, avg(z) as zMean insert into LocBySecStream partition by sidPrt from every e1 = LocBySecStream -> e2 = LocBySecStream [e1.yMean + 10000 > yMean or yMean + 10000 > e1.yMean] Detect  more  than   within 2sec select e1.sid 10m  run   insert into LongAdvStream partition by sidPrt ;