Understanding the codebase


#1

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 ?


#2

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


#3

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


#4

Hey Phillip,

Here is the supervisor which suppervises the Key Supervisor: https://github.com/aeternity/elixir-node/blob/179a87dc10febbf49d697d268e1c44e1691dcff6/apps/aecore/lib/aecore.ex

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


#5

Hey @kilok,

Thanks for your question.

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

Regards,
The AE team


#6

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 -> https://github.com/aeternity/elixir-node/commit/8f3cec4ffdd332fe473e34d51abdc57c7faaff6c

Kind regards,
Georgi from the Elixir Dev Team


#7

Hello @kilok, with the latest Pull Request we should have removed all remaining deprecated supervisor spec patterns. https://github.com/aeternity/elixir-node/pull/605

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


#8

Hey @piwo,

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: