StreamInsight and Notification Services
If you are an “old-hand” (the emphasis is on old), you may remember how Microsoft introduced a service called Notification Services (NS) at around the same time frame as SQL Server 2000. I do definitely remember, because me and a cohert (at hat time) of mine – Bob B – wrote a class about NS. Now, when StreamInsight (SI) has been introduced, some people are saying that SI is the replacement of NS.
Actually, even though NS and SI may have some simiarities (both are dealing with events in one way or another), they are definitely not the same, and it would be totally wrong to compare them. In NS, you store events in the database and then compare and match them to subscriptions also stored in the database.
SI is completely different; here you query and process the incomnig data in real-time, way before it hits the database. You definitely have the ability to use the database for storage, but you are not dependent upon it.
This – I think – is something that needs to be communicated to the industry. If this is not understood, we may end up in a scenario where StreamInsight is rejected ut of hand, due to the wrong impression that it is dependent upon a database – which is not true. So please, NS was (is) great, but do not think it is the same as Notification Services SI!
Update 1: Jamie pointed out how I in the last sentence had said that NS is not the same as Notification Services, that should obviously be that NS is not the same as StreamInsight – thanks Jamie
StreamInsight Stuff
As you probably know, Microsoft’s implementation of Complex Event Processing (CEP) – called StreamInsight was released as a Community Technology Preview (CTP) a couple of days ago. The release was CTP2 (I have no idea when and if CTP1 was released). Anyway, I have a love for anything message based – and CEP is definitely message based, so I was obviously over this as a “rash”.
The last few days I have been playing around with researching this, and trying to come to grips with what it is all about. Part of the release are some samples and some help files in the shape of a chm file. It is definitely a lot to get your head around, and I will post more in the coming weeks. However, here is a heads up if you cannot get some of the samples to work;
When I started with StreamInsight I opened up the samples, and actually read the README.txt files, as well as part of the chm help document (I cannot be a developer, reading the help …). I tried first the ObjectModel sample app. It compiled OK (cool, let’s ship), and when I tried to run it I actually got some output to the console. At first glance it looked OK, but looking at the output a bit more closely I saw I had some exceptions there, looking something like this:
Query Exception: Microsoft.ComplexEventProcessing.Engine.OperatorExecutionExcep
tion: The adapter 'sensorInput' of type 'CepSamples.InputAdapters.TextFileInterv
alInput', query 'TrafficSensorQuery', failed to start. ---> System.FormatExcepti
on: String was not recognized as a valid DateTime.
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyl
es styles)
at System.Convert.ToDateTime(String value, IFormatProvider provider)
at CepSamples.InputAdapters.TextFileIntervalInput.CreateEventFromLine(String
line) in C:\Program Files\Microsoft StreamInsight CTP2\docs_samples\Samples\Inpu
tAdapters\TextFileInputAdapter\TextFileIntervalInput.cs:line 247
I looked into the TextFileIntervalInput. cs file at around the line number mentioned above, and saw some code looking like this:
// set Start time
evt.StartTime = Convert.ToDateTime(split[0], CultureInfo.CurrentCulture);
evt.EndTime = Convert.ToDateTime(split[1], CultureInfo.CurrentCulture);
I then looked at the input data file for this sample, TrafficSensor.csv, and saw that it had some date data formatted according to “en-US” culture. However, I am running under “en-UK” culture. So when the Convert.ToDateTime code runs it will fail, because it cannot convert to my culture.
I fixed that by using DateTime.TryParse instead (I will leave it up to you – my two readers – to figure out the syntax), and that sorted that problem. I then had the same issue with a second input adapter file: TextFileEdgeInput.cs, and fixed it in the same way. Note, you may get the eception in the TextFileEdgeInput.cs exception before the exception in TextFileIntervalInput.cs.
So, if you run under non-US culture this is an issue you can run into, but it looks it is just for the ObjectModel sample. The other samples seem to run OK.
I am really intrigued by StreamInsight and will drill down deeper into it, and also try to blog my findings along the way. If you are interested in this, please leave a comment.
Oh, and if you want it from the “horses mouth”, the StreamInsight team at Microsoft has a blog here. There is also a support forum here.
Hello World
A couple of days ago, I wrote a blogpost about me changing to a self-hosted blog. I also wrote that there might be more announcements regarding this move. So I guess it is time to do that announcement now;
I have started a new venture; SQL Develop, where I and others will do database and .NET development, consulting and mentoring. This does not mean however that I will stop doing work for DevelopMentor, nothing changes in my relation to DM.
I am extremely excited about this new venture, and stay tuned for more announcements!
New Home for My Blog
For various reasons I am moving the hosting of my blog from being hosted by WordPress.com to a selfhosted blog, at http://blog.sqldevelop.com (I am still using WordPress as my blog engine though). sqldevelop.com is a newly registered domain, and you can expect to see more announcements regarding that shortly. At the moment if you try to browse to www.sqldevelop.com, you will be redirected to blog.sqldevelop.com
So for the few of you that are following this blog, can you please change your feed-settings to http://feeds.feedburner.com/sqldevelop, and all should be OK.
Update: changed the feed URL
SQL Server 2008 R2 August CTP
Yesterday I downloaded and installed the August CTP of SQL Server 2008 R2, and today I played around with it for a while. So, what are my impressions…
Well, from a perspective of being a relational dev and internals guy, my immediate response is … “yawn – where is the beef”. I.e, it is not much there, and I doubt we will see much more in coming releases. However, if I were a BI / reporting guy I’d be over the moon, and definitely look forward to future CTP’s! Even if I were a (wait for it …) DBA I would be fairly interested.
I will let you decide for yourself what is interestimg for you, but one thing that is not in the CTP at the moment but is promised (and keeps me interested) is StreamInsight (based on Complex Event Processing). This will be part of SQL Servr 2008 R2. Coming from the financial industry and dealing with message based applications (that’s why I love SQL Server Service Broker), this is something I am really interested in. So, even if you are a T-SQL / internals guy, do not despair – there may be something for us as well.
