Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rethink computables recalcuation resolution #30

Open
medikoo opened this issue Apr 3, 2015 · 1 comment
Open

Rethink computables recalcuation resolution #30

medikoo opened this issue Apr 3, 2015 · 1 comment
Assignees

Comments

@medikoo
Copy link
Owner

medikoo commented Apr 3, 2015

/cc @kamsi

Currently on incoming data batch, following happens:

  1. Static (non-computable) records are put in place. If some record changes state from non computable to computable (may happen if some object got back from destroyed state to I'm here again state), it's also immediately recomputed.
  2. All computables that depend on statics are recomputed
  3. All computables that depend on computables are recomputed (and so on)
  4. Events for boths statics and computables are propagated

There's an issue with resolution of new computables in first step, there's a risk they may approach uneven state. Technically that should be put between step 1 and 2.

At this point I've introduced a fix that forces another re-computation of them in step 2.

@medikoo
Copy link
Owner Author

medikoo commented Apr 14, 2015

Additionally we should make more bulletproof computables resolution, where multiple objects are involved.
e.g. in ELS we have a case, where applicableSubmissions resolve both submissions of user and representatives. There's a getter, which accesses each applicable submission. When representative is removed. This getter is run before applicableSubmissions are updated, and therefore is provided with dead submission (base type) objects.

screen shot 2015-04-14 at 18 01 12

@medikoo medikoo self-assigned this Nov 23, 2015
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

No branches or pull requests

1 participant