scala - Does immutability argue of manufacturing data than storing it? -
I have seen a recent example of an account domain model, where the calculation of balance is done by every transaction log times It is very good as the condition of this object. But this is the root of irreversibility. (Such an answer is unable to tag here that goes ahead with the design)
what you describe That is a powerful technique for writing systems; It guarantees too much that the system will never lose data, and that means programming errors will never "corrupt" your data - once a bug has been fixed, the system also gives the right result, while the bug Live was related to a useful technique (sometimes called "Lambda architecture"), this calculation is meant to behave as a "canonical" form of a piece of information, but it is efficient Cash on the top line is also provided - the database design is denormalized to a database to improve the performance of any particular questions.
but not the only way to write systems with irreversible data; For example, you can get updates as they have received, with the history pointing to previous versions, you can store unchanging examples of full account (note that the user has two people at the same time There may be a need to reconcile different "branches" when the changes are made - compare with the use of GIS like VIS - May be appropriate, where it looks like the account on a particular point, and it is important to maintain the other changes in the version (for example, I worked on a system to deal with insurance contracts).
"Is this the origin of irreversible?" A meaningless question, instead of searching for "main", I suggest searching for practical techniques that make your code clear and more relevant.
Comments
Post a Comment