80 likes | 227 Views
Brief Introduction of StreamInsight. Abdullah Mueen. Architecture. Key Benefits. Highly optimized performance and data throughput Parallel execution of continuous queries over high-speed data .
E N D
Brief Introduction of StreamInsight Abdullah Mueen
Key Benefits • Highly optimized performance and data throughput • Parallel execution of continuous queries over high-speed data. • Events are processed without costly data load or storage operations in the critical processing path. • .NET development environment • LINQ (Language Integrated Query) as an embedded query language. • Reduces development costs and the time. • Flexible deployment capability • Needs only SQL Server 2008. Free for UCR Students. • Manageability
Event Models • Interval • StartTime::= DateTimeOffset • EndTime ::= DateTimeOffset • Point • StartTime ::= DateTimeOffset • EndTime ::= StartTime+ t • Edge • Edge time ::= DateTimeOffset • Edge type ::= START | END
Queries • Queries • Projection • varqueryProject = from c inTestEventStreamselectnew {i = c.i * 2, f = c.f * 2}; • Filtering • varqueryFilter = from c insomeStreamwherec.i > 10 select c; • Joins • varequiJoin = from e1 in stream1 join e2 in stream2 on e1.i equals e2.i selectnew{e1.i,e2.j}; • Aggregation • varavgHourly = from win ininputStream.HoppingWindow (60, 5) selectnew { hourlyavg = win.Avg(e => e.f) }; • Union • varunioned = stream1.Union(stream2);
Windows • Event Windows • Count Windows • Variable duration but fixed sized window of events • One parameter: Count • Hopping Windows • Fixed duration but variable sized window of events • Two parameters: Duration and hop size • Snapshot Windows • Variable duration window of a specific duration • No parameter: starts and ends at the starting or ending of an event
Windows • Count Windows • Hopping Windows • Snapshot Windows
Example: Lagged Correlation • var lags = sensorStream.ShiftEventTime(e => e.StartTime - TimeSpan.FromSeconds(30)); • var joined = from e1 insensorStreamjoin e2 in lags select new{Value1 = e1.Value, Value2 = e2.Value}; • varcorr = from w injoined.HoppingWindow(60,1)select new { x = w.Corr(e => e.Value1,f => f.Value2) };