Comment by SirensToGo on 06/06/2023 at 00:26 UTC

17 upvotes, 2 direct replies (showing 2)

View submission: Lets talk about those API calls

The annoying thing is that Reddit could help third party developers massively reduce their API load simply by providing more sensible modern APIs.

As you point out, polling for mail is very wasteful and it's made even worse when a third party app wants to support push notifications. A typical implementation of such a feature (on iOS) is to have a backend server constantly polling every user for messages every 15-60 seconds in order to check for new messages that need to be delivered. This is enormously wasteful, obviously, because the vast majority of requests do not return new messages. Of course, polling less often would decrease the load but doing so worsens the user experience (what good are push notifications if they take an hour to arrive!). If Reddit wanted to be helpful and reduce their server load at the same time, they could support server to server push so that their backend could just notify third party servers when a user gets mail so that we don't have to poll for messages. This is a win for everyone because it means reddit gets hammered less, third parties don't have to waste so much compute hammering Reddit, and users get faster notifications.

I strongly suspect that that multiple of the ""worst offenders"" are on the list because of this. Of course, instead of trying to help developers reduce their usage, Reddit seems to be just throwing a massive bill at us and telling us to figure it out (which, of course, we can't without either shelling out hundreds of thousands of dollars or massively degrading our app experience).

Replies

Comment by Meepster23 at 06/06/2023 at 00:36 UTC

7 upvotes, 0 direct replies

Yup! A simple webhook type implementation that registers a call back for new messages would reduce calls drastically. Tie it to the refresh token so it can be revoked along with the API access for an app and you are cooking with gas

Comment by nomdeplume at 06/06/2023 at 18:46 UTC

2 upvotes, 2 direct replies

Reducing the cost doesn't mean you still eat lunch for free. The issue is full stop, people are eating lunch for free.

Could it be more efficient? Yes sure. So lunch might get cheaper, but its not free. So you don't get to eat for free.

Making a better API also costs reddit money in developer time, so they make it more efficient to what... make those apps that they don't own or profit from cheaper to run?