Elixir内置有四种supervision trees的容错机制,分别是 :one_for_one, :one_for_all, :rest_for_one, :simple_one_for_one。
Strategy / :one_for_one
Strategy / :one_for_all
Strategy / :rest_for_one
Strategy / :simple_one_for_one
与:one_for_one.相同。但是需要实现Supervision.Spec。
Same as :one_for_one. But it needs to implement Supervision.Spec and you need to specify only one entry in child specification. That means every child spawned from this supervisor is the same kind of a process.
Refs
http://elixir-lang.org/docs/stable/elixir/Supervisor.html#module-strategies
https://medium.com/@mustafaturan/visualisation-of-elixir-supervision-tree-strategies-4d4cb8123138#.oo26snkdk