Advanced Microsoft SQL Server 2008 R2 StreamInsight

Slides:



Advertisements
Similar presentations
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

 Josh Honeyman Sr. Development Lead Microsoft Corporation BB57.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
SQL Server 2008 R2 StreamInsight Complex Event Processing Event Stream Processing.
5 Complex Event Processing (CEP) is the continuous and incremental processing of event streams from multiple sources based on declarative query.
Interactivity Navigating a data model Working with large quantities of data Entry Editing and adding data User feedback and validation Presentation.
Feature: Web Client Keyboard Shortcuts © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
 Pablo Castro Software Architect Microsoft Corporation TL08.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
 Rico Mariani Architect Microsoft Corporation.
 Frank Savage Architect Microsoft Corporation.
SQL Server 2008 Spatial Summary 2 Spatial Data Types (CLR UDT) Comprehensive set of Spatial Methods High Performance Spatial Indexes Spatial Library Sink/Builder.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
John Plummer Technical Specialist Data Platform Microsoft Ltd StreamInsight Complex Event Processing (CEP) Platform.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Why data services? Common challenges when creating rich web applications Creating rich web applications with data services Future scenarios & roadmap.

Has the ETL run yet?
Building a real-world, Internet- scale stock trading application Naveen Prabhu Quadwave Consulting Pvt. Ltd.
customer.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
2 Complex Event Processing (CEP) is the continuous and incremental processing of event streams from multiple sources based on declarative query and pattern.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
The CLR CoreCLRCoreCLR © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

Event-Driven Stream Processing with Microsoft StreamInsight Roman Schindlauer.
MIX 09 6/5/2018 9:14 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Microsoft Ignite /31/ :08 AM
Microsoft Build /20/2018 5:17 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Microsoft Build /22/2018 3:05 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Title of Presentation 11/22/2018 3:34 PM
"Oslo”: Customizing and Extending the Visual Design Experience
Matt Masson Software Development Engineer Microsoft Corporation
Advanced Dashboard Creation Using Microsoft SharePoint Server 2010
SPC2012 – IT-Pro 11/30/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Title of Presentation 12/2/2018 3:48 PM
Building event-driven, long-running apps with Windows workflow
F# for Parallel and Asynchronous Programming
Tech Ed North America /1/ :36 AM Required Slide
Intro to Workflow Services and Windows Server AppFabric
Tech·Ed North America /17/2019 1:47 AM
Pablo Castro Software Architect Microsoft Corporation
From Development to Production: Optimizing for Continuous Delivery
Create rich, data-driven Web apps with ASP.NET 4.5 Web Forms
Understand design from code with code maps
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Windows 8 Security Internals
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
Service Template Creation from the Ground Up
Title of Presentation 5/12/ :53 PM
Service Template Creation from the Ground Up
Шитманов Дархан Қаражанұлы Тарих пәнінің
SharePoint 2013 Authentication with Azure – Part 2
Title of Presentation 5/24/2019 1:26 PM
7/5/2019 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Office 365 Development July 2014.
Making Windows Azure Relevant to IT Professionals
Title of Presentation 7/24/2019 8:53 PM
Building Data-Driven Applications Using "Quadrant" and "M"
Advanced app and driver debugging
利用IIS部署與維護 SOA應用程式的技巧
Presentation transcript:

Advanced Microsoft SQL Server 2008 R2 StreamInsight PDC09-SVR08 Advanced Microsoft SQL Server 2008 R2 StreamInsight Beysim Sezgin (Architect) Roman Schindlauer (Program Manager) Microsoft Corporation © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

SQL Server Connections Agenda Use Cases & Challenges Formulating Declarative Queries Windows in Time Implementing Adapters Architecture Extensibility Event Flow Debugging Updates will be available at http://www.devconnections.com/updates/LasVegas_Fall09/SQL

SQL Server Connections What is CEP? Complex Event Processing (CEP) is the continuous and incremental processing of event streams from multiple sources based on declarative query and pattern specifications with near-zero latency. Updates will be available at http://www.devconnections.com/updates/LasVegas_Fall09/SQL

