middleware systems research group msrg.org grand challenge: the bluebay soccer monitoring engine...

15
MIDDLEWARE SYSTEMS RESEARCH GROUP MSRG.ORG Grand Challenge: The BlueBay Soccer Monitoring Engine Hans-Arno Jacobsen Kianoosh Mokhtarian Tilmann Rabl Mohammad Sadoghi Reza Sherafat Kazemzadeh Young Yoon Kaiwen Zhang www.padres.msrg.utoronto.ca DEBS '13, July 1-3 2013 Middleware Systems Research Group University of Toronto

Upload: denisse-fairman

Post on 14-Dec-2015

218 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: MIDDLEWARE SYSTEMS RESEARCH GROUP MSRG.ORG Grand Challenge: The BlueBay Soccer Monitoring Engine Hans-Arno Jacobsen Kianoosh Mokhtarian Tilmann Rabl Mohammad

MIDDLEWARE SYSTEMSRESEARCH GROUP

MSRG.ORG

Grand Challenge: The BlueBay Soccer Monitoring Engine

Hans-Arno JacobsenKianoosh MokhtarianTilmann RablMohammad SadoghiReza Sherafat KazemzadehYoung YoonKaiwen Zhang www.padres.msrg.utoronto.ca

DEBS '13, July 1-3 2013

Middleware Systems Research GroupUniversity of Toronto

Page 2: MIDDLEWARE SYSTEMS RESEARCH GROUP MSRG.ORG Grand Challenge: The BlueBay Soccer Monitoring Engine Hans-Arno Jacobsen Kianoosh Mokhtarian Tilmann Rabl Mohammad

MIDDLEWARE SYSTEMSRESEARCH GROUP

MSRG.ORG

2

GUI Client

http://msrg.org/datasets/blue-bay

Page 3: MIDDLEWARE SYSTEMS RESEARCH GROUP MSRG.ORG Grand Challenge: The BlueBay Soccer Monitoring Engine Hans-Arno Jacobsen Kianoosh Mokhtarian Tilmann Rabl Mohammad

MIDDLEWARE SYSTEMSRESEARCH GROUP

MSRG.ORG

3

Agenda

Multi-stage monitoring pipeline World Cup: survey of existing solutions

– Esper– Storm

BlueBay: custom monitoring engine Evaluation

Page 4: MIDDLEWARE SYSTEMS RESEARCH GROUP MSRG.ORG Grand Challenge: The BlueBay Soccer Monitoring Engine Hans-Arno Jacobsen Kianoosh Mokhtarian Tilmann Rabl Mohammad

MIDDLEWARE SYSTEMSRESEARCH GROUP

MSRG.ORG

4

Monitoring architecture

Event processing stage

Data collection and dispatching

Distribution stage

Page 5: MIDDLEWARE SYSTEMS RESEARCH GROUP MSRG.ORG Grand Challenge: The BlueBay Soccer Monitoring Engine Hans-Arno Jacobsen Kianoosh Mokhtarian Tilmann Rabl Mohammad

MIDDLEWARE SYSTEMSRESEARCH GROUP

MSRG.ORG

5

Baseline solutions for comparison– Our own custom solution: BlueBay

Representative range of solutions– CEP Engine+Language: Esper– MapReduce-like: Storm– CEP Language+Compiler: StreamIT– DSMS: Stream

World cup of event processing

Library support for common languages

such as Java

Page 6: MIDDLEWARE SYSTEMS RESEARCH GROUP MSRG.ORG Grand Challenge: The BlueBay Soccer Monitoring Engine Hans-Arno Jacobsen Kianoosh Mokhtarian Tilmann Rabl Mohammad

MIDDLEWARE SYSTEMSRESEARCH GROUP

MSRG.ORG

6

Esper

Query #2

insert into b_possession_percentselect *, sum(b_ts - prev(b_ts, 1)) as time_total, sum((b_ts - prev(b_ts, 1)) * msrg.GameSetting.equalStr(owner,prev(owner,1),'teamA')) as time_teamA, sum((b_ts - prev(b_ts, 1)) * msrg.GameSetting.equalStr(owner,prev(owner,1),'teamB')) as time_teamBfrom b_possession.win:time(10 seconds)

Use of Esper stream primitivesTo process the stream

Use of user-defined helper functions

Use of Esper window semanticsTo extract stream at correct

granularity

Page 7: MIDDLEWARE SYSTEMS RESEARCH GROUP MSRG.ORG Grand Challenge: The BlueBay Soccer Monitoring Engine Hans-Arno Jacobsen Kianoosh Mokhtarian Tilmann Rabl Mohammad

MIDDLEWARE SYSTEMSRESEARCH GROUP

MSRG.ORG

7

Storm

Query #4

Project rightattributes

Split the stream(Map)

User-definedfunctions

Player Heatmap

