51 upvotes, 1 direct replies (showing 1)
View submission: An Update Regarding Reddit’s API
So if applications are staying well within the 60 requests per minute we should be good?
Apollo has a server component for instance to alert users if they get a new notification (message, reply, mention, etc.). We built this very carefully to be well under 60 requests per minute (I believe it's at around 9 requests per minute right now).
We've even tried to optimize it more than that in collaboration with Reddit, as your API requires the service to ask Reddit repeatedly if there's anything new in order to determine if there is (polling in developer terms), rather than an event-based API that would notify the server.
As an example, if we want to be able to alert a user within 10 seconds of them getting a reply, we have to ask the API every 10 seconds if there's anything new. This means if they only get a new reply ever 15 minutes on average, 99% of those API requests would just say "nope, nothing new" and be quite wasteful. Instead, you could have a sockets API that when the user gets a reply it would send a ping to us and we'd only have to talk that one time (the App Store does this for sales, for instance).
This is something we'd be happy to implement were it to exist.
Comment by itskdog at 18/04/2023 at 20:20 UTC
15 upvotes, 0 direct replies
Devvit has event-based programming. If Devvit gets support for a user to install an app to their user account rather than a subreddit, (hint hint, Reddit developers) then I can see it being possible to just ping a webhook on your server when something comes in with a new message event or something?