You Cannot Correctly Represent Change Without Immutability
tapestryjava.blogspot.se
tapestryjava.blogspot.se
Mind you, creating audit / history tables to allow querying of past state is an extremely common and very standard database pattern too. Though I will admit I have encountered systems where more than half the tables were being audit logged so it's interesting to think about a database where that was effectively the default.
Indeed, that is how git works in general – recording changes as immutable commits, and having one or more heads which point to the new immutable commit.
The deeper question that Rich Hickey does not seem to have addressed is whether a 1 to 1 mapping between 'reality' and 'systemic models' is in fact generally beneficial.
Right now, the focus is on "productivity" e.g. producer (read: programmer) concerns and creating a practical model of concurrency that is accessible to the general programming workforce, but there are other concerns that reach into very unlikely areas of (overall social) concerns e.g. energy use, that are affected by this decision to focus on reducing programmer pain (instead of minimizing use of resources, for example).
An alternative future for the field is a future where a very select subset of "programmers" are tasked with building systems according to a semantic model that is not an analog of the "real world", or perhaps a deeper mapping of "real world" that is closer to quantum reality (e.g. probable states of things) than a classical world view, and such professionals will get compensated for their (strange) comprehension of reality given that it may save businesses using their systems money. Such systems will certainly manifest in their outer layers models that map to "real world" e.g. a banking interface and attendant "real world issues" such as "when did this thing change?" and that is why MVCC was invented and we may well discuss "immutability", "state" and "identity", but may entirely do away with such (possibly) quixotic efforts in the innards of the system.
Are there any insights to be gained over comparing this idealised view of time and physical time?
e.g. I don't really see that relativity comes into play but could it/should it?
There could be some kind of analogue for how changes spread around a distributed system, which is limited by the effective propogation speed of the system.
Do we run into some kind of underlying law of distributed systems about the inability to have a reliable, cross-system change-based "tick"? (e.g. could that be a consequence of the CAP theorem? http://en.wikipedia.org/wiki/CAP_theorem)
A->A(30)->A(29)...A(0)
B->B(20)->B(19)...B(0)
start adding a new A; start adding a new B; Finish adding a new A; Finish adding a new B; Verify B; Verify A; A->A(31)->A(30)->A(29)...A(0)
B->B(21)->B(20)->B(19)...B(0)
Now keep A and B's states stored on different machines and they become completely independent with no concept of time or ticks being introduced.As to an actual example of this in use think bank accounts in an MMO, you might want a transaction log, but you don't necessarily care about time-stamps all that much.
http://research.microsoft.com/en-us/um/people/lamport/pubs/p...