Earlier quoted context omitted.
Having each app run in the background and manage its own notifications can work, but also causes battery life issues with more apps.
I mean, if you just have a select() command blocking, I don't see why having a 100 sockets open would be any different than 1 socket.
For example, Matrix clients on Android/iOS will stay suspended entirely, then will wake up when you receive a push notification. Desktop clients, on the other hand, will stay running and receive every message, even if they're not messages that you necessarily care about/that would notify.
The protocol could in theory have an in-band way to tell the server "hey, I really only care about notifications now, could you only send me those?" but currently it doesn't. By contrast, most Android/iOS apps can rely on push notifications and suspend completely when they're not in the foreground - meaning they're not receiving anything but what's important enough to notify about.