Comment by la2eee on 06/06/2023 at 20:54 UTC*

5 upvotes, 1 direct replies (showing 1)

View submission: Lets talk about those API calls

I like how Discord handles their new bot API: You register your app, *you* provide an https endpoint and Discord will contact *your* endpoint when an interaction occurs.

This way you don't need a permanently open connection and you can implement your app however you like, you just need to provide that endpoint.

And Discord has the control of the outgoing bandwidth. That's way better for scaling than dealing with uncontrolled incoming bandwidth.

Reddit should try that.

Imagine: Not pulling every 10s for 10 minutes to get one new message. Just one contact on your endpoint when the new message arrives. The endpoint needs to transmit the news to the user's app, sure, but this can be done inside the app owners infrastructure and doesn't cost API fees.

Replies

Comment by Meepster23 at 06/06/2023 at 21:18 UTC

1 upvotes, 0 direct replies

Yeah but that'd mean they'd actually have to make new code /s