Monday, September 19, 2011

FINITE STATE MACHINES AND DATAOBJECTS.

The situation is simple. You have an object, that will cross several systems, you want that among all of this cross the object cross and preserve the history of changes if it suffered some. Your data is replicated across several databases, your bosses are University "like teachers" (this does not exclude the possibility of jerk injection) and you don't want to get fired so easy. The answer is simple, you build several interfaces to retrieve the data from such legacy systems, and put your data to roll in a JMS or anything that you can pick-load-transform-persist. Is that clear soldier? It is also required that such data be like a Hashmap, then you need to explain what is a Dictionary for the programmers, a Dictionary is a very complex data structure, It is like a "Type" but with and advantage, when you use it like a hashmap internally a black magic is done to optimize the access for "individual members". But internally the object behaves like the same, but what is computationally important for this object in the wire, it that "it is capable to preserve" who fucked it in the previous step, no condoms, besides that it is a common datastructure present on all things that runs in a computer that you can imagine, even "Microsoft has such patterns if you want to", infect it is a small extension of "java collections" to provide some simple operations like a JSON and a XML, the son of data, it is not a JSON because have such small functionality to keep "a historical record of change", that is it. It is also "nothing to change the computers", neither a revolutionary thing, it is just a HashMap a little bit more strong than a JSON to be used on server side, when you have machines talking.