slide1 l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
StreamInsight 04 – Installing, Deploying and Maintaining the SQL Server 2008 R2 StreamInsight Runtime Engine PowerPoint Presentation
Download Presentation
StreamInsight 04 – Installing, Deploying and Maintaining the SQL Server 2008 R2 StreamInsight Runtime Engine

Loading in 2 Seconds...

play fullscreen
1 / 29

StreamInsight 04 – Installing, Deploying and Maintaining the SQL Server 2008 R2 StreamInsight Runtime Engine - PowerPoint PPT Presentation


  • 168 Views
  • Uploaded on

StreamInsight 04 – Installing, Deploying and Maintaining the SQL Server 2008 R2 StreamInsight Runtime Engine. SQL10R2UPD05-DECK-04 [Presenter Name] [Presenter Title] [Company Name]. Module Overview. Introducing StreamInsight Querying Events in StreamInsight

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'StreamInsight 04 – Installing, Deploying and Maintaining the SQL Server 2008 R2 StreamInsight Runtime Engine' - kimball


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1

StreamInsight04 – Installing, Deploying and Maintaining the SQL Server 2008 R2 StreamInsight Runtime Engine

SQL10R2UPD05-DECK-04

[Presenter Name][Presenter Title] [Company Name]

module overview
Module Overview
  • Introducing StreamInsight
  • Querying Events in StreamInsight
  • Designing StreamInsight Event Models and Adapters
  • Installing, Deploying, and Maintaining the StreamInsight Runtime Engine
agenda
Agenda
  • Choosing a Development Model
  • Choosing a Deployment Model
  • Demo: Working with a Development Model
  • Installing, Monitoring, and Maintaining StreamInsight
  • Demo: Event Flow Debugger
  • Lab: Debugging Event Flows
streaminsight development models
StreamInsight Development Models
  • Two development models:
    • Implicit Server (Easiest)
    • Explicit Server (Most Flexible)
implicit server development model
Implicit Server Development Model
  • Easy development model to use
  • Hides most complexity
  • StreamInsight server acts as an implicit host
    • Creates and registers required objects
  • Allows developers to focus on query logic
    • Good test environment for query developers
implicit server process
Implicit Server: Process
  • Server created implicitly for each query
  • Query is automatically hosted
    • Stored in memory, not on stable storage (disk)
  • Developer provides:
    • Input/output adapter bindings
    • Query logic and binding
  • Server manages objects
    • Creates event type (accesses it via reflection)
    • Registers input/output adapters
    • Registers query template and query
    • Creates objects when query starts
    • Disposes of objects when query is disposed
implicit server query example
Implicit Server: Query Example

varinputConf = newTextFileInputConfig("MyData.csv");

varoutputConf = newTextFileOutputConfig("Result.csv");

varinputStream = CepStream<PayloadType>.Create("inputStream",

typeof(TextFileInputFactory),inputConf,

EventShape.Point);

CepStream<PayloadType> filter = from e ininputStream

wheree.value > 10

select e;

Query query = filter.ToQuery(typeof(TextFileOutputFactory),

outputConf,

EventShape.Interval,

StreamEventOrder.FullyOrdered);

query.Start();

// perform work or wait for output adapter to signal complete

query.Stop();

explicit server development model
Explicit Server Development Model
  • Developer explicitly creates and registers all objects
  • Provides complete control of
    • StreamInsight application
    • Development environment (via client-side object model API)
  • Allows for reuse of
    • Queries
    • Adapters
    • Event Types
    • Third-party Query Templates
explicit server process
Explicit Server: Process
  • Code creates or connects to server
  • Code creates all objects and registers them into server
    • Query Template
    • Query Instance
    • Event Types
    • Input/Output Adapters
  • Server can store metadata in memory or persist to disk
  • Server can run locally or remotely via Web service
explicit server query example 1 of 2
Explicit Server: Query Example 1 of 2

Server server = Server.Create();

Applicationapplication = server.CreateApplication("app1");

InputAdapteria =

application.CreateInputAdapter<MyInputAdapterFactory>(

"InputAdapterName", "Some description");

OutputAdapteroa =

application.CreateOutputAdapter<MyOutputAdapterFactory>(

"OutputAdapterName", "Some other description");

CepStream<PayloadType> inputStream

= CepStream<PayloadType>.Create("inputStream");

varhighWaterMarkAlert = from e ininputStream

wheree.value > 99

select e;

explicit server query example 2 of 2
Explicit Server: Query Example 2 of 2

QueryTemplate qt1 = application.CreateQueryTemplate(

"highWaterMarkAlert", highWaterMarkAlert);

QueryBinderqb = newQueryBinder(qt1);

qb.BindProducer("inputStream", ia, newMyInputAdapterConfig(),

EventShape.Interval);

qb.AddConsumer("queryresult", oa, newMyOutputAdapterConfig(),

EventShape.Point, StreamEventOrder.FullyOrdered);

