I should be able to see Text diffs showing the changes between two times for a given Thing / Property
Summary: The context here is a "Recent Changes" page -- we want to be able to not just list all of the Things that have changed in the past, eg, 30 days, but to specifically show which Properties have changed and highlight the diffs.
The diffs are probably the easy part here -- odds are good that I can find a good open-source library for it without much effort.
The real challenge here is the History itself. This requires letting the QL stack interact with History -- a feature that was inevitable, but this is the camel's nose in the tent. History is potentially extremely expensive to set up and hold onto: in a large Space, it can take tens of seconds to load (potentially much longer than our usual timeouts), and could take gobs of memory.
Really, we want to be able to load snapshots and then the post-snapshot events, to speed this up, but it's going to take serious research to figure out how to do that, if it's even possible. Time to do some serious research into the Cassandra Persistence plugin and its capabilities. Can we access old Snapshots?
If we can't access old Snapshots, then it becomes crucial to time-box the amount of History saved in memory, to limit the RAM impact.
This also requires adding an internal API for History, that provides access to the History of a given Thing within a given time window. It should probably return a sequence of Thing records, each one timestamped, to be able to do the diffing.
And of course, we need to figure out what the external API -- the actual QL functions in userspace -- look like. But that's probably also pretty easy once we have the infrastructure in place.
These diffs should probably be represented as spans with CSS classes, so userspace can style them as desired. It is possible that we should just start implementing textual changes as diffs under the hood to support this -- it's a highly desireable feature anyway, and is on the roadmap, but I'm not sure how difficult it is. Note that a given diff is a set of changes, including an arbitrary number of additions, deletions and modifications of character ranges.
This one is Critical for research and scoping purposes. If it's plausible, it would be very useful for Eric, but it will depend on scope.