Not Everything is a Good Plan
Well... I spent a lot of time Wednesday and Thursday working on these improvements to the Server, but the more I got into it, the more I was convinced that it was a horrible idea - and it was my idea. The basic idea of the enhancement was to have the instruments in the server contain a business date, and then according to a configurable schedule, we'd roll the business date by region (Asia, etc.) and that way the instruments would pick up new SOD positions and 'look' like they were ready for the next business day.
But the problem was really that all the changes required for this to work would have made the server far less stable in the short-term, and that might be a public relations problem that would take months to recover from. Additionally, I needed to know the exact requirements from the traders in Hong Kong, as they are the ones pushing this. Do they need to see the positions for Europe and the Americas when they get in? Do they need to see the marks? These are things that are going to make a huge difference to the code.
In the end, I decided that it would be far, far better to make the server capable of reloading it's complete position set - as well as marks (which it already does), so that we can make a trial SOD position file and start a new server off that - ideally, London. Then, when the final SOD position file is ready, we copy that over to London, and reload all the positions into the London server. This means that the Asia positions and marks will be rock-solid, and the Europe/Americas positions will be close and the refinement will make them just perfect.
This solution has many upsides, but the one downside is the human cost of data maintenance. If we have two servers, then any editing done to one has to be done to the other as well. This just means that the effort I would have placed in the server now needs to go into the server and editor. Basically, all the editing operations that are now being done need to be made as simple and easy as possible. That way, the load for the data maintenance of one server goes down, and hopefully, the addition of the other is not a horrible problem.
There are several things to work out, but the number of systems that have to change in this plan is much fewer - only the Server/Editor. This makes it much more likely that the stability will remain high during the changes, which is a major benefit. We have to deal with the trade processing, but that shouldn't be hard - again, it's by region. Also, we need to have a trial SOD position file, and that should not be hard either as it's already capable of being generated by several systems at this time.
Not all my plans are jewels... this one is far better than my original. Far, far, better.