{"id":317,"date":"2009-01-27T17:35:49","date_gmt":"2009-01-28T00:35:49","guid":{"rendered":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/?p=317"},"modified":"2009-01-27T17:35:49","modified_gmt":"2009-01-28T00:35:49","slug":"select-stream-real_time_bi_metric-from-data_in_flight","status":"publish","type":"post","link":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/2009\/01\/27\/select-stream-real_time_bi_metric-from-data_in_flight\/","title":{"rendered":"select stream REAL_TIME_BI_METRIC from DATA_IN_FLIGHT"},"content":{"rendered":"<p>SQL is great.  There are millions of people who know it, it&#8217;s semantics are standardized (well, as much as anything is ever I suppose), and it&#8217;s a great language for interacting with data.  The folks at <a href=\"http:\/\/www.sqlstream.com\/\">SQLstream<\/a> have taken a core piece of the technology world, and turbocharged it for a whole new application: querying streams of data.  You can think of what <a href=\"http:\/\/www.sqlstream.com\/index.html\">SQLstream<\/a> is doing as the &#8216;calculus&#8217; of SQL &#8211; not just query results of static data in databases but query results of a stream of records flowing by.<\/p>\n<p>Let&#8217;s consider some of the possibilities.  Remember the results aren&#8217;t a one time poll &#8211; the values will continue to be updated as the query continues.<\/p>\n<blockquote><p>\/\/ Select the stocks Average price over the last 10 ticks<br \/>\nselect stream stock, avg(price) over (previous 10) from stock_ticker group by stock<br \/>\n\/\/ Get the running averages for the past minute, hour, and day updated<br \/>\nselect stream stock, avg(price) over (range interval 1 minute preceding) as &#8220;AvgMinute&#8221; , avg(price) over (range interval 1 hour preceding) as &#8220;AvgHour&#8221;, avg(price) over (range interval 1 day preceding) as &#8220;AvgDay&#8221; from stock_ticker group by stock;<\/p><\/blockquote>\n<p>For a variety of reasons, I haven&#8217;t posted my demo of my real time BI analytics powered by <a href=\"http:\/\/www.sqlstream.com\/\">SQLstream<\/a> but figured it&#8217;s about time to at least talk about it.  The demo is illustrative of a the BASIC capabilities of the <a href=\"http:\/\/www.sqlstream.com\/Products\/productsOffersRAMMS.htm\">SQLstream RAMMS<\/a> (Relational Asynchronous Messaging Management System).  Trust me, the simple stream queries I wrote are about as trivial as possible.  The more complex the business needs the <a href=\"http:\/\/www.sqlstream.com\/Products\/productsTechSQLXMPLS.htm\">fancier the SQL becomes<\/a>, but that&#8217;s the point where the demo turns into a real customer project.<\/p>\n<p>You can&#8217;t see it in just the still image below, but the bars in the bar chart are &#8220;dancing&#8221; around as events are flowing from <a href=\"http:\/\/www.sqlstream.com\/index.html\">SQLstream<\/a>.  It&#8217;s very very cool to watch a web dashboard update with no interaction. There&#8217;s a huge data set of stock prices being INSERTed into a stream via JDBC from one application and there&#8217;s a stream select that gives a windowed &#8220;% Change&#8221; of stock price.  The application simply gets the &#8220;Stock \/ % Change&#8221; values over JDBC with all the complex windowing, grouping etc being done by <a href=\"http:\/\/www.sqlstream.com\/index.html\">SQLstream<\/a>.<\/p>\n<p><a onclick=\"window.open('http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-content\/uploads\/2009\/01\/200901271717.jpg','popup','width=829,height=362,scrollbars=no,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=yes,left=0,top=0');return false\" href=\"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-content\/uploads\/2009\/01\/200901271717.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-content\/uploads\/2009\/01\/200901271717-tm.jpg\" border=\"1\" alt=\"200901271717\" hspace=\"4\" vspace=\"4\" width=\"229\" height=\"100\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.sqlstream.com\/Products\/products.htm\">SQLstream have announced the 2.0 release of their produc<\/a>t.  Some of you may be curious as to where the 1.x version of their product has been.  To date, <a href=\"http:\/\/www.sqlstream.com\/index.html\">SQLstream<\/a> hasn&#8217;t made much fanfare about their products.  They&#8217;ve been selling to customers, working with the <a href=\"http:\/\/eigenbase.org\/\">Eigenbase<\/a> foundation, and have released several versions of their product over that past few years.  I&#8217;ve had the chance to work with the 1.x series of their product and an early release candidate of their 2.x series and think it&#8217;s very very compelling.  I very much look forward to digging into the new 2.x features soon.<\/p>\n<p>In particular, and what I continue to find most fascinating, is the new aggregation features in 2.x.  This will allow users of ROLAP type query systems (or simply companies with summary\/aggregate tables they spend time updating) to keep these tables up to date throughout the day.  This is a huge win for companies that have to update summary tables from huge transaction data sets.<\/p>\n<p>Consider a common problem batch loading window.  You load a million records \/ day.  You do period batch updates of your transactions throughout the day and at midnight you kick off the big huge queries to update the &#8220;Sales by Day&#8221;, &#8220;Sales by Month&#8221;, &#8220;Sales by Qtr&#8221;, &#8220;Sales by Year&#8221;, &#8220;Sales All Time&#8221; <strong>summary tables that take hours to rebuild<\/strong> (going against huge fact tables).  <strong>Missing the batch window means reports\/business is delayed. <\/strong> <a href=\"http:\/\/www.sqlstream.com\/index.html\">SQLstream<\/a> can ease this burden.  <a href=\"http:\/\/www.sqlstream.com\/index.html\">SQLstream<\/a> is efficiently calculating these summaries throughout the day (period batch loads) and at midnight simply &#8220;spits out&#8221; the summary table data.  That&#8217;s a huge win for customers with a lot of data.<\/p>\n<p>If you&#8217;re loading millions of records per day and you need to keep summaries up to date or have time sensitive BI applications you should definitely consider  <a href=\"http:\/\/www.sqlstream.com\/index.html\">SQLstream<\/a>.  If you&#8217;re interested in discussing real time BI or the benefits of streaming aggregation don&#8217;t hesitate to contact <a href=\"http:\/\/www.bayontechnologies.com\/bt\/aboutus.php\">Bayon<\/a> ; we can help you prototype, evaluate and build a <a href=\"http:\/\/www.sqlstream.com\/index.html\">SQLstream<\/a> solution<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SQL is great. There are millions of people who know it, it&#8217;s semantics are standardized (well, as much as anything is ever I suppose), and it&#8217;s a great language for interacting with data. The folks at SQLstream have taken a core piece of the technology world, and turbocharged it for a whole new application: querying [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/posts\/317"}],"collection":[{"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/comments?post=317"}],"version-history":[{"count":0,"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/posts\/317\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/media?parent=317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/categories?post=317"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/tags?post=317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}