So I am working with a customer who has an older application that has quite a few interesting quirks. Among other things, it has its own code version system for business functions, by storing the entire algorithm version in a database. The data is then retrieved and compiled on request (this is a web application, and yes, it compiles a ton of code each time you try to buy something).
For obvious reasons, this isn't exactly fast. I am looking into migrating the code into normal code projects, but as you can imagine, this creates an interesting challenge in regards to versions of the algorithms.
It is a business requirement that old quotes / deals that are up for review must use the same algorithm that was used when it was first created. Said quote should then be able to recalculate, with changed input etc (so we can't just store the results).
How would you approach this problem? They are having such massive issues in production now that I have simply decided we will create a hot-fix by moving all the code to actual libraries and calling functions with name versioning (someAlgortihm6Jun2014 or whatever) which will solve the problem of immense bandwith use and wasted compilation time, but it is far from elegant.
While I will be looking to implement much larger architectural changes in the future, for now I am simply looking for a good way to maintain multiple versions of the same algorithm in static code, without resorting to this naming convention. Thoughts?