Description
Consider supporting a function like erleans_providers:add_providers(Name, Module)
that does not do the init_provider
setup that calls start_child
on the providers supervisor.
This would mean some providers aren't children of the supervisor though but maybe could just link to them in erleans_providers
?
The idea could also be taken further and have all providers work this way. Instead of blocking during startup until all providers are started, let them start concurrently with the rest of the system, or even optionally start dynamically only when referenced by a grain.
Only concern with not setting up providers in the init/1
of erleans_providers
is grain usage could happen before they complete and result in an error for the user. But user code should be able to handle temporary lose of providers... so maybe not an issue to care about?