Advice on designing and building distributed application to track vehicles

Posted by dario-g on Stack Overflow See other posts from Stack Overflow or by dario-g
Published on 2010-04-20T14:50:11Z Indexed on 2010/04/23 9:43 UTC
Read the original article Hit count: 348

I'm working on application for tracking vehicles. There will be about 10k or more vehicles. Each will be sending ~250bytes in each minute. Data contains gps location and everything from CAN Bus (every data that we can read from vehicle computer and dashboard). Data are sent by GSM/GPRS (using UDP protocol). Estimated rows with this data per day is ~2000k.

I see there 3 main blocks.

1. Multithreaded Socket Server (MSS) - I have it. MSS stores received data to the queue (using NServiceBus).

2. Rule Processor Server (RPS) - this is core of this system. This block is responsible for parsing received data, storing in the database, processing rules, sending messages to Notifier Server (this will be sending e-mails/sms texts).

Rule example. As I said between received bytes there will be information about current speed. When speed will be above 120 then: show alert in web application for specified users, send e-mail, send sms text.

(There can be more than one instance of RPS).

3. Web application - allows reporting and defining rules by users, monitoring alerts, etc.

I'm looking for advice how to design communication between RPS and Web application.

Some questions: - Should Web application and RPS have separated databases or one central database will be enough?

  • I have one domain model in web application. If there will be one central database then can I use the same model (objects) on RPS? So, how to send changed rules to RPS?

I try to decouple this blocks as much as possible. I'm planning to create different instance of application for each client (each client will have separated database). One client will be have 10k vehicles, others only 100 vehicles.

© Stack Overflow or respective owner

Related posts about design

Related posts about distributed