Player Heatmap

Player Heatmap

Player Heatmap

Player Heatmap

Player Heatmap

Player Heatmap

Player Position

Sensor Events

PlayerPosition Output

PlayerPosition

PlayerPosition

PlayerID

Merge output(Reduce)

Page 8: MIDDLEWARE SYSTEMS RESEARCH GROUP MSRG.ORG Grand Challenge: The BlueBay Soccer Monitoring Engine Hans-Arno Jacobsen Kianoosh Mokhtarian Tilmann Rabl Mohammad

MIDDLEWARE SYSTEMSRESEARCH GROUP

MSRG.ORG

8

BlueBay Origins

Page 9: MIDDLEWARE SYSTEMS RESEARCH GROUP MSRG.ORG Grand Challenge: The BlueBay Soccer Monitoring Engine Hans-Arno Jacobsen Kianoosh Mokhtarian Tilmann Rabl Mohammad

MIDDLEWARE SYSTEMSRESEARCH GROUP

MSRG.ORG

9

Written in C++ Modular design

– Reusable and shared components Other possible queries:

– Passing success (already implemented)– Offside detection– Man-marking success

Implementation details

Page 10: MIDDLEWARE SYSTEMS RESEARCH GROUP MSRG.ORG Grand Challenge: The BlueBay Soccer Monitoring Engine Hans-Arno Jacobsen Kianoosh Mokhtarian Tilmann Rabl Mohammad

MIDDLEWARE SYSTEMSRESEARCH GROUP

MSRG.ORG

10

BlueBay ArchitectureStream components

per object w/noise reduction

Circular list oftimestamp range bucketsO(1) time and memory

Trajectory EstimatorCustom-built

Page 11: MIDDLEWARE SYSTEMS RESEARCH GROUP MSRG.ORG Grand Challenge: The BlueBay Soccer Monitoring Engine Hans-Arno Jacobsen Kianoosh Mokhtarian Tilmann Rabl Mohammad

MIDDLEWARE SYSTEMSRESEARCH GROUP

MSRG.ORG

11

Efficient implementation:– ID-to-index array-based maps– Avoid floating points– …

Parallelization:– Inter-query & Intra-query– Q3 heatmaps is the most time consuming

» Parallelize per player and per grid resolution

Optimizations

Page 12: MIDDLEWARE SYSTEMS RESEARCH GROUP MSRG.ORG Grand Challenge: The BlueBay Soccer Monitoring Engine Hans-Arno Jacobsen Kianoosh Mokhtarian Tilmann Rabl Mohammad

MIDDLEWARE SYSTEMSRESEARCH GROUP

MSRG.ORG

12

Setup– Intel Xeon 3.20 GHz 4-core, 6 GB RAM

Single-threaded benchmarking:

Evaluation

Engine Q1 Q2 Q3 Q4

BlueBay 141x 165x 30x 187x

Esper 7.5x 2.4x 6.3x 2.3x

Storm 9.7x 8.6x 9.8x 8.6x

Average speedup30x

Page 13: MIDDLEWARE SYSTEMS RESEARCH GROUP MSRG.ORG Grand Challenge: The BlueBay Soccer Monitoring Engine Hans-Arno Jacobsen Kianoosh Mokhtarian Tilmann Rabl Mohammad

MIDDLEWARE SYSTEMSRESEARCH GROUP

MSRG.ORG

13

Impact of multi-threading

Queue sizeto synchronize

the queries

Throughput boundedby slowest query

Highest sustained average790k e/s

Missing ball datain workload

BlueBay: 60x speedup!

Page 14: MIDDLEWARE SYSTEMS RESEARCH GROUP MSRG.ORG Grand Challenge: The BlueBay Soccer Monitoring Engine Hans-Arno Jacobsen Kianoosh Mokhtarian Tilmann Rabl Mohammad

MIDDLEWARE SYSTEMSRESEARCH GROUP

MSRG.ORG

14

Throughput-latency tradeoff

Time requiredto fully process

one input event for all queries

Less throughputmeans

less queue size

Less queue size blocks faster threadsGive full CPU usage to

slower threads, clearing older eventsCombined throughputof output eventsfor all queries

Large queue size allowsfast threads to process and emit

events quickly and aheadof slower threads

Page 15: MIDDLEWARE SYSTEMS RESEARCH GROUP MSRG.ORG Grand Challenge: The BlueBay Soccer Monitoring Engine Hans-Arno Jacobsen Kianoosh Mokhtarian Tilmann Rabl Mohammad

MIDDLEWARE SYSTEMSRESEARCH GROUP

MSRG.ORG

15

Bluebay engine– Modular design to support other queries– Optimized for the soccer use case

World cup of event processing– BlueBay: 790k e/s and 60x speedup– Esper and Storm finalists– Ability to define custom functions essential

for rapid implementation

Conclusion