Skip to content

Conversation

nhunzaker
Copy link
Contributor

@nhunzaker nhunzaker commented Oct 6, 2016

This commit adds the ability to create a new Microcosm for an existing history. These Microcosms will inherit state from their parents.

This is done through the new fork() Microcosm prototype method.

Just want to get eyes on this. I imagine we won't ship this for 10.0.0 (but maybe we could?)

What's new

  • Each presenter forks the provided repo
  • Forks operate on the same tree as their parent, and any keys they do not manage are "inherited"
  • History now controls reconcilation

How it works

A history is shared between several Microcosms. When it changes, they all roll forward progressively.

o - o - o - o - o - o   <- history
                    |
                    |
            [parent microcosm]
             /               \
         [fork]              [fork]

History archives itself, emitting an archive event. This gives microcosms a chance to cache an action before it is disposed.

Parent microcosms subscribe before forks, so they resolve first. Forks back fill state. For example, a parent microcosm that manages users will pass that data down to a fork that only manages a page of users.

@nhunzaker nhunzaker force-pushed the umbrellas branch 2 times, most recently from a07a4d0 to a2dad9e Compare October 7, 2016 11:27
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling a2dad9e on umbrellas into * on master*.

@nhunzaker nhunzaker mentioned this pull request Oct 7, 2016
4 tasks
This commit adds the ability to create a new Microcosm for an existing
history. These Microcosms will inherit state from their parents.

This is done through the new `fork()` Microcosm prototype method.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling c66fc06 on umbrellas into 49bc060 on master.

@nhunzaker nhunzaker merged commit 3b24eec into master Oct 10, 2016
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 3b24eec on umbrellas into 49bc060 on master.

@nhunzaker nhunzaker deleted the umbrellas branch October 12, 2016 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants