Skip to content

Ephemeral State and erleans_grain behaviour callbacks #10

@tsloughter

Description

@tsloughter

Currently the only way to have state in a stateful grain that isn't persisted when returning save from a callback is to keep both states in a map:

#{persistent => PState,
  ephemeral  => EState}

This may be a bit clunky. A tuple like {PState, EState} is an option, but prone to mistakes. Expanding the return options to support like, {save_reply, ok, EState, PState}, is also error prone, while the addition of the 4-tuple option also complicates the callback handler in erleans_grain, so {save_reply, ok, {e, EState}, {p, PState} would help against being error prone but still complicates the handlers.

Anyway, just some thoughts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions