<?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: Ali T</title>
    <description>The latest articles on DEV Community by Ali T (@tek_uae_0be01409d814110ee).</description>
    <link>https://dev.to/tek_uae_0be01409d814110ee</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4113971%2F1288871f-44ea-449b-a6d5-5b86d5351417.png</url>
      <title>DEV Community: Ali T</title>
      <link>https://dev.to/tek_uae_0be01409d814110ee</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tek_uae_0be01409d814110ee"/>
    <language>en</language>
    <item>
      <title>How to Test AI Provider Timeouts Before Production</title>
      <dc:creator>Ali T</dc:creator>
      <pubDate>Fri, 27 Nov 2026 10:12:30 +0000</pubDate>
      <link>https://dev.to/tek_uae_0be01409d814110ee/how-to-test-ai-provider-timeouts-before-production-dc6</link>
      <guid>https://dev.to/tek_uae_0be01409d814110ee/how-to-test-ai-provider-timeouts-before-production-dc6</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: This article was drafted with AI assistance.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When an application depends on an AI provider, write down what your app should do when the provider times out before you wire up retries. Otherwise, a slow request can tie up a worker and a retry can accidentally start the same job twice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Give the request a deadline
&lt;/h2&gt;

&lt;p&gt;Start with the time a user can reasonably wait for the feature. If a page has a five-second budget, the model call needs a shorter deadline so the app has time to return a useful response. If the work routinely takes longer, give the user a job ID and show its status instead of holding the page open.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test the failure paths without calling the provider
&lt;/h2&gt;

&lt;p&gt;Use a stub provider in your test environment. Make it return the same outcomes your integration handles in production:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stub response&lt;/th&gt;
&lt;th&gt;What to check&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Delayed response&lt;/td&gt;
&lt;td&gt;The app reaches its deadline and returns the intended fallback.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HTTP 429&lt;/td&gt;
&lt;td&gt;Retries stay within the deadline and respect the provider’s retry guidance.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Malformed response&lt;/td&gt;
&lt;td&gt;Validation fails and the app does not store a partial result.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Duplicate job ID&lt;/td&gt;
&lt;td&gt;The same job does not produce a second user-visible result.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For operations with side effects, carry a stable job ID through the queue and persistence layer. Test that processing the same job twice leaves a single result. Keep request IDs and timing in the logs so you can trace failures without storing the full prompt.&lt;/p&gt;

&lt;p&gt;For related reading on cloud infrastructure and AI, see my &lt;a href="https://www.globaldxb.com/" rel="noopener noreferrer"&gt;GlobalDXB technology blog&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>testing</category>
    </item>
    <item>
      <title>How to Build a Redirect Map Before a Website Migration</title>
      <dc:creator>Ali T</dc:creator>
      <pubDate>Fri, 27 Nov 2026 10:00:44 +0000</pubDate>
      <link>https://dev.to/tek_uae_0be01409d814110ee/how-to-build-a-redirect-map-before-a-website-migration-3n1d</link>
      <guid>https://dev.to/tek_uae_0be01409d814110ee/how-to-build-a-redirect-map-before-a-website-migration-3n1d</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: This article was drafted with AI assistance.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A redirect map is a list of old URLs and where each one should land after a migration. I’d start with the old sitemap, then add landing pages from analytics and URLs that still receive external links. The map gives developers and editors a shared checklist for launch day.&lt;/p&gt;

&lt;h2&gt;
  
  
  Record the expected outcome for each URL
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Old path&lt;/th&gt;
&lt;th&gt;Expected response&lt;/th&gt;
&lt;th&gt;Destination&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/docs/install_guide/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;301&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/docs/install-guide/&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/docs/getting-started/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;200&lt;/td&gt;
&lt;td&gt;Same URL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/events/retired-event/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;410&lt;/td&gt;
&lt;td&gt;None, if the page is permanently gone and has no replacement&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For new paths, agree on a word separator before generating URLs from titles. If you’re considering changing slugs that already receive traffic, my &lt;a href="https://www.googledxb.com/2026/10/blog-post_761.html" rel="noopener noreferrer"&gt;GoogleDXB guide to hyphens and underscores in URLs&lt;/a&gt; explains what to weigh before scheduling that change.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verify the first response and the final page
&lt;/h2&gt;

&lt;p&gt;For the first row, request the old path with redirects disabled and check that the response is a 301 with the expected destination in the &lt;code&gt;Location&lt;/code&gt; header. Then follow the redirect and check that the destination returns a 200 and displays the installation guide. A 200 on an unrelated page would still fail this check.&lt;/p&gt;

&lt;p&gt;If the site relies on query parameters, add a separate row for a realistic example such as &lt;code&gt;?lang=en&lt;/code&gt;. Write down whether the parameter should survive the redirect and check the final URL against that expectation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rerun the same checks after launch
&lt;/h2&gt;

&lt;p&gt;Run the checks on staging, then repeat them on the public hostname after deployment. Update internal links and the sitemap to use the final URLs. Keep the map with your release notes so the next migration can identify older paths that still need to work.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>seo</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Building a real-time badge scanning flow for a Visitor Management System: Need help with async state handling!</title>
      <dc:creator>Ali T</dc:creator>
      <pubDate>Mon, 07 Sep 2026 13:25:25 +0000</pubDate>
      <link>https://dev.to/tek_uae_0be01409d814110ee/building-a-real-time-badge-scanning-flow-for-a-visitor-management-system-need-help-with-async-1h3m</link>
      <guid>https://dev.to/tek_uae_0be01409d814110ee/building-a-real-time-badge-scanning-flow-for-a-visitor-management-system-need-help-with-async-1h3m</guid>
      <description>&lt;p&gt;Hey DEV Community! 👋&lt;/p&gt;

&lt;p&gt;I'm currently working on building a real-time badge scanning and check-in flow for an enterprise &lt;a href="https://tektronixglobal.com/solution-visitor-management.html" rel="noopener noreferrer"&gt;visitor management system&lt;/a&gt; project, but as a relatively new developer, I've run into an async state management challenge that I can't quite wrap my head around.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Use Case
&lt;/h3&gt;

&lt;p&gt;When a visitor scans their badge at the kiosk:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;An edge device sends an asynchronous event via WebSockets (&lt;code&gt;ws://&lt;/code&gt;) to our backend service.&lt;/li&gt;
&lt;li&gt;The backend validates the badge UUID, fetches guest privileges, and updates the database state.&lt;/li&gt;
&lt;li&gt;The UI needs to immediately reflect the state change (&lt;code&gt;pending&lt;/code&gt; -&amp;gt; &lt;code&gt;verified&lt;/code&gt; -&amp;gt; &lt;code&gt;granted&lt;/code&gt; / &lt;code&gt;denied&lt;/code&gt;) without lag or race conditions.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Problem / Rookie Question
&lt;/h3&gt;

&lt;p&gt;I'm using React on the frontend and Node.js/Express on the backend with Socket.IO. When multiple visitors scan badges rapidly in succession:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sometimes the state updates out of order in the frontend state container.&lt;/li&gt;
&lt;li&gt;If a socket drops and reconnects, state sync gets stale or duplicates events.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What is the recommended pattern for handling fast async WebSocket event streams and ensuring UI state consistency in React for this type of system? Should I be using optimistic UI updates with an event sequence log, or buffering incoming scans in Redux/Zustand middleware?&lt;/p&gt;

&lt;p&gt;Any advice, code snippets, or best practices from experienced devs would be super appreciated! Thanks in advance!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>softwaredevelopment</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
