Personally I actually find that big channels/gen_servers aren’t much of an issue as most of the logic is descriptive enough for a quick search to jump straight to where you want to go and with something like the structure view in IntelliJ IDEA it becomes even easier.
If you need to offload some of the logic to somewhere else you could just make modules for the different message types you have in your channels, though, and essentially build module based routing into the channel. I don’t think there’s any shame in having you check the type of an incoming message and routing it to a module that really only contains some handle_that_type_of_message functions, all relating to that area (or context, if you will).
I used to do this slavishly for things like gen_servers even because I thought that it was horrible how big they could get, but I realized that everything is so self-contained and neat in a gen_server that I wasn’t accomplishing that much anyway. It’s either that or Stockholm Syndrome.


















