We are looking for a software program that would allow us to enter 15000 locations, then by typing in one location (street+city+state or zip), pull up a list of all locations within, say, a 5, 10 or 20 mile radius. The user should be able to enter the location and the radius on web page and would see a map of the location with nearby locations marked on it and a list of the same nearby locations.
I used Mappoint to achieve this using the following process:
- I created a map and imported 15,000 locations into 2 datasets (pushpin sets.2 setsare required as it cannot import more than 10000 in one set).
- I wrote a DLL that connects to the Mappoint software, calls the FIndAddressResults() method to find the user entered location.
- It then calls QueryCircle() method on eash dataset to find all locations falling in the user provided radius. It takes the resultsets, calculates each location's distance to the user entered location and sorts the list.
- It then calls Union() method and GOTO() methods to zoom to the area with the locations searched and saves the map as an HTML page.
- It then displays the list to the locations found nearby to the user with the map image extracted from the saved HTML page.
- This DLL gets called from the ASP page which provides the user interface to enter the location to search and the radius.
By doing so, I was able to get results. But when I did a stress testing by making multiple request simultaneously (made 10 requests for testing purpose) to the web page, it seemed to slow down to an unacceptable extend. I saw 3-4 MapPoint.exe processess running and taking 100% of the CPU. This made the whole web site so slow that it took a few minutes to serve a web page on a T1 connection. Also the resulting locations and maps came up for all the requests but it took an average time of 2-3 minutes for it to provide the location results. This made the solution unacceptable.
My question is, Did I do this right?
Is there a better way of implemention the solution which would make it work faster and not take over 100% of cpu?
Is this product recommended for use in such web related scenario?