Closed gempir closed 8 years ago
Redis for caching, so bots and other applications can use the same data? On Apr 14, 2016 00:42, "Daniel Pasch" notifications@github.com wrote:
BTTV emotes are always a pain to manage and the relaybroker could solve this problem.
we would need a map for global emotes and then a map for the channels and the emotes of them. These maps need to be filled with the emoteCode and the ID which we will obtain via an API request. channel emotes like this: https://api.betterttv.net/2/channels/gempir global emotes here: https://api.betterttv.net/2/emotes
These emotes could be then added to the emotes tag with their position etc., or what I would prefer is an extra tag something like @bttvemotes maybe even @bttvchannel and @bttvglobal.
We need to be careful with ratelimits because i'm unsure what the ratelimits from their API look like. So we probably shouldn't request hundreds of channels at once.
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/gempir/relaybroker/issues/12
Hmm so you want to cache the emotes in redis and only send an hexists or so?
Otherwise I dont see a reason why relay broker needs to cache it in redis. Maybe bttv emotes are too much to do for the relay broker.
If we have to make the api request to bttv twice we are doing something wrong
When are BTTV Global emotes fetched? When are BTTV Channel emotes fetched? Whenever a channel is joined for the first time?
Assume relay broker runs for 7 days straight. When are BTTV Global emotes refreshed? When are channel emotes refreshed? Assume relay broker is restarted a few times during development. Will that cause any issues with their API if they have any rate limiting?
Yeah exactly that's why I was wondering if relaybroker should really be carrying this burden.
I would load global emotes into memory at startup and channel emotes when joining a channel. Refreshing channel emotes every hour.
But maybe that's just too much logic in relaybroker and if we need to do all that API stuff again at another point, I don't see this as a good solution.
I also would like to avoid any database.
Yeah, perhaps we should just keep relaybroker as simple as possible, and not include features that aren't 100% necessary. (Unless they're only beneficial and don't bring with them a bunch of complications)
BTTV emotes are always a pain to manage and the relaybroker could solve this problem.
we would need a map for global emotes and then a map for the channels and the emotes of them. These maps need to be filled with the emoteCode and the ID which we will obtain via an API request. channel emotes like this: https://api.betterttv.net/2/channels/gempir global emotes here: https://api.betterttv.net/2/emotes
These emotes could be then added to the emotes tag with their position etc., or what I would prefer is an extra tag something like @bttvemotes maybe even @bttvchannel and @bttvglobal.
We need to be careful with ratelimits because i'm unsure what the ratelimits from their API look like. So we probably shouldn't request hundreds of channels at once.