I have a.vehicle tracking web app
The devices in the cars.send position updates every 10 - 30 seconds
There are thousands on cars
On each position update, I need to check lots of criteria (alerts)
For example : I need to check if the position is inside a no go zone, or if.the vehicle is exceeding the set speed limit for that car, or if it is being used out of offices hours, or if they have pressed.the panic button, or any criteria a user may specify
I was thinking of using SQL triggers to check every position update against a criteria
But someone recommended streaminsights
Would this be what I need to monitor data as it gets inserted to DB?
First, this is certainly a great use-case for StreamInsight. There's nothing that you listed that would be all that difficult to do. The most challenging would be the no-go zone ... but that's less StreamInsight and more due to the geo logic that you'd need to do and would be the same for a non-StreamInsight application. I have done some testing with Sql Geo objects in StreamInsight and they do work pretty well so that's where I'd recommend that you start.
As for monitoring data "as it gets inserted into the DB" ... you have it reversed. The data should come to StreamInsight on the way to the database, not after it gets into the database. This could be as a parallel stream - a web service, say, gets the update and then enqueues to StreamInsight and stores to the database - or as the end result from StreamInsight - data goes directly into StreamInsight and then SI has a sink that writes pertinent data to the database.
DevBiker (aka J Sawyer)
Microsoft MVP - Sql Server (StreamInsight)
If I answered your question, please mark as answer.
If my post was helpful, please mark as helpful.
Wow thanks for clearing that up I'm a little confused where I would use SI At the moment, we have an exe on the server which is the 'listener' This listens to all the data being sent by Udp from tracking hardware in the vehicles The tracking hardware just sends to an IP address/port (and the exe intercepts it) This exe then puts all the messages into the Microsoft message queue. We then have a console app which picks each message from the message queue and puts it into the database So, would I adapt this console app to use SI? Or would I need something else? I'm a little confused from what I read, I though SI was within SQL server 2012 If I could grasp a basic understanding of the structure of what to do, I think I would be good to go Another question about geo zones, I was planning to integrate some logic to pass in the co-ordinates of the vehicle, and the co-ordinates of the no go zone, and it would return and Boolean, however, I haven't got to this bit yet, so if there is any functionality out there already that would be great to know about! Thanks!!