views:

205

answers:

2

Well, I tried to ask this question as a comment on this question, but I thought that maybe no one will notice it, so I decided to ask it as a separate one.

The question is about how to do real-time GPS tracking system things; if we have the following scenario:

  1. Rather than connecting a GPS receiver to a PC, the user will have a mobile device with an integrated GPS receiver.

  2. Location data will be sent over mobile network using GPRS data connection to a server side.

  3. The data will be processed and a KML path file will be created and updated on time intervals and used to track the user using Google Earth.

The question is: what is the best method to accomplish this scenario for the server side; is it a web service, a web application, a windows service, a windows application or what exactly? Taking into account that the system will serve a number of users simultaneously, and that more users may use the system in the future(scalability issues).

Thank you in advance and I highly appreciate any help :)

A: 

For me there is a technical limitation/risk here -> the mobile device, and its connectivity.

1) What are your requirements? Do you need to support various mobile devices or will you focus on only one platform ?

2) More importantly, you have to understand that GPRS data connections differ from a PC connected to the Internet. There are various connection restrictions imposed by different mobile operators.

If I was to design such a system in order to minimise those risks I would go with a web server running on port 80 which the mobile devices would upload their Long/Lat through POST (or even GET to simplify things).

EDIT: Regarding scalability, it would be very easy to scale things up in the future using tried&tested load-balancing techniques.

EDIT2: Whichever technology you decide to use, i would HIGHLY recommend that the first thing you do is to mock up a prototype. Those connection restrictions could be show-stoppers. Ideally you need to explore them before you have made any serious investment.

Iraklis
Thank you for your answer. Regarding the two questions you asked:1) For now I'm targeting windows mobile 6 powered devices, as I'm supposed to supply the customers with the devices, so it's not something commercial.2) I understand that there is a difference, as a matter of fact I tried using Google maps for mobile on HTC Touch Diamond GPS-enabled device for the duration of 45-minute trip and it was great, and I'm talking about the real-time tracking feature of Google maps using GPS not cell-based, so I don't know what connection restrictions you are talking about, could you be more clear?
Ayman
Also I have to say that I'm making a prototype or a demo to show it to the customer, of course I'm not making any thing serious :D
Ayman
A: 

What kind of device are you using exactly, something like this or something more sophisticated / configurable? If we assume that the device sends its data over TCP, I would consider the following approach with separate input/output processes:

  • Input: a process listening specific TCP port and storing incoming coordinates to database with a device id. Preferably, your listening loop must be able to handle simultaneous connections without them blocking each other.

  • Output: web application reading coordinates from database for a given device id and displaying them through the Google Earth API.

Use whatever programming language(s) you are familiar with.

jholster
Thank you for the very helpful answer!!Regarding your question about the device I'm going to use, as I said in the problem description it will be windows mobile 6 powered devices, I know that using a dedicated device like the one you noted to is much more better, but I don't want to burden the customer with more expenses, and I think that the only problem with using a mobile device with a built in GPS receiver is the battery consumption issue, which can be overcome by connecting the device to the car charger.
Ayman
Regarding the suggested approach you described, wouldn't the process of storing to database then reading the stored data by a web application and displaying it on Google Earth be somehow slow and killing the essence of a real-time system?
Ayman
Depends on your "realtime" resolution (1, 20, 60 secs?), but generally speaking, I don't think that database _per se_ will be not a bottleneck. To minimize delay in web application, don't use polling but HTTP push (Comet). Being not familiar with Windows/Microsoft technologies, can't help you more specifically with that.
jholster
Whoops, the above should read: "I don't think that database _per se_ will be a bottleneck."
jholster
yeah I noticed that, but knew what you meant :)
Ayman