archethic-foundation / archethic-node

Official Archethic Blockchain node, written in Elixir
GNU Affero General Public License v3.0
75 stars 22 forks source link

Partionnate TaskSupervisor #1561

Closed Neylix closed 2 weeks ago

Neylix commented 2 months ago

Is your feature request related to a problem?

In many situation in the code we create a new Task to do asynchronous stuff, but we don't want it to be linked to the caller process but still supervised. To do so we use the module Task.Supervisor which require the application to start a TaskSupervisor process. Currently we only have 1 TaskSupervisor process, and according to the documentation, it could lead to bottleneck.

Describe the solution you'd like

Create multiple instance of a TaskSupervisor using the PartitionSupervisor as mentionned in the documentation: https://hexdocs.pm/elixir/Task.Supervisor.html#module-scalability-and-partitioning

Additional context

No response

Epic

No response