You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having terminology fixed in #209 and the "state" word released for the reactor's state persistence, we now improve the state management itself.
The purpose is to separate the state persistence in the object's status stenza from the handler's outcomes. Specifically, to make it possible to keep the state of the handlers that are not resource-related — e.g. activity handlers, which are handled completely in-memory.
For this, a new entity is introduced: an outcome, which is conceptually close to asyncio/threading futures (result+exception bundled), but have handler-specific aspects: delays, temporary or permanent errors, etc.
The state persistence is then refactored to include the math of merging the existent state with the new outcomes, and persisting the new resulting state back to the objects.
The resource-specific state persistence is then moved upward in the call stack: from the generic handlers, to the resource-specific handling. The generic handlers now return the in-memory outcomes only, and persist nothing.
See the list of commit with step-by-step explanation of changes.
Types of Changes
Refactor/improvements
Commented by ancelotpinto at 2019-11-08 09:23:47+00:00
lgtm
The text was updated successfully, but these errors were encountered:
Code refactoring (part 4 of 3): split reactor state to handlers' outcomes and actual state persistence.
Description
Having terminology fixed in #209 and the "state" word released for the reactor's state persistence, we now improve the state management itself.
The purpose is to separate the state persistence in the object's status stenza from the handler's outcomes. Specifically, to make it possible to keep the state of the handlers that are not resource-related — e.g. activity handlers, which are handled completely in-memory.
For this, a new entity is introduced: an outcome, which is conceptually close to asyncio/threading futures (result+exception bundled), but have handler-specific aspects: delays, temporary or permanent errors, etc.
The state persistence is then refactored to include the math of merging the existent state with the new outcomes, and persisting the new resulting state back to the objects.
The resource-specific state persistence is then moved upward in the call stack: from the generic handlers, to the resource-specific handling. The generic handlers now return the in-memory outcomes only, and persist nothing.
See the list of commit with step-by-step explanation of changes.
Types of Changes
lgtm
The text was updated successfully, but these errors were encountered: