Ideas for creating an auto-updating mapping application

user750855

New member
Joined
Oct 31, 2016
Messages
1
Programming Experience
1-3
Working on building a mapping application for fire departments and other first responders... the GUI part is a WPF application and uses ESRI's ArcGIS Runtime geodatabases to store the actual mapping data that the application uses. The goal of this post is to get ideas of how to build an "auto update" feature into the program that updates the mapping data files (not necessarily the actual executable program files...)


The program will be designed to be universal, meaning that a fire department in Ohio would use the same executable file as a department in Florida. The difference between each fire department would be the mapping data files that are loaded when the program starts up.


The mapping data files are stored in a subdirectory of the main program directory (eg. C:\Program Files\MyMappingProgram\MappingFiles) The mapping data is broken down by county, and there are 5 files per county. This is an example of what the files look like
..\MappingFiles\US-OH=HolmesCounty-AddressPoints.geodatabase
..\MappingFiles\US-OH=HolmesCounty-Centerlines.geodatabase
..\MappingFiles\US-OH=HolmesCounty-Buildings.geodatabase
..\MappingFiles\US-OH=HolmesCounty-Parcels.geodatabase
..\MappingFiles\US-OH=HolmesCounty-Other.geodatabase


Each fire department will want to have a different "set" of mapping files. For instance, one department might want just data from one county, while another department might want data from 3 different counties. Furthermore, they might want all 5 data files from several counties, and maybe only AddressPoints and Centerlines for a third county... so this is an example of what their MappingFiles\ directory would look (again, lines should be separate...):
..\MappingFiles\US-OH=HolmesCounty-AddressPoints.geodatabase
..\MappingFiles\US-OH=HolmesCounty-Centerlines.geodatabase
..\MappingFiles\US-OH=HolmesCounty-Buildings.geodatabase
..\MappingFiles\US-OH=HolmesCounty-Parcels.geodatabase
..\MappingFiles\US-OH=HolmesCounty-Other.geodatabase
..\MappingFiles\US-OH=WayneCounty-AddressPoints.geodatabase
..\MappingFiles\US-OH=WayneCounty-Centerlines.geodatabase
..\MappingFiles\US-OH=WayneCounty-Buildings.geodatabase
..\MappingFiles\US-OH=WayneCounty-Parcels.geodatabase
..\MappingFiles\US-OH=WayneCounty-Other.geodatabase
..\MappingFiles\US-OH=AshlandCounty-AddressPoints.geodatabase
..\MappingFiles\US-OH=AshlandCounty-Centerlines.geodatabase


My guess is that I will build some kind of webservice that will the WPF program will call to retrieve the settings for each department. So the program will start up, call the webservice and retrieve a list of desired mapping files, and load those files into the GUI. So, 2 things I need to happen... 1 is if any files are missing, download them (from an Azure Blob Storage account)... and 2, if there are any newer versions of the mapping files, download them as well too.


The caveat is that if mapping files are missing or new ones are available, the program should continue the existing "old" files until the new ones are downloaded. In other words, I don't want the program to be "disabled" while waiting for new files to download. However, the .geodatabase files are locked and CANNOT be replaced while the main executable is running, so a (manual) restart of the program would be necessary to use the "new" files.


The mapping files will be updated probably about once a month and stored in an Azure Blob Storage account. Ideally I would like to store them in zip files to reduce the file size. However, if need be, I could store them in the "original" format, which would make it a little bit easier to compare MD5 hashes (to see if new versions of the files are available). When a new version of mapping data is compiled and uploaded to Azure, it will have the same file name as before.... So for address points for Holmes County, Ohio, the filename/URL will always be http://myprogram.blob.core.windows.net/mycontainer/US-OH-HolmesCounty-AddressPoints.zip (or .geodatabase if not zipped...) To determine whether a new version of data is available, you would need to compare the MD5 hash of the Azure version with the MD5 hash of the local file.


What I'm looking for is ideas/strategies to make my mapping application "self updating"... ideally it would be something like a "file-sync" service (that only syncs a specific list of filenames) that can run in the background and notify the main program that a restart is necessary to replace updated files... Any suggestions would much appreciated... Thanks!
 
Back
Top Bottom