<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Uttkarsh singh</title>
    <description>The latest articles on DEV Community by Uttkarsh singh (@uttkarsh123shiv).</description>
    <link>https://dev.to/uttkarsh123shiv</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3948650%2F6f9d1b43-623a-4895-9dba-c0d36c2fead9.png</url>
      <title>DEV Community: Uttkarsh singh</title>
      <link>https://dev.to/uttkarsh123shiv</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/uttkarsh123shiv"/>
    <language>en</language>
    <item>
      <title>#1 Why I Chose Polling Over WebSockets for File Processing?</title>
      <dc:creator>Uttkarsh singh</dc:creator>
      <pubDate>Sun, 24 May 2026 07:06:59 +0000</pubDate>
      <link>https://dev.to/uttkarsh123shiv/1-why-i-chose-polling-over-websockets-for-file-processing--4242</link>
      <guid>https://dev.to/uttkarsh123shiv/1-why-i-chose-polling-over-websockets-for-file-processing--4242</guid>
      <description>&lt;p&gt;While building a file conversion and sharing app, I needed a way to show users the status of their file processing.&lt;/p&gt;

&lt;p&gt;My initial thought was WebSockets.&lt;/p&gt;

&lt;p&gt;Realtime updates sounded like the obvious choice.&lt;/p&gt;

&lt;p&gt;But after thinking about the actual requirement, I realized users didn’t need instant push notifications — they only needed occasional feedback about whether conversion had finished.&lt;/p&gt;

&lt;p&gt;So I went with polling every 2 seconds.&lt;/p&gt;

&lt;p&gt;The flow became:&lt;/p&gt;

&lt;p&gt;Upload → Job queued (BullMQ) → Worker processes file → Frontend polls status → Result ready&lt;/p&gt;

&lt;p&gt;Why polling worked better here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simpler architecture&lt;/li&gt;
&lt;li&gt;No persistent connections to manage&lt;/li&gt;
&lt;li&gt;No communication layer between workers and socket server&lt;/li&gt;
&lt;li&gt;Easier to debug and reason about&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tradeoff:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More HTTP requests&lt;/li&gt;
&lt;li&gt;Users continue polling until processing completes&lt;/li&gt;
&lt;li&gt;Not suitable for low-latency or collaborative experiences&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the requirements change to things like chat, live collaboration, or instant notifications, I’d revisit WebSockets.&lt;/p&gt;

&lt;p&gt;This was a good reminder that architecture decisions depend more on requirements than technology preferences.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>backend</category>
      <category>systemdesign</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
