Closed bbondy closed 8 years ago
One way of thinking about this might be having the authoritative data be an immutable (possibly content-addressable), append-only log of changes, from which the state is purely derived (redux works like this minus content-adressability). The diffs then would be the serialized actions themselves.
This log would be a superset of the private local url history. It could be used as the storage for already-planned url history for local targeting purposes and, if properly secured, could give the user great insight and control not only over their url but also their action history (either by directly inspecting the log or via plugins that make use of it while keeping data local and private). Essentially a user-controlled and editable "keylogger" that could enable predictive typing, better urlBar suggestions, easy replay/screencasting of past actions for support purposes, etc. One crude implementation for illustration purposes would be to store state as an actual git repository with each action stored as serialized JSON in a commit message.
The LinkedIn Engineering blog has a great post that expresses more eloquently the overall idea behind this line of thinking: https://engineering.linkedin.com/distributed-systems/log-what-every-software-engineer-should-know-about-real-time-datas-unifying .
Thanks @obvio171 I don't want this thinking to get lost when this gets closed, but this task itself is pretty small and fixable in a short amount of time. Would you mind reposting that in a new issue?
Sure, will do. This discussion definitely makes more sense on its own. Thanks for the consideration!
This is included w/ 0.8.0
Currently IPC sends the entire app state on any app state change. It's important that we keep the top level immutable state, but there's no reason it needs to be that way during the IPC. We can split up the top level app state instead.