Query q1 = application.CreateQuery(

"query1", qb, "Query Description");

q1.Start();

explicit server connect to existing server
Explicit Server: Connect to Existing Server

// Connect to a remote CEP server.

Server server = Server.Connect(

newSystem.ServiceModel.EndpointAddress(

@"http://localhost:12345/CEP"));

// Retrieve the application app1 from the server.

Applicationapplication = server.Applications["app1"];

// Retrieve existing query template, qt1, from server.

QueryTemplate qt1 = application.QueryTemplates["qt1"]; 

agenda13
Agenda
  • Choosing a Development Model
  • Choosing a Deployment Model
  • Demo: Working with a Development Model
  • Installing, Monitoring, and Maintaining StreamInsight
  • Demo: Event Flow Debugger
  • Lab: Debugging Event Flows
streaminsight deployment scenarios
StreamInsight Deployment Scenarios
  • Full integration into host application as embedded DLL
  • Standalone server
    • Multiple applications
    • Multiple users
    • Option for a Windows Service on install
deployment hosted dll
Deployment: Hosted DLL
  • Use this option for the following scenarios:
    • Using Implicit Server development model
    • Needing to minimize memory footprint
    • Wanting to use a single process for both application and CEP server
    • Wanting to tightly control access to the CEP server
  • Do not use this option if:
    • You require shared access to the metadata
    • You require shared access to the streaming event data
deployment standalone server
Deployment: Standalone Server
  • Use this option for the following scenarios:
    • Metadata objects need to be shared between applications
      • Event Types
      • Adapter Types
      • Query Templates
    • A data source registered with the server provides an event stream for another existing application
  • Can choose to set up Windows Service during install
    • SQL Server CE Metadata Store
deployment other potential scenarios
Deployment: Other Potential Scenarios
  • StreamInsight-enabled device
  • Building operational intelligence
working with a development model

Working with a Development Model

SQL10R2UPD05-DEMO-06

Demo

agenda19
Agenda
  • Choosing a Development Model
  • Choosing a Deployment Model
  • Demo: Working with Development Models
  • Installing, Monitoring, and Maintaining StreamInsight
  • Demo: Event Flow Debugger
  • Lab: Debugging Event Flows
streaminsight installation requirements
StreamInsight Installation Requirements
  • Admin privileges required
  • .NET Framework 3.5 SP1
  • Must remove any existing SQL Server CE installation
  • Uninstall by Control Panel or re-running the setup msi
supplied samples
Supplied Samples
  • Many samples available
  • CodePlex project hosting for samples
    • http://streaminsight.codeplex.com
monitoring streaminsight
Monitoring StreamInsight
  • Need to track
    • Overall health of system
    • Query performance
  • Diagnostic views using ManagementService API
    • Use URIs for resource naming
    • GetDiagnosticView()
    • SetDiagnosticSettings()
    • ClearDiagnosticSettings()
    • Can be accessed via PowerShell
available diagnostic granularity
Available Diagnostic Granularity
  • Individual
    • Query
    • Adapter
    • Operator
    • Stream
    • Scheduler
  • Server-wide
    • Event Manager
    • Plan Manager
    • Scheduler
    • Query
accessing diagnostics from powershell
Accessing Diagnostics from Powershell

PS C:\> [System.Reflection.Assembly]::LoadWithPartialName(

"Microsoft.ComplexEventProcessing")

PS C:\> $server = [Microsoft.ComplexEventProcessing.Server]::Connect(

"http://localhost/StreamInsight")

PS C:\> $server | gm

TypeName: Microsoft.ComplexEventProcessing.Server

PS C:\> $dv=

$server.GetDiagnosticView("cep:/Server/EventManager")

PS C:\> $dv= $server.GetDiagnosticView("cep:/Server/PlanManager")

PS C:\> $dv= $server.GetDiagnosticView(

"cep:/Server/Application/ObjectModelSample/Query/SensorQuery")

event flow debugger
Event Flow Debugger
  • Analyzes events through time
    • Step through time
  • Follows events from one operator to the next
  • Can inspect all events on all streams and locate events
  • Helps answer: “How did this event get to this state?”
    • Root-cause analysis
  • Shows the effect of one event on downstream events
    • Event propagation analysis
  • Shows query execution statistics
event flow debugger27

Event Flow Debugger

SQL10R2UPD05-DEMO-07

Demo

resources
Resources
  • StreamInsight Website
    • http://www.microsoft.com/sqlserver/2008/en/us/R2-complex-event.aspx
  • StreamInsight Books Online
    • http://msdn.microsoft.com/en-us/library/ee362541(SQL.105).aspx
  • StreamInsight Forums
    • http://social.msdn.microsoft.com/Forums/en-US/streaminsight/threads
  • StreamInsight Whitepaper
    • http://download.microsoft.com/download/F/D/5/FD5E855C-D895-45A8-9F3E-10AFADBE51A/Microsoft%20CEP%20Overview.docx
slide29

© 2010 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.