Skip to content
This repository was archived by the owner on Jan 22, 2022. It is now read-only.
This repository was archived by the owner on Jan 22, 2022. It is now read-only.

Propose and describe action and state structure (e.g. sharing context) #21

Open
@effa

Description

@effa

How to organize state (current dot notation feels strange). Should meta (id, parent_id, version) and context (time, randomness_seed) be part of each action? Why: because it changes often (at least time) and maybe it could allow for easier merging (rebasing?) Meta vs. context? (should we even distinguish these two and where does version belong? Are entities the only data? How to deal with context being part of both a state and an action. Should reducers, extractors and task_creators take full state/action or just parts (for example data and context). And would it be useful to write decorators to extract state/context/data to specific arguments and how it should work? (@extract_state, @extract_data). When/where should we bind meta information and context and data to action/state before passing to the reducer/extractor/store?

We should precisely define what we mean by data (entities), context and meta information. We might want to consider some convention such as always mapping entities on the entities in DB (or static data?) and context to a computed values.

Related question 1: how to represent context (dict + utilities in context.py + @extract_context decorator, vs. class Context with useful properties or a namedtuple).

Related question 2: action creators - module (functions) vs. class (static methods) + suitable names, parameters: should they take state, or just context and meta, should we extract parameters from state/context/meta.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions