As far as I can tell push notifications work on apps because clients register their devices and have a unique ID and then the notifications are forwarded to that unique ID through a persistent connection (a connection that is constantly open). In other words, say in facebook, a user wants to send a message to another one, then the message is sent to a central server on facebook, it is forwarded from there to either Apple or Google (or both, I do not know), and then the server by Apple or Google forwards the message to the recipient whose ID matches the one that was meant from the sender. Fine. The process is:
sender > facebook server > Apple / Google > receiver
What if the application itself had organized a VPN for its clients, say facebook had its own VPN. Then, wouldn't it be true that such a message could go to the receiver immediately from the sender through a route on the VPN of the form:
sender > receiver
Moreover, with such an approach the clients do not have to have a connection open. For example they could have a server listening to a port on the VPN, and then routing of the messages in the VPN would have to be dealt through a facebook server and the underlying telecommunications infrastructure, thereby omitting the communication to an Apple or Google server. So, such an approach appears to have two advantages over push notifications:
- no persistent connections for the clients, and
- no need to communicate with an Apple or Google server.
What are the drawbacks of such an approach and it is not used, but instead we have push notifications that both have persistent connections as well as require the need to communicate with an Apple or Google server so that the notifications can reach their destination?