Mukulch15
What are the benefits of using dynamic supervisor when supervisor also has start_child to start workers dynamically?
I was going through the docs of both supervisor and dynamic supervisor and saw that supervisor also has the function start_child that will allow us to start a worker dynamically using child_spec. Can anyone please elaborate what additional benefits DynamicSupervisor offers us since we can start workers dynamically using Supervisor module as well ?
Most Liked
rvirding
We can already start a child in the normal Supervisor by passing in a child spec so what benefits does DynamicSupervisor give us?
Sebb
here is some background:
https://blog.carbonfive.com/comparing-dynamic-supervision-strategies-in-elixir-1-5-and-1-6/
thiagomajesk
I’d like to cross-reference this topic that helped me understand a little bit more about it, just in case someone else finds this first in the future (like I did): Difference between Supervisors and DynamicSupervisors what am I missing?.
PS.: In summary, DynamicSupervisors is a special module with performance optimizations for this specific use-case (new docs are on the way to make this a bit more clear).
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









