1 / 29

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

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

kimball
Download Presentation

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

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. StreamInsight04 – Installing, Deploying and Maintaining the SQL Server 2008 R2 StreamInsight Runtime Engine SQL10R2UPD05-DECK-04 [Presenter Name][Presenter Title] [Company Name]

  2. Module Overview • Introducing StreamInsight • Querying Events in StreamInsight • Designing StreamInsight Event Models and Adapters • Installing, Deploying, and Maintaining the StreamInsight Runtime Engine

  3. 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

  4. StreamInsight Development Models • Two development models: • Implicit Server (Easiest) • Explicit Server (Most Flexible)

  5. 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

  6. 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

  7. 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();

  8. 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

  9. 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

  10. 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;

  11. 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();

  12. 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"]; 

  13. 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

  14. StreamInsight Deployment Scenarios • Full integration into host application as embedded DLL • Standalone server • Multiple applications • Multiple users • Option for a Windows Service on install

  15. 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

  16. 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

  17. Deployment: Other Potential Scenarios • StreamInsight-enabled device • Building operational intelligence

  18. Working with a Development Model SQL10R2UPD05-DEMO-06 Demo

  19. 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

  20. 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

  21. Supplied Samples • Many samples available • CodePlex project hosting for samples • http://streaminsight.codeplex.com

  22. 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

  23. Query Monitoring Points

  24. Available Diagnostic Granularity • Individual • Query • Adapter • Operator • Stream • Scheduler • Server-wide • Event Manager • Plan Manager • Scheduler • Query

  25. 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")

  26. 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

  27. Event Flow Debugger SQL10R2UPD05-DEMO-07 Demo

  28. 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

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

More Related