<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Twitch on mcclain.sh</title><link>http://mcclain.sh/tags/twitch/</link><description>Recent content in Twitch on mcclain.sh</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 08 Jun 2022 00:00:00 +0000</lastBuildDate><atom:link href="http://mcclain.sh/tags/twitch/index.xml" rel="self" type="application/rss+xml"/><item><title>The Secret of the Twitch Chat API</title><link>http://mcclain.sh/posts/twitch-chat-api/</link><pubDate>Wed, 08 Jun 2022 00:00:00 +0000</pubDate><guid>http://mcclain.sh/posts/twitch-chat-api/</guid><description>&lt;p&gt;Have you ever been in a Twitch chat of someone with thousands, tens of thousands, or even hundreds of thousands of chatters? The endless firehose of memes and emotes seem to come so fast that it&amp;rsquo;s almost impossible to read. Have you ever wondered what technology backs Twitch chat to support the volume and throughput of millions of concurrent chatters?&lt;/p&gt;
&lt;p&gt;Spoilers: it&amp;rsquo;s &lt;a href="https://dev.twitch.tv/docs/irc" target="_blank" rel="noopener noreffer "&gt;IRC&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="irc-really"&gt;IRC? Really?&lt;/h2&gt;
&lt;p&gt;Yeah you know, IRC. Created in the late 80s and popularized in the 90s, I&amp;rsquo;d use it in the early 2000&amp;rsquo;s playing competitive Counter-Strike to post &lt;code&gt;5v5 | east | dust2 | cal-im | yours&lt;/code&gt; over and over to find people to practice against. Granted (but just as important), IRC is a &lt;em&gt;protocol&lt;/em&gt; rather than a specific implementation, which leaves a lot of room for building efficiency. While Twitch&amp;rsquo;s servers are based on &lt;a href="https://datatracker.ietf.org/doc/html/rfc1459.html" target="_blank" rel="noopener noreffer "&gt;RFC1459&lt;/a&gt;, they only support a &lt;a href="https://dev.twitch.tv/docs/irc#supported-irc-messages" target="_blank" rel="noopener noreffer "&gt;subset of IRC messages&lt;/a&gt;. In fact, to read and write chat message, we need just four commands:&lt;/p&gt;</description></item></channel></rss>