#1 Why I Chose Polling Over WebSockets for File Processing?
The author discusses their decision to use polling instead of WebSockets for a file processing application. They concluded that users only needed occasional updates rather than real-time notifications, making polling a more suitable choice. The article emphasizes that architectural decisions should be based on specific requirements rather than technology preferences.
- ▪The author initially considered using WebSockets for real-time updates.
- ▪Polling every 2 seconds was chosen as it provided sufficient feedback for users.
- ▪The decision was influenced by the simplicity of the architecture and ease of debugging.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 3948650) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Uttkarsh singh Posted on May 24 #1 Why I Chose Polling Over WebSockets for File Processing? #architecture #backend #systemdesign #webdev While building a file conversion and sharing app, I needed a way to show users the status of their file processing. My initial thought was WebSockets. Realtime updates sounded like the obvious choice.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).