Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to implement rule check while communicating with GPS device

Tags:

java

drools

We are developing a vehicle tracking system. Like every VTS, we have GPS devices fitted into the vehicles which keep sending location information to the server. On server, our TCP communicator process keeps reading that data and saves it into the database Now, we need to check for some set of rule to trigger alerts for the vehicles, e.g We need alert when vehicle reaches to a particular location, if vehicle crosses specific speed-limit,etc. Can you please suggest the best way to implement it? We have thought of some ways to implement it, 1. Our TCP communicator, when receives the location, should check for the alerts. 2. There will be a process which will keep running every 15 minutes and check the location details in that 15 minutes for alerts.

I am looking for the suggestions to implement it, logic-wise as well as technology-wise. e.g. Whether we should use Drools or not?, etc.

like image 419
Saurabh Avatar asked Aug 02 '11 09:08

Saurabh


1 Answers

Somebody from FedEx actually presented something like this in a JavaOne conference I attended a couple of years back.

Basically, the idea was, yes, using Drools Expert + Fusion to perform CEP (complex events processing) on vehicle location data.

As far as I can recall, a vehicle would periodically (every couple of seconds even) send its GPS coordinates to the engine (an event) which would then be digested by the rules engine, and depending on the rules could trigger certain actions such as raising alerts ("vehicle is stalled" or "out of course") or sending notifications ("vehicle will arrive at destination in ~15 minutes").

(Google for "drools fusion cep vehicle tracking" uncovers this presentation which should give you few more details or at least provide some insight.)

like image 68
Alistair A. Israel Avatar answered Sep 28 '22 22:09

Alistair A. Israel