Assume we have a desktop application (probably WinForms) that acts as a client to some API for an app with a messaging function. This API has endpoints that return a JSON of messages, and who sent them and where they sent them. A messaging feature is to be implemented in the application, so that messages can be sent and received in real-time, or close to it.

Is polling the API every second or so a good way to achieve this? According to this link: <https://medium.com/tinder-engineering/how-tinder-delivers-your-matches-and-messages-at-scale-504049f22ce0>, even Tinder used to do this. This is rather surprising to me, as this seems like a primitive way to go about it, for an app like this. If so, what would be the best approach, running this polling on a separate thread, if we want to do other tasks in the meantime? If not, what would be a better solution? It is preferable to be able to later re-create this application Java Swing, C++ wxWidgets, or some other widget toolkit.