[erlang-questions] Beginner Question: Spring-like IOC in erlang

Steve Davis steven.charles.davis@REDACTED
Thu Apr 14 02:38:04 CEST 2011

To put it as cleanly as I can state it, and IMHO, "dependency
injection" is a solution to a problem that Erlang/OTP does not have.

Best regards,


On Apr 13, 2:44 pm, Todd Greenwood-Geer <t.greenwoodg...@REDACTED>
> 1. Is there an idiomatic way to use dependency injection in erlang?
> Most of my use of Spring DI has been to facilitate injection of test
> classes into a stack for functional testing. Is this sort of thing done
> in erlang?
> 2. How about AOP style join-points for before and after execution around
> a method?
> As an example, wouldn't it be cool to dynamically enable debug or trace
> level logging for an application when a certain error threshold is
> reached? Then, when the system returns to a normal state, the error
> logging could be turned back down... I think I might start doing this in
> the Java stacks I'm currently working with (log4j).
> 3. Is there a way to intercept messages to a process? This is the real
> question... Say a process dies unexpectedly and OTP restarts it... it
> would be cool to be able to dynamically proxy messages to a process that
> has exceeded some error threshold. The proxy could log them, or perform
> more intensive error analysis... Then, once the system is back in a
> normal state, the proxy could be removed from the message loop chain.
> -Todd
> _______________________________________________
> erlang-questions mailing list
> erlang-questi...@REDACTED://erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list