Closed camirmas closed 8 years ago
Having some clear-minded insomnia, going to take a slight stab at this.
Just did some basic wiring (added deps, imported into hook.ex
). We should investigate this more: https://hexdocs.pm/gen_stage/Experimental.Flow.html#module-supervisable-flows
Right now we simply iterate through the list of
Hook
s withEnum
. This can lead to bottlenecks in the case where we have a very large list of hooks to execute.Possibly consider GenStage, which will allow us to execute hooks in parallel. Once finished, hooks can be added to
Grapple.Logger
. Since hooks do not depend on one another and ordering doesn't matter, this distributed approach should provide strong benefits.https://hexdocs.pm/gen_stage/Experimental.Flow.html https://hexdocs.pm/gen_stage/Experimental.Flow.html#module-supervisable-flows