Event Processing Applied to Streams of TV Channel Zaps and Sensor Middleware with Virtualization
Upcoming SlideShare
Loading in...5
×
 

Event Processing Applied to Streams of TV Channel Zaps and Sensor Middleware with Virtualization

on

  • 210 views

My PhD thesis defense from 23.04.2013

My PhD thesis defense from 23.04.2013

Statistics

Views

Total Views
210
Views on SlideShare
208
Embed Views
2

Actions

Likes
0
Downloads
3
Comments
0

2 Embeds 2

http://www.linkedin.com 1
https://www.linkedin.com 1

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Event Processing Applied to Streams of TV Channel Zaps and Sensor Middleware with Virtualization Event Processing Applied to Streams of TV Channel Zaps and Sensor Middleware with Virtualization Presentation Transcript

    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerEvent Processing Applied toStreams of TV Channel Zaps andSensor Middleware with VirtualizationPhD DefenseP˚al EvensenDepartment of Electrical Engineering and Computer ScienceUniversity of Stavanger, NorwayApril 23rd, 2013
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerOutlineIntroductionBackgroundProject ContextResearch ContributionsSenseWrapSenseWrapEventCasterSystem ArchitectureEsper and EPLTelevision StatisticsBackgroundImplementationStatisticsDeploymentParadigm ComparisonPerformanceComplexityConclusionsAdScorerOverviewExperimentsLive Scoring ResultsSummary
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerFrom this
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerTo this
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerRequest/ReplyClient ServerRequestReply
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerTo this
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerand this
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerPublish/SubscribePublisher SubscriberPublisherSubscriberSubscriberSubscriberEventServiceNotificationpublishnotifysubscribe/unsubscribe
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerIS-Home
    • Altibox at homeINTERNETFrom 10 to 400Mbit/s, both waysDIGITAL TVChoose between150 TV channels,film rental and more.ALARM SERVICESAlarm monitoringcentre. Direct alarmconnection to the firebrigade. MOBILE PHONESERVICESSame rate, nomatter who you callIP TELEPHONYNo charges toLandlines inScandinavia
    • TvFILM RENTALChoose from1000 titlesNow in HD tooFOOTBALLThe whole PremierLeague andTippeligaen (Norwegianfootball pools league)NEWSUp to date local newsTV-GUIDEA complete overviewfor your TV evening
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerResearch ContributionsTwo main topics:1. Sensors in smart homes• Middleware for hiding the heterogeneity of devices2. Event processing applied to TV channel zaps• Architecture for efficient processing of high volumes of events• Evaluating programming models for stateful event processing
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerOutlineIntroductionBackgroundProject ContextResearch ContributionsSenseWrapSenseWrapEventCasterSystem ArchitectureEsper and EPLTelevision StatisticsBackgroundImplementationStatisticsDeploymentParadigm ComparisonPerformanceComplexityConclusionsAdScorerOverviewExperimentsLive Scoring ResultsSummary
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerMotivationSensorsandactuators
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerSenseWrap Features• IP-enabling sensor devices• Uniform interface to hetereogeneous devices• A “blueprint” for developers of smart home applications• Automatic network configuration and service discovery
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerSenseWrap ArchitectureVirtualSensorPhysical sensorsSensewrapVirtualSensorSensor protocol (ZigBee, Bluetooth, etc)zeroconfDriver DriverGatewayServiceUDP TCPServiceTCPServiceHTTPClient Client Client
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerOutlineIntroductionBackgroundProject ContextResearch ContributionsSenseWrapSenseWrapEventCasterSystem ArchitectureEsper and EPLTelevision StatisticsBackgroundImplementationStatisticsDeploymentParadigm ComparisonPerformanceComplexityConclusionsAdScorerOverviewExperimentsLive Scoring ResultsSummary
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerEvent-Driven ArchitectureEvent ProcessingNetworkEventProcessingAgentsEvent ConsumersEvent Producers
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerComponents• Esper• HornetQ• Custom Java glue
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerEvent Flow and InterfacesEventProcessorAdapterEventPublisherEventProcessorEventPublisherMessage busProducer CoreEventEPLEPLUpdateListener
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerEvent Processing Language (EPL)• Declarative query language derived from SQL• Operates on stream data as opposed to relational data• Looks for event patterns that matches the query, andproduces an output event• Includes additional operators, such as sliding windows• Part of the Esper framework (Open Source)
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerContinuous Queries
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerSliding Windowswin:time(10 sec)time0 10 20nowe1 e2 e3 e4 e51 select ∗ from ChannelWin.win:time(10 sec)
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerEvent PatternsSimpleAEventComplexCEventSimpleBEvent1 select ∗ from pattern [every a=A −> b=B]
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerOutlineIntroductionBackgroundProject ContextResearch ContributionsSenseWrapSenseWrapEventCasterSystem ArchitectureEsper and EPLTelevision StatisticsBackgroundImplementationStatisticsDeploymentParadigm ComparisonPerformanceComplexityConclusionsAdScorerOverviewExperimentsLive Scoring ResultsSummary
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerCurrent State of TV Viewer Statistics• Sample size is 0.045 % of Norwegian television households• Only 0.022 % of American households are sampled• Data collection requires specialized equipment• Transferred once a day
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerMotivation• IP-based Set Top Boxes (STBs) allows for more accuratestatistics• Ads can be evaluated on an individual basis• Additional behavioral markers such as mute and volumechanges allows for better understanding
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerThe Future of Media Measurement• Current measurement methods for TV not in line with newmodels of media consumption• Gartner: The online/offline division of media will be replacedby measured/unmeasured by 2015• STB data increasingly being used to augment traditional TVratings
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerAltibox Deployment of IPTV• Over 320,000 STBs deployed in Norway and Denmark
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerOur Scenario• Two-way communication• Immediate transfer of zap, mute, hdmi and volume events
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerObserved Events• Channel change event (also called a zap event)• HDMI status event: TV set on/off• STB audio on/off event (mute)• STB volume change event
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerNumber of zap events/day over a 15-day period31 1 2 3 4 5 6 7 8 9 101112131422.22.42.6·106Avg=2212097
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerZapping Activity0 5 10 15 2000.511.5·105Time (hrs)30 Minutes15 Minutes5 Minutes
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerEPL Viewer StatisticsEsper EngineZaps ChannelWinchannelName,viewersselect(...)channelName,viewers1 select channelName, viewers2 from ChannelWin3 output snapshot every 1 sec
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerTrude/18Sykkel:Girod`Italia14.etappeSport&SpillReisemålLørdagsmagasinetSportsnyheteneVæretVinnpåminuttet9:12NyheteneGodkveldNorgeSportsnyheteneFilm:MordpåkredittSykkel:Girod`Italia-oppsummeringFarmen30:30NyheteneAkvarietTV2hjelperdeg11010000200003000040000500006000012:00 14:00 16:00 18:00 20:00 22:00ViewersTimeViewers for TV2 Norge + TV2 HD, Saturday 21.05.2011, Separated by Zip CodesTotal viewers0001-39994000-59996000-79998000-9999
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorer30000350004000045000500005500060000650007000010:00 12:00 14:00 16:00 18:00 20:00 22:00SeereTidspunktSeerstatistikk for TV2 Norge og NRK1, Lørdag 21.05.2011TV2 Norge + HDNRK1 + HD
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerAnnoyance Detection• Aimed at detecting ads/programs that is causing viewers tochange channel• Triggers an output event on rapid drop in viewers on aparticular channel• Sliding window algorithm, continously comparing viewernumber with the last minute average
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerAnnoyance DetectorAnnoyance detectorZapSnap.win.time(1 min)channelName,viewers,avg(viewers)avg(viewers)having(...)channelName,viewers1 select channelName, viewers, avg(viewers)2 from ChannelWin(viewers > 2000).win:time(1 min)3 group by channelName4 having viewers < avg(viewers) ∗ 0.85
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerDeployment Details• Processes over 40,000 events/min at peak hours• Deployed in the Altibox network across four servers:ZapCollector MessagebusDatabaseCore+Manager
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerCPU load - ZapCollector
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerCPU load - Message bus
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerCPU load - EventCaster instance
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerOutlineIntroductionBackgroundProject ContextResearch ContributionsSenseWrapSenseWrapEventCasterSystem ArchitectureEsper and EPLTelevision StatisticsBackgroundImplementationStatisticsDeploymentParadigm ComparisonPerformanceComplexityConclusionsAdScorerOverviewExperimentsLive Scoring ResultsSummary
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerEPL and Java Implementations
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerExperimental Setup for Performace Evaluation• 2,117,897 zap events (one day)• RHEL6,Quad Core 2.4GHz CPU, 14GB RAM• Processing capacity tested by loading events from:• Memory• Disk• Network: UDP and HornetQ• Memory consumption tested by loading events from:• Memory• Disk
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerProcessing capacityMemory Disk UDP HornetQ02468·105Events/secEsper Java
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerMemory consumptionFrom memory From disk6008001,0001,2001,4001,600 1,5701,401590 577Memoryused(MB)Esper Java
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerPerformance Evaluation - Observations• The Java implementation outperforms the Esper version• Can be accredited to abstraction overhead imposed by theEsper engine• Performance margin decrease as network overhead isintroduced, but is still significant• UDP benchmarks offer 45% higher throughput with the Javaversion
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerHalstead’s Metrics• Metrics that describe the complexity and effort required towrite a program• Sees a program as a series of tokens, classified as eitheroperands or operators
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerComplexity Metrics0 100 200 300 400Vocabulary (n1+n2)Program length (N1+N2)Total operators (N1)Total operands (N2)Unique operators (n1)Unique operands (n2)Lines of code(Java)(EPL)Viewer StatisticsAnnoyance DetectorParsing and Query SetupUtility Functions
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerComplexity Evaluation - Observations• The EPL implementation scores slightly better for the viewerstatistics application• EPL scores significantly better for the annoyance detector• Initial effort was similar for both applications• Expanding EPL applications is significantly easier than Java
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerSummary• The Java implementation is the most performant• The Esper implementation is easier to expand• Can be attributed to different degrees of abstraction
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerOutlineIntroductionBackgroundProject ContextResearch ContributionsSenseWrapSenseWrapEventCasterSystem ArchitectureEsper and EPLTelevision StatisticsBackgroundImplementationStatisticsDeploymentParadigm ComparisonPerformanceComplexityConclusionsAdScorerOverviewExperimentsLive Scoring ResultsSummary
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerDeploymentTV NetworkAdDetectorMuteAdSuccess-EvaluatorSTBsInputadapters StatsAd startChannel zap events Filtering,transformationZapAd success scoreHistoricalstatsProcessingQueueingInput
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerDefining an advertisement as a context in EPLListing 1: Context declaration1 create context AdBreakCtx as2 initiated by3 AdIdentified(begin=true) as ad4 terminated by5 AdIdentified(detectId=ad.detectId, begin=false) as endAdListing 2: Populating the context1 context AdBreakCtx2 create window STBsnapshots.win:keepall() as STBWin3 insert where4 channel in (context.ad.channel) and hdmi=true and mute=false
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerExperimental Setup for AdScorer Evaluation• 1.5 hour of prime time TV was recorded• Advertisement times were manually recorded• 23 days of STB data was sent through the system in order toreach a correct state• Logged STB data and AdIdentified-events was then pushed tothe system• Simulation run
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerViewer numbersFigure: Viewership (in thousands) for the three largest channels, NRK1,TV2, and TVN.
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerViewer numbers12  13  14  15  16  17  18  19  20  21  S E S E S ETVN  Figure: Viewership (in thousands) for a single channel (TVN).
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerRetained Viewers
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerGained Viewers
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerRaw output for a single ad1 Event: {2 AdId: Mitsubishi ASX,3 channel: TV2 Norge,4 startTime: 22:55:12,5 stopTime: 22:55:32,6 viewersBegin: 83846,7 retained: 79244,8 IAR: 94.51,9 mutes: 141,10 viewersLost: 4602,11 average volume: 49.6412 }
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerSummary• AdScorer is capable of delivering an unprecedented level ofdetail, not possible through the current measurement regime• The results indicate that our implementation is capable ofscoring advertisements on multiple channels simultaneously innear real-time with consistent results
    • Introduction SenseWrap EventCaster Television Statistics Paradigm Comparison AdScorerThank You for listening!