The architecture of SpaceEvent management should make sense
Summary: This is an enormous Epic, for the long-term redesign to make both Experiments and Offline Mode possible, and to make Publication Mode saner.
Copied out of my notes, so I don't lose them. Note that much of this relates closely to Publication Mode, which is why that is also referenced.
- Mobile/offline requires moving UserSpaceSession to the client.
- UserSpaceSession is responsible for managing its own collating of the raw SpaceEvents to the SpaceState; doing so in SpaceCore is just an optimization.
- SpaceCore becomes just one of many SpaceEvent persistence sources.
- Experiments and Publication become just another persistence source.
- All of these also need Snapshots, but those Snapshots become a bit more like the current one in Publication.
- UserValues become just another SpaceEvent source.
- UserValue collation gets atomized, with one persistence source per Thing-Property, to keep sizes manageable.
- In principle, when the Client loads a Space, we load the whole thing to the client, and persist it there. Then, we can just stream events to the client to update, and rendering happens client-side. (Obviously, this would be a gigantic change.)