Create runtime Applications (Components)

Is it possible to create new Applications (Components) in runtime on-demand?

For example, I have a Core Application, can I pass some argument to it let’s say :a and :b and it will create Core.a and Core.b separated applications?

But what applications? In theory you can create application “on the fly”, but that would be really weird and needless. Tell us exactly what is your problem, not whatever solution you have thought of.

1 Like

I have a very big supervision tree that I need to repeat for each external source I support (you can think something like 1k~10k sources).

What I have now is one application called core with a DynamicSupervisor which I use to create that supervision tree for each external source that I want to instantiate.

That works great, but when I want to debug or take a look at the processes in a specific tree using :observer it is very hard since there are so much processes opened that makes the Applications tab extremely laggy.

I was thinking that since each external source supervisor tree is totally isolated (and repeats the whole process tree), I could maybe create an application for each one so I could see it easily in :observer.

But maybe that is a bad idea? If so, why? :thinking:

You might put each source under its own Supervisor, and have them all under one DynamicSupervisor.

That is what I do currently, it works great, but it makes Applications tab from :observer extremely slow (it actually stopped responding at all yesterday for example).

And since most of the bugs and tests I’m doing only shows up when handling a large number of these “cores”, it makes very difficult to use :observer to help my debug