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 ?
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,handleandpostprocessin 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 ?