I have an web application that allows certain domain objects to be associated with a url. Right now, if we rollback the production database to our development database (which we do regularly), we have to go into the appropriate table and change the urls to point to their development environment equivalent. My manager wants a way to have the urls stored in some sort of flat file, so when we rollback the database, we don’t have to change any urls. The production environment would have its own version of the flat file with production urls, while the development environment would have its own version of the flat file with development urls. The application would just read off the flat file in the current environment. He also wants the ability for end-users to CRUD these urls in the flat file through the interface. Right now I am trying to go through the options and see what is best. It is between reading/writing an xml file or using MongoDB (would be using it here for the first time).
If anyone could give me any advice as to which one would be ideal (or any other suggestions), I would be greatly appreciative!
This is an asp.net 3.5 web application.
You could use a flat file (key value pairs – one per line).
IO contention can be made to be very low if you cache the file.
Assuming changes are infrequent, you could also write a wrapper around the cache, to invalidate it when it changes and write the changes to disk. This will start to perform poorly the more concurrent changes to the list occur.