Understanding the codebase

Hi, trying to understand the code-base.

My question is why is there a supervisor in between the Keys module?

It seems to me that the structure was to have the main supervisor only supervise supervisors. Also, is there any reason to not use child_spec ?

Hey @kilok,

Thank you for your question.

It’s been forwarded to our dev team and they’ll get back to you.

Regards,
The AE Team

Hello @kilok ,

I assume you talk about the elixir-node? Could you link me to the files you are referring to, so I can check better.

Kind regards,
Philipp from the Dev Team

Hey Phillip,

Here is the supervisor which suppervises the Key Supervisor: elixir-node/aecore.ex at 179a87dc10febbf49d697d268e1c44e1691dcff6 · aeternity/elixir-node · GitHub

Here is the Key’s supervisor:

Then the Keys supervisor supervises this Key’s Genserver:

I’m wondering if there was any particular reason for this design instead of child_spec?

Thanks for reading

Hey @kilok,

Thanks for your question.

@philipp.chain will get back to you on that as soon as possible.

Regards,
The AE team

Hello @kilok

When we started working on the project, we used the convinient design of the Supervisor.Spec module across the whole project. Since it is now depricated we will soon update our codebase to the new changes/design patterns.

We actually checked on this again and this was fixed way back with the following commit → Elixir 1.5 child specs - removed deprecated Supervisor.Spec module · aeternity/elixir-node@8f3cec4 · GitHub

Kind regards,
Georgi from the Elixir Dev Team

3 Likes

Hello @kilok, with the latest Pull Request we should have removed all remaining deprecated supervisor spec patterns. [GH-505] replace deprecated supervisor.spec by thepiwo · Pull Request #605 · aeternity/elixir-node · GitHub

It would be great to hear a few more thoughts you have about our elixir codebase!

Hey @philipp.chain,

Thanks for the update. If I find anything else that is interesting, I will be reach out again.

Thanks for the reply and have a good day :slight_smile:

2 Likes