SQL Server Connections What is CEP? Complex Event Processing (CEP) is the continuous and incremental processing of event streams from multiple sources based on declarative query and pattern specifications with near-zero latency. Database Applications Event-driven Applications Query Paradigm Ad-hoc queries or requests Continuous standing queries request response Event output stream input stream Updates will be available at http://www.devconnections.com/updates/LasVegas_Fall09/SQL

SQL Server Connections What is CEP? Complex Event Processing (CEP) is the continuous and incremental processing of event streams from multiple sources based on declarative query and pattern specifications with near-zero latency. Database Applications Event-driven Applications Query Paradigm Ad-hoc queries or requests Continuous standing queries Latency Seconds, hours, days Milliseconds or less request response Event output stream input stream Updates will be available at http://www.devconnections.com/updates/LasVegas_Fall09/SQL

SQL Server Connections What is CEP? Complex Event Processing (CEP) is the continuous and incremental processing of event streams from multiple sources based on declarative query and pattern specifications with near-zero latency. Database Applications Event-driven Applications Query Paradigm Ad-hoc queries or requests Continuous standing queries Latency Seconds, hours, days Milliseconds or less Data Rate Hundreds of events/sec > Tens of thousands of events/sec request response Event output stream input stream Updates will be available at http://www.devconnections.com/updates/LasVegas_Fall09/SQL

StreamInsight Platform SQL Server Connections StreamInsight Platform .NET C# LINQ StreamInsight Application Development StreamInsight Application at Runtime Event sources Event targets Input Adapters Output Adapters StreamInsight Engine Devices, Sensors Pagers & Monitoring devices Standing Queries KPI Dashboards, SharePoint UI 1 Web servers Query Logic Query Logic 4 2 3 Trading stations Event stores & Databases Query Logic Stock ticker, news feeds Event stores & Databases Updates will be available at http://www.devconnections.com/updates/LasVegas_Fall09/SQL

NBC Sunday Night Football: live streaming through Silverlight Rich client experience, multiple camera angles Needed: track, monitor, analyze user behavior, based on silverlight Media analytics

Use Case: NBC Sunday Night Football 1 Telemetry Receiver 4 StreamInsight Listener Adapter GeoTag and group by region SQL Adapter PerfCounter Adapter 2 Count total events Count session starts Count active sessions 3

Complex Aggregations/ Use Case: Data Center Power Consumption Visualize Process Information Complex Aggregations/ Correlations Central time series archive ETW Input Adapter Query Query 1 2 Power Meter Input Adapter Query 3

SQL Server Connections Challenges How do I … detect interesting patterns? reason about temporal semantics? correlate data? aggregate data? avoid writing custom imperative code? create a runtime environment for continuous and event-driven processing? As a developer, I need a platform! Updates will be available at http://www.devconnections.com/updates/LasVegas_Fall09/SQL

SQL Server Connections Query Expressiveness Selection of events (filter) Calculations on the payload (project) Correlation of streams (join) Stream partitioning (group and apply) Aggregation (sum, count, …) over event windows Ranking over event windows (topK) Updates will be available at http://www.devconnections.com/updates/LasVegas_Fall09/SQL

Query Expressiveness Projection var result = from e in inputStream select new { id = e.id, W = (double)e.intW / 10 };

Query Expressiveness Projection Filter var result = from e in inputStream where e.id > 3 select new { id = e.id, W = (double)e.intW / 10 };

Query Expressiveness Projection Filter Correlation (Join) var result = from eLeft in inputStream1 join eRight in inputStream2 on eLeft.id equals eRight.id select new { id = eLeft.id, diff = eLeft.W - eRight.w };

Query Expressiveness Projection Filter Correlation (Join) Aggregation over windows var result = from win in inputStream.TumblingWindow( TimeSpan.FromSeconds(10)) select new { avg = win.Avg(e => e.W) };

Query Expressiveness Projection Filter Correlation (Join) Aggregation over windows Group and Aggregate var result = from e in inputStream group e by e.id into eachGroup from win in eachGroup.TumblingWindow( TimeSpan.FromSeconds(10)) select new { eachGroup.Key, avg = win.Avg(e => e.W) };

Time Windows Tumbling Window Time

