powelli13 / dara-dots

Using Phaser 3 to implement a game idea I have.
MIT License
5 stars 2 forks source link

Elixir Code Review Request #12

Closed powelli13 closed 2 years ago

powelli13 commented 3 years ago

This issue will act to save areas that I'd like feedback on from Code Reviews.

Any feedback on these questions or any other aspects of the Elixir codebase is very much appreciated, thank you!

nickdichev commented 3 years ago

These are all awesome questions! Here's my take on things:

  1. I think its fine to leave all the children under one supervision tree to start, and then split it up if you realize you want a different supervision strategy for some children.
  2. I don't think you're actually calling between apps here? Phoenix.PubSub is a child of the GameServer application supervision tree not GameServerWeb. So when your GenServers publish to it, nothing is crossing the application boundary. You should check out Sasa Juric's blog post series about this topic and his library Boundary
  3. I think its fine, and I do the same
  4. Look at the :via tuple. Its a nice trick to directly interface with the GenServer API (or other OTP friends that take the :name option) when you're using Registry.
powelli13 commented 3 years ago

@nickdichev thanks for the feedback and suggestions! I really appreciate it.