Design Question: channels message dispatch with group and authentication check


what is the best design to build a message dispatcher for phoenix channels that checks on groups membership for sender / receiver of messages and authentication for both (if they are allowed to receive / send messages)?

I found some simple chat app examples, but I need to handle messages based on group membership and authentication status, so some kind of matrix comes into mind, however before building a monster I would like to learn how this kind of thing is best done with Phoenix / Elixir.


If the group count is not unboundedly large then you could just model those as Phoenix PubSub topics maybe? Need more details overall to say better. :slight_smile: