Twitch streams on ESOC

France Kaiserklein
Pro Player
Posts: 10282
Joined: Jun 6, 2015
Location: Paris
GameRanger ID: 5529322

Twitch streams on ESOC

Post by Kaiserklein »

How does ESOC get the data from twitch to display the streams on the left? It feels like there's always a significant delay between what twitch shows and what ESOC shows
Image
Image
Image
LoOk_tOm wrote:I have something in particular against Kaisar (GERMANY NOOB mercenary LAMME FOREVER) And the other people (noobs) like suck kaiser ... just this ..
User avatar
Tuvalu gibson
Ninja
ECL Reigning Champs
Posts: 13598
Joined: May 4, 2015
Location: USA

Re: Twitch streams on ESOC

Post by gibson »

It's only like 3 minutes, probably not a huge deal
France Kaiserklein
Pro Player
Posts: 10282
Joined: Jun 6, 2015
Location: Paris
GameRanger ID: 5529322

Re: Twitch streams on ESOC

Post by Kaiserklein »

gibson wrote:It's only like 3 minutes, probably not a huge deal

No it's not a huge deal, but I know a way to get the info without any delay. Unless the delay comes from twitch itself, then there's no way to fix it
Image
Image
Image
LoOk_tOm wrote:I have something in particular against Kaisar (GERMANY NOOB mercenary LAMME FOREVER) And the other people (noobs) like suck kaiser ... just this ..
User avatar
Sweden Gendarme
Gendarme
Donator 03
Posts: 5132
Joined: Sep 11, 2016
ESO: Gendarme

Re: Twitch streams on ESOC

Post by Gendarme »

The delay is due to Twitch itself sending the data periodically, I think. Nothing we can do about it.
Pay more attention to detail.
User avatar
Czech Republic EAGLEMUT
ESOC Dev Team
Donator 05
Posts: 4515
Joined: Mar 31, 2015
ESO: EAGLEMUT
Clan: WPact

Re: Twitch streams on ESOC

Post by EAGLEMUT »

Yeah, this is live data from twitch API.
Image
momuuu wrote: theres no way eaglemut is truly a top player
France Kaiserklein
Pro Player
Posts: 10282
Joined: Jun 6, 2015
Location: Paris
GameRanger ID: 5529322

Re: Twitch streams on ESOC

Post by Kaiserklein »

Yeah but that's what I thought. The API might just be shit (twitch is honestly a pretty buggy website). Did you try to directly parse the data from twitch.tv/ageofempires3 (or whatever the twitch page listing aoe3 streams is called)? You should be able to parse the streamer names and the amount of viewers easily.
@EAGLEMUT @Gendarme
Image
Image
Image
LoOk_tOm wrote:I have something in particular against Kaisar (GERMANY NOOB mercenary LAMME FOREVER) And the other people (noobs) like suck kaiser ... just this ..
User avatar
United States of America musketeer925
Retired Contributor
Donator 01
Posts: 2484
Joined: Mar 28, 2015
ESO: musketeer925

Re: Twitch streams on ESOC

Post by musketeer925 »

Kaiserklein wrote:Yeah but that's what I thought. The API might just be shit (twitch is honestly a pretty buggy website). Did you try to directly parse the data from twitch.tv/ageofempires3 (or whatever the twitch page listing aoe3 streams is called)? You should be able to parse the streamer names and the amount of viewers easily.
@EAGLEMUT @Gendarme

While it's true that could be parsed, doing web scraping when there is an API available isn't the best idea. Twitch maintains the API and makes sure it works all the time, but they could change the structure of that page at any time, resulting in our Twitch streams feature being broken. Effectively, while it would be possible, it'd be more work for our devs to maintain.
France Kaiserklein
Pro Player
Posts: 10282
Joined: Jun 6, 2015
Location: Paris
GameRanger ID: 5529322

Re: Twitch streams on ESOC

Post by Kaiserklein »

I see. Let's just hope that twitch improves their API then
Image
Image
Image
LoOk_tOm wrote:I have something in particular against Kaisar (GERMANY NOOB mercenary LAMME FOREVER) And the other people (noobs) like suck kaiser ... just this ..
User avatar
Nauru Dolan
Ninja
Posts: 13069
Joined: Sep 17, 2015

Re: Twitch streams on ESOC

Post by Dolan »

Twitch builds a cache of the status of their streams, which can be refreshed periodically between a few minutes and one hour. They're not doing refreshes specifically for one game or streamer, they're doing refreshes for the entire site.

And since lots of websites are polling their APIs every day, you can imagine they wouldn't like you to poll their servers every second or 20 seconds. So they probably discourage too fast API polling by keeping a low rate of refresh for rebuilding their streams' status cache.

In fact, that's why they're using this method of separating streams from pollable APIs, because in the past their servers got overwhelmed by people using site alerters, which polled their streams every few seconds. So, now, if you're polling their API too fast, you're not achieving anything other than maybe slowing down your site.
No Flag deleted_user
Ninja
Posts: 14364
Joined: Mar 26, 2015

Re: Twitch streams on ESOC

Post by deleted_user »

Maybe Twitch could use a premier Java programmer such as myself to help fix this problem ^_^
User avatar
Austria KINGofOsmane
Pro Player
Posts: 3097
Joined: Feb 24, 2015
ESO: KINGofOsmane
Location: Walling Town

Re: Twitch streams on ESOC

Post by KINGofOsmane »

as long as i see callen streams in time all is fine :)
"Losing to Callen was the worst night of my life" Gibthedurrty 2019
"If hazza can get pr42 with team i can get pr50 with 1v1" Gibthedurrty 2018
Lecastete wrote: Dude i hate this game. I am bad and i also dont have luck
Tete cs:go experience
User avatar
France Rikikipu
Retired Contributor
Posts: 1679
Joined: Feb 27, 2015
ESO: p-of
Location: In your base

Re: Twitch streams on ESOC

Post by Rikikipu »

Dolan wrote:Twitch builds a cache of the status of their streams, which can be refreshed periodically between a few minutes and one hour. They're not doing refreshes specifically for one game or streamer, they're doing refreshes for the entire site.

And since lots of websites are polling their APIs every day, you can imagine they wouldn't like you to poll their servers every second or 20 seconds. So they probably discourage too fast API polling by keeping a low rate of refresh for rebuilding their streams' status cache.

In fact, that's why they're using this method of separating streams from pollable APIs, because in the past their servers got overwhelmed by people using site alerters, which polled their streams every few seconds. So, now, if you're polling their API too fast, you're not achieving anything other than maybe slowing down your site.

Time to move to nodejs !
User avatar
Tuvalu gibson
Ninja
ECL Reigning Champs
Posts: 13598
Joined: May 4, 2015
Location: USA

Re: Twitch streams on ESOC

Post by gibson »

i could fix it for them without trying if i wanted to

Who is online

Users browsing this forum: No registered users and 7 guests

Which top 10 players do you wish to see listed?

All-time

Active last two weeks

Active last month

Supremacy

Treaty

Official

ESOC Patch

Treaty Patch

1v1 Elo

2v2 Elo

3v3 Elo

Power Rating

Which streams do you wish to see listed?

Twitch

Age of Empires III

Age of Empires IV