Skip to content

Keeping state in the lifecycle of a request #70

Description

@galdor

I'm having issues keeping state in the lifecycle of a request. More precisely, I'd like to be able to pass data between handlers, and between init, preprocess, handle and postprocess in each handler.

It seems to be a common pattern in Erlang to explicitely propagate state, for example in gen_server, but it is not the case in elli.

#35 suggests that the only way is the process dictionary, but the Erlang website has good arguments not to overuse it (https://www.erlang.org/course/advanced#dict).

Is there anyone currently working on a patch to add an explicit state ? Would this kind of patch be accepted ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions