36 upvotes, 2 direct replies (showing 2)
View submission: Lets talk about those API calls
With my web app I could reduce the majority of API calls if they just provided a basic websocket for new messages. The constant polling is really a pain if you don't want to send notifications ages after they have arrived.
Comment by Meepster23 at 05/06/2023 at 21:13 UTC
8 upvotes, 2 direct replies
Yeah I imagine that is one of the main discrepancies in api calls by app is how you handle checking for new messages
Comment by la2eee at 06/06/2023 at 16:47 UTC
4 upvotes, 1 direct replies
Providing a websocket is way more taxing on the hardware, AFAIK. You need to have an open connection that stays open versus API calls, where you have only very short open connections, but more of them.
Correct me if I'm wrong.