Time Windows Hopping Window Time

demo LINQ Queries 11/24/2018 1:10 AM © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Adapters Import data into StreamInsight platform Adapter characteristics: Pull vs Push Out-of-order vs. In-Order Events Adapter API Observable model wraps adapter framework

Adapter Factory public class MyFactory : ITypedInputAdapterFactory<MyConfig> { public InputAdapterBase Create<Payload>(MyConfig conf, EventShape ev) return new MyAdapter(conf); } public void Dispose() { ... }

Adapter API public class MyAdapter : TypedPointInputAdapter<MyPayload> { public MyAdapter(MyConfig conf) { ... } public override void Start() public override void Resume() }

Stream Liveliness ? ? Time All processing is done according to application time, not event arrival time Events can be enqueued with out-of- order timestamps How does the engine know when to flush its output – how long does it need to keep windows open? CTI: Current Time Increment Asserts that nothing up to its timestamp will be inserted Latency and liveliness of results is driven by CTIs Adapters can declare an AdvanceTimePolicy Issue CTIs with given frequency and time delay Bigger delay: longer grace period, slower output Smaller delay: lively output, less out-of-order allowed

Development Steps 1 2 3 4 .Net Development LINQ StreamInsight IL User App Engine 4 Adapter Runtime query Adapter

StreamInsight Architecture Compilation Runtime Parser Algebrizer Streams Events Compiler Expression Service Stream Manager Event Manager Metadata Type System Execution Operators Scheduler Stream OS Resource Governor Synch. Primitives Buffer Manager CLR Hosting

Brand Transformation Presentation Query Compilation Multiple Syntactic surfaces over a single algebra, e.g., LINQ, CQL, etc. Compile time type checking and type safe code generation for minimal runtime impact. Leverage CLR Code generator, JIT support Type System Tools and Libraries (LINQ Expressions, IDE, etc.) Multiple Deployment Environment with different form factors, e.g. SmartPhone, PDA, PCs. Compilation Parser Algebrizer Compiler Expression Service Metadata Type System

Runtime – Events, Streams, Scheduler Brand Transformation Presentation Runtime – Events, Streams, Scheduler JIT code generation for field references, expression evaluation Event manager is implemented as a combination of managed and native code in order to minimize overhead and ensure predictable performance. Runtime Streams Events Stream Manager Event Manager Execution Operators Scheduler Cooperative Scheduler (less context switch, better SLA) Operators are affinitized to a Scheduler. Periodic checks and migration for load balancing DataFlow Architecture: Reduced coupling and pipeline parallelism

Runtime – Execution Operators Efficient implementation of operators that perform incremental evaluation as each event is processed. GroupAndApply Operator: Enables parallelism for both scale-up (multi-core) and scale-out(cluster). Groups are dynamically instantiated and torn down based upon the data. Large numbers of groups can be simultaneously active. Machine2 Machine1 ~ MAP Apply Union X,Y,Z ABC Group A,B,C BBB AA CC XX ZZ YYY XYZ ~ REDUCE

SQL Server Connections Extensibility Need for domain-specific extensions Integrate with functionality available in existing libraries User-defined operators, functions, aggregates Code written in .NET, deployed as .NET assembly Window-based semantics for UDOs, UDAs Receive a set of events Produce a value / set of events Updates will be available at http://www.devconnections.com/updates/LasVegas_Fall09/SQL

SQL Server Connections Supportability Diagnostic interface Retrieve statistical information at runtime Part of the object model API Manage through Powershell Debugger tool Retrieve live diagnostics Record and replay queries Analyze event processing along operators Updates will be available at http://www.devconnections.com/updates/LasVegas_Fall09/SQL

demo Debugger Tool 11/24/2018 1:10 AM © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Conclusion CEP Platform & API Event-triggered, fast Computation API for Adapters, Queries, Applications Declarative LINQ Flexible Adapter API Extensible Supportability

Please Evaluate! Sign in to microsoftpdc.com Follow the evaluation link for the session PDC will donate $1 for each person who completes an evaluation to the local Boys and Girls Club

11/24/2018 1:10 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

11/24/2018 1:10 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.