I know this isn't exactly kotlin related, but I think you guys might have some good advice. I need to manage a pub-sub connection between an android device and a server. Ideally, that means the app would need to listen to the server. How would you manage that? Periodically raise a connection (the server keeps messages on a buffer and fire them as soon as there is a connection established)? The app needs to at least look real time (instantly fire messages sent from app, receive messages without much delaying).