views:

53

answers:

0

Here's the deal/challenge,

We have to keep track of information and it's linear changes. We also have to keep track of changes that are out-of-sequence. For example A happened then B happened. Sometime later, we learn of C which actually happened before B. Along with this challenge, we have many objects that have to be versioned that tie to each other. If it were a single table/object that needed to be versioned...no big deal. But, with multiple objects, now we get into more complex linking. And, to throw in the concept of out-of-sequence events just complicates things.

When checking in code, you can't do out-of-sequence. Stuff happens and then you fix/improve it. However, in some systems you don't get all of the information at the time of the event or in a linear order. Yet, you still have to calculate the real-world event time line even though it was different from the time line you received the information.

Short example of hierarchy: (each object has to be versioned)

  1. Policy
  2.  Transaction (Date of the real-world change)
  3.    Coverage(s)
  4.    Location(s)
  5.       Coverage(s)
  6.       Vehicle(s)
  7. Yada yada yada

From a viewpoint, if I need to get access to the current policy, I should see everything as it is now. However, if I need to see what was changed as part of a transaction 3 weeks ago, I have to be able to see what it was before...what exactly was changed...then what it was after the change.

I had written up a pattern to try and address all of this while also trying to store only the information that changed (not duplicating the entire stack every time the version changed - which I've seen as a common practice when trying to address this issue). I did look around the web and am novicely familiar with all the GoF patterns and a few more. Still, either I'm missing the boat and going too complex or i'm just one of the infrequent people that have to deal with this kind of situation.

I'll post the pattern I worked up as soon as I can. First, your ideas & wisdom. If you have any questions, please don't hesitate to ask. Thank you for your time!