<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Implementer Guide to Machine learning Engineering]]></title><description><![CDATA[Technical Deep dives and opinion stories in an attempt to become a good Machine Learning Engineer]]></description><link>https://abinavr.substack.com</link><image><url>https://substackcdn.com/image/fetch/$s_!1thV!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F288b225a-ba61-49f6-a480-e7c0525a4360_4272x2848.jpeg</url><title>Implementer Guide to Machine learning Engineering</title><link>https://abinavr.substack.com</link></image><generator>Substack</generator><lastBuildDate>Sat, 04 Apr 2026 06:55:00 GMT</lastBuildDate><atom:link href="https://abinavr.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Abinav R]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[abinavr@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[abinavr@substack.com]]></itunes:email><itunes:name><![CDATA[Abinav R]]></itunes:name></itunes:owner><itunes:author><![CDATA[Abinav R]]></itunes:author><googleplay:owner><![CDATA[abinavr@substack.com]]></googleplay:owner><googleplay:email><![CDATA[abinavr@substack.com]]></googleplay:email><googleplay:author><![CDATA[Abinav R]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Designing for 429: Why LLM Rate Limits Are a Systems Problem?]]></title><description><![CDATA[Why retries aren&#8217;t enough&#8212;and how queues, multi-model routing, and prompt adaptation make LLM systems resilient]]></description><link>https://abinavr.substack.com/p/designing-for-429-why-llm-rate-limits</link><guid isPermaLink="false">https://abinavr.substack.com/p/designing-for-429-why-llm-rate-limits</guid><dc:creator><![CDATA[Abinav R]]></dc:creator><pubDate>Sat, 07 Mar 2026 17:50:18 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!fWHd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ffd512-6d8c-4720-992c-18180f9d4f10_1832x1995.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1>Introduction</h1><p>LLM adoption has reached a critical inflection point in the enterprise. While the majority of organizations rely on managed API providers to accelerate time-to-market, transitioning from experimental prototypes to business-critical production systems reveals a significant hurdle: <strong>upstream throughput constraints.</strong></p><p>Managed LLM APIs abstract away infrastructure complexity but introduce a &#8220;black box&#8221; variable&#8212;rate limits. When multiple distributed services, background workers, and real-time user requests compete for a shared upstream quota, rate limiting ceases to be a simple client-side error and becomes a core systems-design constraint.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://abinavr.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Implementer Guide to Machine learning Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>In this post we try and propose some solutions to the rate limiting problem when interacting with LLM providers.</p><h1>Problem Statement</h1><p>LLM providers typically enforce multi-dimensional limits to maintain multi-tenant stability. These are usually defined by:</p><ul><li><p><strong>RPM (Requests Per Minute):</strong> Limits the frequency of orchestrating calls.</p></li><li><p><strong>TPM (Tokens Per Minute):</strong> Limits the actual &#8220;compute&#8221; or payload volume.</p></li><li><p><strong>Concurrency:</strong> Limits the number of active HTTP connections.</p></li></ul><p>These limits are generally existing to provide fair and consistent service to all their customers and ensure service stability. </p><p></p><p>A sample LLM Application functions something like this</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fWHd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ffd512-6d8c-4720-992c-18180f9d4f10_1832x1995.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fWHd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ffd512-6d8c-4720-992c-18180f9d4f10_1832x1995.png 424w, https://substackcdn.com/image/fetch/$s_!fWHd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ffd512-6d8c-4720-992c-18180f9d4f10_1832x1995.png 848w, https://substackcdn.com/image/fetch/$s_!fWHd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ffd512-6d8c-4720-992c-18180f9d4f10_1832x1995.png 1272w, https://substackcdn.com/image/fetch/$s_!fWHd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ffd512-6d8c-4720-992c-18180f9d4f10_1832x1995.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fWHd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ffd512-6d8c-4720-992c-18180f9d4f10_1832x1995.png" width="1456" height="1586" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/73ffd512-6d8c-4720-992c-18180f9d4f10_1832x1995.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1586,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:196503,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://abinavr.substack.com/i/190172161?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ffd512-6d8c-4720-992c-18180f9d4f10_1832x1995.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fWHd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ffd512-6d8c-4720-992c-18180f9d4f10_1832x1995.png 424w, https://substackcdn.com/image/fetch/$s_!fWHd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ffd512-6d8c-4720-992c-18180f9d4f10_1832x1995.png 848w, https://substackcdn.com/image/fetch/$s_!fWHd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ffd512-6d8c-4720-992c-18180f9d4f10_1832x1995.png 1272w, https://substackcdn.com/image/fetch/$s_!fWHd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ffd512-6d8c-4720-992c-18180f9d4f10_1832x1995.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In a naive architecture, scaling traffic simply increases the probability of breaching these thresholds. Without sophisticated backpressure mechanisms, a burst in traffic doesn&#8217;t just slow the system down&#8212;it triggers a cascade of failures that can compromise the user experience and system reliability. The challenge is not handling individual failures but ensuring that <strong>the whole system remains resilient</strong></p><p>Let us see few patterns which can help ensure the resiliency</p><h2>Pattern 1: Exponential Backoff</h2><p>Exponential backoff is the simplest of resilient patterns to handle rate limiting, By rate limiting what the server is telling us is we cannot get any responses right now as we have exhausted the quota by a burst of traffic, So instead of constantly hitting the servers and asking it to serve we add a retry but in exponential time. That is the client waits for a progressively longer period after each subsequent failure.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QC8U!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21a5e83b-4959-4953-88c5-851bf1fb7d19_1408x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QC8U!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21a5e83b-4959-4953-88c5-851bf1fb7d19_1408x768.png 424w, https://substackcdn.com/image/fetch/$s_!QC8U!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21a5e83b-4959-4953-88c5-851bf1fb7d19_1408x768.png 848w, https://substackcdn.com/image/fetch/$s_!QC8U!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21a5e83b-4959-4953-88c5-851bf1fb7d19_1408x768.png 1272w, https://substackcdn.com/image/fetch/$s_!QC8U!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21a5e83b-4959-4953-88c5-851bf1fb7d19_1408x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QC8U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21a5e83b-4959-4953-88c5-851bf1fb7d19_1408x768.png" width="1408" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/21a5e83b-4959-4953-88c5-851bf1fb7d19_1408x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1408,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1156172,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://abinavr.substack.com/i/190172161?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21a5e83b-4959-4953-88c5-851bf1fb7d19_1408x768.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QC8U!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21a5e83b-4959-4953-88c5-851bf1fb7d19_1408x768.png 424w, https://substackcdn.com/image/fetch/$s_!QC8U!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21a5e83b-4959-4953-88c5-851bf1fb7d19_1408x768.png 848w, https://substackcdn.com/image/fetch/$s_!QC8U!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21a5e83b-4959-4953-88c5-851bf1fb7d19_1408x768.png 1272w, https://substackcdn.com/image/fetch/$s_!QC8U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21a5e83b-4959-4953-88c5-851bf1fb7d19_1408x768.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>However, Standard backoff is insufficient for distributed systems. If ten workers hit a rate limit simultaneously and retry on the same schedule, they create "thundering herd" spikes that re-congest the API. Introduce <strong>Jitter</strong> (randomized delay). This desynchronizes retries, smoothing out the request distribution and increasing the likelihood of hitting an open window in the provider's bucket.</p><h2>Pattern 2: Multi Model Fallback </h2><p>This is also quite simple to implement, Instead of just requesting one model which has limits have multiple LLM models from the same provider or different providers, for example if we are choosing claude-opus model and it is responding with <code>429 Too Many Requests</code>, We should consider requesting a different model for example a Sonnet or Haiku Model or even a lower generation Opus model. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mFjt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf22f738-c75a-49e5-bef1-0d38a55fa005_1408x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mFjt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf22f738-c75a-49e5-bef1-0d38a55fa005_1408x768.png 424w, https://substackcdn.com/image/fetch/$s_!mFjt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf22f738-c75a-49e5-bef1-0d38a55fa005_1408x768.png 848w, https://substackcdn.com/image/fetch/$s_!mFjt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf22f738-c75a-49e5-bef1-0d38a55fa005_1408x768.png 1272w, https://substackcdn.com/image/fetch/$s_!mFjt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf22f738-c75a-49e5-bef1-0d38a55fa005_1408x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mFjt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf22f738-c75a-49e5-bef1-0d38a55fa005_1408x768.png" width="1408" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/df22f738-c75a-49e5-bef1-0d38a55fa005_1408x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1408,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1089598,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://abinavr.substack.com/i/190172161?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf22f738-c75a-49e5-bef1-0d38a55fa005_1408x768.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mFjt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf22f738-c75a-49e5-bef1-0d38a55fa005_1408x768.png 424w, https://substackcdn.com/image/fetch/$s_!mFjt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf22f738-c75a-49e5-bef1-0d38a55fa005_1408x768.png 848w, https://substackcdn.com/image/fetch/$s_!mFjt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf22f738-c75a-49e5-bef1-0d38a55fa005_1408x768.png 1272w, https://substackcdn.com/image/fetch/$s_!mFjt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf22f738-c75a-49e5-bef1-0d38a55fa005_1408x768.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>The advantage to such a chage is that traffic is now distributed across models if one model is congested. While it maintains availability, it introduces <strong>output variance</strong>. A prompt optimized for a flagship model may produce hallucinations or formatting errors when executed on a smaller, faster model.</p><h2>Pattern 3: Multi Model Fallback with Appropriate prompts</h2><p>To mitigate the downside of Pattern 2, the system should store <strong>versioned, model-specific prompt templates</strong>.</p><ul><li><p><strong>Mechanism:</strong> When falling back from a high-reasoning model to a lower-tier one, the application swaps the prompt for one with more explicit few-shot examples or stricter constraints to maintain output parity.</p></li><li><p><strong>Challenge:</strong> This increases the maintenance surface area. You are no longer managing one LLM integration, but an &#8220;N-model&#8221; matrix that requires robust evaluation (Evals) to ensure consistent behavior across all fallback paths.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!x_v0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F967f5edd-c8df-4c95-8a9d-93ae926973bf_1408x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!x_v0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F967f5edd-c8df-4c95-8a9d-93ae926973bf_1408x768.png 424w, https://substackcdn.com/image/fetch/$s_!x_v0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F967f5edd-c8df-4c95-8a9d-93ae926973bf_1408x768.png 848w, https://substackcdn.com/image/fetch/$s_!x_v0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F967f5edd-c8df-4c95-8a9d-93ae926973bf_1408x768.png 1272w, https://substackcdn.com/image/fetch/$s_!x_v0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F967f5edd-c8df-4c95-8a9d-93ae926973bf_1408x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!x_v0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F967f5edd-c8df-4c95-8a9d-93ae926973bf_1408x768.png" width="1408" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/967f5edd-c8df-4c95-8a9d-93ae926973bf_1408x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1408,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1174173,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://abinavr.substack.com/i/190172161?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F967f5edd-c8df-4c95-8a9d-93ae926973bf_1408x768.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!x_v0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F967f5edd-c8df-4c95-8a9d-93ae926973bf_1408x768.png 424w, https://substackcdn.com/image/fetch/$s_!x_v0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F967f5edd-c8df-4c95-8a9d-93ae926973bf_1408x768.png 848w, https://substackcdn.com/image/fetch/$s_!x_v0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F967f5edd-c8df-4c95-8a9d-93ae926973bf_1408x768.png 1272w, https://substackcdn.com/image/fetch/$s_!x_v0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F967f5edd-c8df-4c95-8a9d-93ae926973bf_1408x768.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Pattern 4: Event Driven Processing</h2><p>By moving from a request response model we now ensure that there is no urgency to serve the response, We can control the following things by moving to a queue based model</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TLi1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F844bd7bb-7d34-4cc4-ab59-f6163ee66516_1408x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TLi1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F844bd7bb-7d34-4cc4-ab59-f6163ee66516_1408x768.png 424w, https://substackcdn.com/image/fetch/$s_!TLi1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F844bd7bb-7d34-4cc4-ab59-f6163ee66516_1408x768.png 848w, https://substackcdn.com/image/fetch/$s_!TLi1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F844bd7bb-7d34-4cc4-ab59-f6163ee66516_1408x768.png 1272w, https://substackcdn.com/image/fetch/$s_!TLi1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F844bd7bb-7d34-4cc4-ab59-f6163ee66516_1408x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TLi1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F844bd7bb-7d34-4cc4-ab59-f6163ee66516_1408x768.png" width="1408" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/844bd7bb-7d34-4cc4-ab59-f6163ee66516_1408x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1408,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1263822,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://abinavr.substack.com/i/190172161?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F844bd7bb-7d34-4cc4-ab59-f6163ee66516_1408x768.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TLi1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F844bd7bb-7d34-4cc4-ab59-f6163ee66516_1408x768.png 424w, https://substackcdn.com/image/fetch/$s_!TLi1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F844bd7bb-7d34-4cc4-ab59-f6163ee66516_1408x768.png 848w, https://substackcdn.com/image/fetch/$s_!TLi1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F844bd7bb-7d34-4cc4-ab59-f6163ee66516_1408x768.png 1272w, https://substackcdn.com/image/fetch/$s_!TLi1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F844bd7bb-7d34-4cc4-ab59-f6163ee66516_1408x768.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><ol><li><p><strong>Backpressure Absorption:</strong> The queue acts as a shock absorber for traffic spikes.</p></li><li><p><strong>Concurrency Control:</strong> You can limit the number of active consumers to exactly match your provider&#8217;s Tier limits.</p></li><li><p><strong>Prioritization:</strong> You can route &#8220;Premium User&#8221; requests to a priority lane while background tasks wait for available quota.</p></li></ol><h1>Conclusion</h1><p>External AI providers are distributed systems with shared, limited capacity. To build at scale, we must treat rate limits as a <strong>first-class architectural constraint</strong> rather than an edge case.</p><p>Successful LLM platforms do not just retry; they <strong>orchestrate</strong>. They distribute traffic across providers, control global concurrency, and ensure prompts are portable enough to survive a provider&#8217;s downtime. Retries may recover from failures, but architecture determines whether those failures happen in the first place.</p><p></p><p><strong>PS: All diagrams have been generated with the use of AI</strong> Model (Gemini)</p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://abinavr.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Implementer Guide to Machine learning Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Serving Models Efficiently: Load Once, Infer Repeatedly - Design pattern]]></title><description><![CDATA[How to load your model once and serve multiple requests?]]></description><link>https://abinavr.substack.com/p/serving-models-efficiently-load-once</link><guid isPermaLink="false">https://abinavr.substack.com/p/serving-models-efficiently-load-once</guid><dc:creator><![CDATA[Abinav R]]></dc:creator><pubDate>Thu, 14 Aug 2025 18:14:24 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ZNPz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f9bb11-c0fb-45dc-a7fa-e7ca9e8d8a23_1300x822.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Machine learning models today power some of the most commonly used real time applications such as recommendations, search and Chat assistants etc. To serve these models to maintain a smooth user experience <strong>efficient model loading and serving </strong>becomes critical. Every millisecond counts towards impacting latency and throughput affecting customer experience. If the latency is increased by few milliseconds the compute need goes up and can affect scalability. In this post we discuss a very common and known design pattern in the software world - <strong>Singleton Pattern </strong>and see how it can help in shaving off latency. We can also take a look at <strong>LRU cache or Least Recently Used </strong>caching as a replacement to singleton for the same purpose. </p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://abinavr.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Implementer Guide to Machine learning Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h2>Singleton pattern</h2><p>Singleton pattern is a design pattern by which there is only a single instance of an object in the entire application. The common usage of Singleton pattern is to load and maintain compute heavy items that needs loading into the memory such as DB connection, config managers or Machine learning models.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vGvk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c94da32-1bde-490e-a9e9-8ac071b89bbd.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vGvk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c94da32-1bde-490e-a9e9-8ac071b89bbd.png 424w, https://substackcdn.com/image/fetch/$s_!vGvk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c94da32-1bde-490e-a9e9-8ac071b89bbd.png 848w, https://substackcdn.com/image/fetch/$s_!vGvk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c94da32-1bde-490e-a9e9-8ac071b89bbd.png 1272w, https://substackcdn.com/image/fetch/$s_!vGvk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c94da32-1bde-490e-a9e9-8ac071b89bbd.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vGvk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c94da32-1bde-490e-a9e9-8ac071b89bbd.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5c94da32-1bde-490e-a9e9-8ac071b89bbd.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:489,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://abinavr.substack.com/i/168066955?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c94da32-1bde-490e-a9e9-8ac071b89bbd.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vGvk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c94da32-1bde-490e-a9e9-8ac071b89bbd.png 424w, https://substackcdn.com/image/fetch/$s_!vGvk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c94da32-1bde-490e-a9e9-8ac071b89bbd.png 848w, https://substackcdn.com/image/fetch/$s_!vGvk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c94da32-1bde-490e-a9e9-8ac071b89bbd.png 1272w, https://substackcdn.com/image/fetch/$s_!vGvk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c94da32-1bde-490e-a9e9-8ac071b89bbd.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZNPz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f9bb11-c0fb-45dc-a7fa-e7ca9e8d8a23_1300x822.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZNPz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f9bb11-c0fb-45dc-a7fa-e7ca9e8d8a23_1300x822.png 424w, https://substackcdn.com/image/fetch/$s_!ZNPz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f9bb11-c0fb-45dc-a7fa-e7ca9e8d8a23_1300x822.png 848w, https://substackcdn.com/image/fetch/$s_!ZNPz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f9bb11-c0fb-45dc-a7fa-e7ca9e8d8a23_1300x822.png 1272w, https://substackcdn.com/image/fetch/$s_!ZNPz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f9bb11-c0fb-45dc-a7fa-e7ca9e8d8a23_1300x822.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZNPz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f9bb11-c0fb-45dc-a7fa-e7ca9e8d8a23_1300x822.png" width="1300" height="822" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/36f9bb11-c0fb-45dc-a7fa-e7ca9e8d8a23_1300x822.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:822,&quot;width&quot;:1300,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Singleton Design Pattern: Overview | Belatrix Blog&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Singleton Design Pattern: Overview | Belatrix Blog" title="Singleton Design Pattern: Overview | Belatrix Blog" srcset="https://substackcdn.com/image/fetch/$s_!ZNPz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f9bb11-c0fb-45dc-a7fa-e7ca9e8d8a23_1300x822.png 424w, https://substackcdn.com/image/fetch/$s_!ZNPz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f9bb11-c0fb-45dc-a7fa-e7ca9e8d8a23_1300x822.png 848w, https://substackcdn.com/image/fetch/$s_!ZNPz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f9bb11-c0fb-45dc-a7fa-e7ca9e8d8a23_1300x822.png 1272w, https://substackcdn.com/image/fetch/$s_!ZNPz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f9bb11-c0fb-45dc-a7fa-e7ca9e8d8a23_1300x822.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Image Credits: https://belatrix.globant.com/us-en/blog/tech-trends/the-singleton-design-pattern/</p><h3>How is Singleton Pattern used in Model Serving?</h3><p>In a machine learning inference service, models must be available to process incoming requests efficiently. Typically, models are downloaded at runtime and loaded into CPU or GPU memory before performing inference. If the model object is re-created for every request, this process repeats&#8212;incurring unnecessary network transfer and memory allocation overhead. A common solution is to implement a <strong>singleton pattern</strong>, ensuring the model is downloaded and loaded into memory only once during the service&#8217;s lifecycle. Subsequent requests can then reuse the same in-memory model instance to execute methods such as <code>predict()</code>, significantly reducing latency and resource usage.</p><h2>LRU Cache (Least Recently Used Cache)</h2><p>Least Recently used Cache is a cache management technique where the recently used objects are stored at the top of the memory. The LRU cache is implemented by using a combination Doubly Linked List and Hash Table data structure. In Python programming language the <code>lru_cache</code>  is available through an inbuilt python library called <code>functools</code></p><h3>How is LRU cache used in Model serving?</h3><p>The LRU cache can be used with <code>maxitems=1</code> to store the model in memory, this ensures that only that object remains in memory and it basically implements a neat version of the SIngleton pattern mentioned above. However LRU cache also offers switching models when there are multiple large models which need to be replaced in memory. By increase the size of the LRU cache we can hold models which are much frequently used in memory and for models which are infrequent in usage can be loaded into memory as and when required. </p><h2>Usage </h2><ul><li><p>Use Singleton Pattern when we want to serve a single model in a service and it is guaranteed that model will not change for users, The advantage that it offers is minimal memory usage. </p></li><li><p>Use LRU cache when there are multiple models and access patterns are not very predictable and less used models need automatic eviction from the memory. </p></li></ul><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://abinavr.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Implementer Guide to Machine learning Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[ETL pipelines with Prefect]]></title><description><![CDATA[Problem Statement]]></description><link>https://abinavr.substack.com/p/etl-pipelines-with-prefect</link><guid isPermaLink="false">https://abinavr.substack.com/p/etl-pipelines-with-prefect</guid><dc:creator><![CDATA[Abinav R]]></dc:creator><pubDate>Sat, 05 Jul 2025 16:00:58 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!1thV!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F288b225a-ba61-49f6-a480-e7c0525a4360_4272x2848.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Problem Statement</h2><p>There is a business case where the organization is dependent on an API to fetch the data and luckily the data can be stored and used for downstream analytics later. This API costs a lot and the data also needs to be stored securely. But the idea is to not write a script which is put together of all the API calls panda conversions etc that will fail on the drop of a hat because it is meant as a one time usage</p><h2>Requirements</h2><p>The script should</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://abinavr.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading ML Mindspace! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><ul><li><p>re runnable</p></li><li><p>configurable</p></li><li><p>fast velocity of development</p></li><li><p>easy to maintain.</p></li></ul><h2>Tasks</h2><ol><li><p>Create a function that fetches the data from the API</p></li><li><p>Convert the API response into a dataframe</p></li><li><p>Store the dataframe in a database</p></li><li><p>Create a pipeline that does this in a sequence.</p></li></ol><h2>Solution</h2><p>We are going to build the entire thing using prefect and python. I tried my hand at airflow but it just seemed so complex with binaries etc that prefect documentation seemed like a breeze.</p><h3>0. Install prefect</h3><p>Install this inside a vitual environment</p><pre><code><code>pip install -U prefect
</code></code></pre><h2>Code snippets</h2><h3>1. Create a function that fetches data from API</h3><p>Since the API call that I have to make is a post API call, the input data to be sent in the request is stored as a modifiable content in a json and then loaded during the task phase. This would be a task in the prefect universe which is a smaller brick in the larger pipeline represented as a flow.</p><pre><code><code>import requests
import json

def fetch_data(url, data):
    response = requests.post(url, data=json.dumps(data))
    return response.json()
</code></code></pre><h3>2. Convert the API response into a dataframe</h3><p>Once the response is obtained as json convert it into a dataframe by using pandas to concat if the dataframe is not empty and if empty just create a dataframe from json</p><h3>3. Dumpt the Data to a Postgresql database using SQLAlchemy and pandas</h3><p>Create a engine for dumping the data using SQLAlchemy and then use df.to_sql() method from pandas to just dump the data into the postgres table</p><h2>Putting the above parts together</h2><p>steps 1,2 and 3 are individual tasks in the pipeline, now just write a simple python function which will basically execute this in sequence and then add a @flow decorator to the top of the function something like this</p><pre><code><code>
from prefect import flow, task

@task
def fetch_data(url, data):
    ...

@task
def convert_to_df(response):
    ...

@task
def dump_to_db(df):
   ...

@flow
def my_etl_pipeline():
    response = fetch_data(url, data)
    df = convert_to_df(response)
    dump_to_db(df)



</code></code></pre><p>Now all that needs to be done is to run this script as if running a python script and this accomplished ETL and the localhost at port 4200 gives the dashboard of the task execution etc. Such a simple way to run simple workflows</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://abinavr.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading ML Mindspace! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[ A deep dive into Async patterns ]]></title><description><![CDATA[In the recent times I have been trying to understand a bit more about asynchronous communication between services and real time streaming.]]></description><link>https://abinavr.substack.com/p/a-deep-dive-into-async-patterns</link><guid isPermaLink="false">https://abinavr.substack.com/p/a-deep-dive-into-async-patterns</guid><dc:creator><![CDATA[Abinav R]]></dc:creator><pubDate>Sat, 05 Jul 2025 15:58:59 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!mKOm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66affc-06e8-42cf-884f-87c2e3b0cab4_600x400.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In the recent times I have been trying to understand a bit more about asynchronous communication between services and real time streaming. For real time streaming the Pub sub pattern seems the most important architectural pattern.</p><p>In this post I will go on a journey where we assume that we know about synchronous client server interaction to various async patterns and how each of them solve the problem of scale.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://abinavr.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading ML Mindspace! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h2>Client Server Architecture</h2><p>In the world of application development which involves internet, there are basically two components one is the frontend/Client which is accessible through a browser or app where people can click or enter data and perform some actions, which is then sent across to the server (some form of a computer) that performs the logical operations on it. The data is relayed from client to server through a secure network connection.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mKOm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66affc-06e8-42cf-884f-87c2e3b0cab4_600x400.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mKOm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66affc-06e8-42cf-884f-87c2e3b0cab4_600x400.jpeg 424w, https://substackcdn.com/image/fetch/$s_!mKOm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66affc-06e8-42cf-884f-87c2e3b0cab4_600x400.jpeg 848w, https://substackcdn.com/image/fetch/$s_!mKOm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66affc-06e8-42cf-884f-87c2e3b0cab4_600x400.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!mKOm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66affc-06e8-42cf-884f-87c2e3b0cab4_600x400.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mKOm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66affc-06e8-42cf-884f-87c2e3b0cab4_600x400.jpeg" width="600" height="400" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2f66affc-06e8-42cf-884f-87c2e3b0cab4_600x400.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:400,&quot;width&quot;:600,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;A simple example of Client Server Model&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A simple example of Client Server Model" title="A simple example of Client Server Model" srcset="https://substackcdn.com/image/fetch/$s_!mKOm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66affc-06e8-42cf-884f-87c2e3b0cab4_600x400.jpeg 424w, https://substackcdn.com/image/fetch/$s_!mKOm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66affc-06e8-42cf-884f-87c2e3b0cab4_600x400.jpeg 848w, https://substackcdn.com/image/fetch/$s_!mKOm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66affc-06e8-42cf-884f-87c2e3b0cab4_600x400.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!mKOm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66affc-06e8-42cf-884f-87c2e3b0cab4_600x400.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>As consumer we would want our actions also technically known as requests to be executed as fast as possible which is the right of the customer.</p><h3>Synchronous Communication</h3><p>While simple to implement, synchronous communication in client-server systems suffers from several limitations that impact scalability and responsiveness. Each request blocks the server, occupying resources (like RAM) until the entire logic executes. This creates a single thread of execution, meaning the server can only handle one request at a time. In multi-process systems, this forces you to allocate a dedicated machine for each customer, even if their requests take minimal processing time.</p><p>This is why Synchronous communication can be disadvantageous for dynamic and scalable systems. This also brings in</p><ul><li><p>Inefficient use of compute power</p></li><li><p>Scalability bottlenecks &#8212; There is only so much machines that can be provisioned at a time</p></li></ul><h3>Asynchronous Communication</h3><p>In an asynchronous communication pattern, the server does not immediately return a response. Instead, it initiates the request and allows the client to continue execution without waiting. The processing can then happen concurrently on the server, and the client receives a notification or the processed information at a later date.</p><p>The detail lies in the implementation and if incorrectly implemented async await operations can be slower than synchronous communication patterns.</p><h2>Patterns of Asynchronous Communication</h2><p>Now that we understand that asynchronous patterns are essential for building a scalable system let us try and understand different patterns of communication.</p><ul><li><p>Request Reply Pattern</p></li><li><p>Publish Subscribe</p></li><li><p>Fire and Forget</p></li><li><p>Event Driven</p></li><li><p>Websockets</p></li></ul><h3>Request Reply pattern</h3><p>The request-reply asynchronous pattern allows a client to send a request to a server without waiting for an immediate response. This is the pattern that is closest to the synchronous request reply pattern. This frees the client to continue execution on other tasks while the server processes the request concurrently. Once processing is complete, the server sends a response back to the client, often through a callback function or message queue. This pattern is particularly beneficial for tasks involving network calls, database interactions, or any scenario where the client doesn&#8217;t need to wait for the server&#8217;s response to proceed. It improves responsiveness and throughput by allowing the client and server to work independently. However, it introduces additional complexity compared to synchronous communication, as the client needs a mechanism to handle the eventual response.</p><p>This pattern is generally implemented using async/await framework and the coroutines in languages such as python.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PNaf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d6231db-c45a-4006-bc30-47fac1eefd61_791x383.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PNaf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d6231db-c45a-4006-bc30-47fac1eefd61_791x383.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PNaf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d6231db-c45a-4006-bc30-47fac1eefd61_791x383.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PNaf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d6231db-c45a-4006-bc30-47fac1eefd61_791x383.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PNaf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d6231db-c45a-4006-bc30-47fac1eefd61_791x383.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PNaf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d6231db-c45a-4006-bc30-47fac1eefd61_791x383.jpeg" width="791" height="383" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0d6231db-c45a-4006-bc30-47fac1eefd61_791x383.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:383,&quot;width&quot;:791,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Source: https://learn.microsoft.com/en-us/azure/architecture/patterns/async-request-reply&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Source: https://learn.microsoft.com/en-us/azure/architecture/patterns/async-request-reply" title="Source: https://learn.microsoft.com/en-us/azure/architecture/patterns/async-request-reply" srcset="https://substackcdn.com/image/fetch/$s_!PNaf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d6231db-c45a-4006-bc30-47fac1eefd61_791x383.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PNaf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d6231db-c45a-4006-bc30-47fac1eefd61_791x383.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PNaf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d6231db-c45a-4006-bc30-47fac1eefd61_791x383.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PNaf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d6231db-c45a-4006-bc30-47fac1eefd61_791x383.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Publish Subscribe Pattern</h3><p>The Publish-Subscribe pattern also known as pub sub is an alternative pattern of asynchronous communication. The advantage of pub sub over request reply is that pub sub patterns allows for a loose coupling between publishers and subscribers.</p><p>The loose coupling is established by using a message broker component which uses topics to establish connection. The message broker efficiently routes the message to all interested subscribers. This pattern forms the backbone of microservices architecture.</p><p>Some common implementations are message queues and event buses. Some of the open source implementations for usage is the RabbitMQ, Apache Kafka.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!44kX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46203a48-3dc0-4115-a80d-98ca3fe395cb_1400x497.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!44kX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46203a48-3dc0-4115-a80d-98ca3fe395cb_1400x497.jpeg 424w, https://substackcdn.com/image/fetch/$s_!44kX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46203a48-3dc0-4115-a80d-98ca3fe395cb_1400x497.jpeg 848w, https://substackcdn.com/image/fetch/$s_!44kX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46203a48-3dc0-4115-a80d-98ca3fe395cb_1400x497.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!44kX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46203a48-3dc0-4115-a80d-98ca3fe395cb_1400x497.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!44kX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46203a48-3dc0-4115-a80d-98ca3fe395cb_1400x497.jpeg" width="1400" height="497" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/46203a48-3dc0-4115-a80d-98ca3fe395cb_1400x497.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:497,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Source: https://learn.microsoft.com/en-us/azure/architecture/patterns/publisher-subscriber&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Source: https://learn.microsoft.com/en-us/azure/architecture/patterns/publisher-subscriber" title="Source: https://learn.microsoft.com/en-us/azure/architecture/patterns/publisher-subscriber" srcset="https://substackcdn.com/image/fetch/$s_!44kX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46203a48-3dc0-4115-a80d-98ca3fe395cb_1400x497.jpeg 424w, https://substackcdn.com/image/fetch/$s_!44kX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46203a48-3dc0-4115-a80d-98ca3fe395cb_1400x497.jpeg 848w, https://substackcdn.com/image/fetch/$s_!44kX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46203a48-3dc0-4115-a80d-98ca3fe395cb_1400x497.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!44kX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46203a48-3dc0-4115-a80d-98ca3fe395cb_1400x497.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Fire and Forget Pattern</h3><p>The fire-and-forget pattern is a simple approach to asynchronous communication where a sender transmits a message without waiting for a response or confirmation. This pattern prioritizes sending the message quickly and efficiently, and the sender does not track its delivery status.</p><p>It&#8217;s often used for one-way tasks like sending logs, notifications, or initiating background processes. While fire-and-forget offers simplicity and speed, it lacks the guarantee of message delivery.</p><p>Common implementations include message queues, email clients, or any system that allows sending messages without requiring feedback. However, it&#8217;s crucial to consider the potential for lost messages and design your system accordingly, especially if reliable delivery is critical.</p><h3>Event Driven Pattern</h3><p>The event-driven pattern structures applications around the concept of events &#8212; significant occurrences within the system. Producers (components that trigger events) publish these events, carrying relevant data about the happenings. Consumers (components interested in these events) subscribe to specific events or categories.</p><p>When an event is published, the event broker efficiently routes it to all interested consumers. Consumers then process the event information to perform their designated tasks.</p><p>This loose coupling and asynchronous nature make event-driven systems highly scalable, responsive, and adaptable to changes. Common implementations include message brokers, event buses, and pub-sub systems configured to handle event routing and delivery.</p><p>The event-driven pattern is well-suited for microservices architectures, real-time applications, and scenarios where components need to react to changes in the system without tight dependencies on each other.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LONM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6d62460-2012-4243-9d02-3ea0422a5a81_414x295.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LONM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6d62460-2012-4243-9d02-3ea0422a5a81_414x295.jpeg 424w, https://substackcdn.com/image/fetch/$s_!LONM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6d62460-2012-4243-9d02-3ea0422a5a81_414x295.jpeg 848w, https://substackcdn.com/image/fetch/$s_!LONM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6d62460-2012-4243-9d02-3ea0422a5a81_414x295.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!LONM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6d62460-2012-4243-9d02-3ea0422a5a81_414x295.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LONM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6d62460-2012-4243-9d02-3ea0422a5a81_414x295.jpeg" width="414" height="295" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c6d62460-2012-4243-9d02-3ea0422a5a81_414x295.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:295,&quot;width&quot;:414,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;An example of event driven architecture Source: https://learn.microsoft.com/en-us/archive/msdn-magazine/2018/february/azure-event-driven-architecture-in-the-cloud-with-azure-event-grid&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="An example of event driven architecture Source: https://learn.microsoft.com/en-us/archive/msdn-magazine/2018/february/azure-event-driven-architecture-in-the-cloud-with-azure-event-grid" title="An example of event driven architecture Source: https://learn.microsoft.com/en-us/archive/msdn-magazine/2018/february/azure-event-driven-architecture-in-the-cloud-with-azure-event-grid" srcset="https://substackcdn.com/image/fetch/$s_!LONM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6d62460-2012-4243-9d02-3ea0422a5a81_414x295.jpeg 424w, https://substackcdn.com/image/fetch/$s_!LONM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6d62460-2012-4243-9d02-3ea0422a5a81_414x295.jpeg 848w, https://substackcdn.com/image/fetch/$s_!LONM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6d62460-2012-4243-9d02-3ea0422a5a81_414x295.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!LONM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6d62460-2012-4243-9d02-3ea0422a5a81_414x295.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Websockets</h3><p>WebSockets, the persistent two-way communication channels for web applications, thrive alongside asynchronous programming patterns. Here&#8217;s how they work together:</p><ul><li><p>Persistent Connection: Unlike traditional HTTP requests, WebSockets establish a long-lived connection between the client and server. This eliminates the need for repeated connection setup, improving efficiency.</p></li><li><p>Asynchronous Communication: Both client and server can send and receive messages asynchronously, meaning they don&#8217;t have to wait for a response before sending the next message. This allows for real-time data exchange without blocking the main application flow.</p></li><li><p>Event-Driven Model: WebSockets often leverage an event-driven approach. The server can push messages to the client, triggering event handlers on the client-side to react to the received data. This enables real-time updates and interactive experiences.</p></li></ul><h2>Conclusion</h2><p>While sync patterns are easy to implement async patterns bring real scalability to code that is written to bring software products to users.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://abinavr.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading ML Mindspace! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[How to deliver Business Value with AI Systems?]]></title><description><![CDATA[An introduction into MLOps Maturity models and how they influence the roadmaps of how management should think about deploying AI]]></description><link>https://abinavr.substack.com/p/how-to-deliver-business-value-with</link><guid isPermaLink="false">https://abinavr.substack.com/p/how-to-deliver-business-value-with</guid><dc:creator><![CDATA[Abinav R]]></dc:creator><pubDate>Sat, 05 Jul 2025 15:56:15 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Bvxm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327ea35-b4ef-47bd-86e9-6d093fd937ef_999x562.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Introduction</h2><p>If you also want AI systems to deliver business value, you have come to the right place. To deliver proper business value there needs to be a deep understanding of how to create reliable systems that can consistently deliver value. Having a couple of machine learning models that do well on notebooks but can&#8217;t be put into production does the opposite.</p><p>In this post, we will talk about how to think about a system that can deliver business value using machine learning effectively.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://abinavr.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading ML Mindspace! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h2>Maturity of Machine Learning</h2><p>To deliver value there is a need to understand where we stand and what we need to provide. There are multiple models of the Machine Learning Operations cycle that can help us understand this scenario. Out of the different maturity models, the Azure MLops maturity model is the one I could completely relate to in increasing order of complexity and milestones.</p><p>Since we are mostly concerned with designing machine learning systems in this post the emphasis from the Azure model is on the Model creation, Model release and application integration phase. The organization aspect of things isn&#8217;t covered in this post but is also a main pillar to ensure that there are teams of different strengths coming together to build a reliable system.</p><p>Since we are concerned with bringing a machine learning model to production the emphasis will be on Model creation, Model release and integration with the application. There is another aspect of building cross functional teams of various capacity which we will not delve into detail in this blog post as that is a post for another day.</p><p>The issues with most teams across the board is that data scientist generally come from a non engineering background and hence are required to learn skills beyond their paycheck and engineers need an understanding of machine learning which again exceeds their role capacity. The end result is that we have data scientist building a model and handing over to engineers to make it into deployable software into production.</p><p>While you can refer to the <a href="https://learn.microsoft.com/en-us/azure/architecture/ai-ml/guide/mlops-maturity-model">machine learning maturity model</a> here and maybe look at the images below from <a href="https://techcommunity.microsoft.com/t5/ai-machine-learning-blog/mlops-maturity-model-with-azure-machine-learning/ba-p/3520625">here</a>. I would go on to talk about stages of deployment.</p><h2>Stages of Machine Learning deployment</h2><h3>Minimum Deployable Product:</h3><p>Like in a startup where there is a minimum viable product on which there are iterations performed we should start thinking about Minimum deployable product which can get the customer some value and is a move towards the grand utopia of no manual intervention anywhere in the ML training cycle.</p><p>So let us start thinking about how to serve simple machine learning models into production first, the LLM world brings hardware challenges which is probably too much to aspire if the organisation hasn&#8217;t deployed even simple machine learning models.</p><p>We would have a machine learning model at this point in time this can be stored at a cloud storage location or at the server. The first step is to wrap an API with endpoints that can take requests and can then return an inference value of some meaning.</p><p>For example if the problem is a classification problem just returning a vector of 0 and 1 makes no sense to the end user. This API would do the conversion to possible categories and return value to the user that can be either consumed by the frontend client for display or by other services to do some processing.</p><p>In addition to the API we should add some testing in the code unit tests to ensure that functions work at an implementation level and integration tests so that we know that it works with the entire system. How to write these tests is not our main focus now. Add a CI pipeline where we can check for builds and tests in an automated fashion whenever we push code into the repository. This should offer some basic software testing reliability to a model that has not seen production.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Bvxm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327ea35-b4ef-47bd-86e9-6d093fd937ef_999x562.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Bvxm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327ea35-b4ef-47bd-86e9-6d093fd937ef_999x562.png 424w, https://substackcdn.com/image/fetch/$s_!Bvxm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327ea35-b4ef-47bd-86e9-6d093fd937ef_999x562.png 848w, https://substackcdn.com/image/fetch/$s_!Bvxm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327ea35-b4ef-47bd-86e9-6d093fd937ef_999x562.png 1272w, https://substackcdn.com/image/fetch/$s_!Bvxm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327ea35-b4ef-47bd-86e9-6d093fd937ef_999x562.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Bvxm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327ea35-b4ef-47bd-86e9-6d093fd937ef_999x562.png" width="999" height="562" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3327ea35-b4ef-47bd-86e9-6d093fd937ef_999x562.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:562,&quot;width&quot;:999,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Level 1&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Level 1" title="Level 1" srcset="https://substackcdn.com/image/fetch/$s_!Bvxm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327ea35-b4ef-47bd-86e9-6d093fd937ef_999x562.png 424w, https://substackcdn.com/image/fetch/$s_!Bvxm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327ea35-b4ef-47bd-86e9-6d093fd937ef_999x562.png 848w, https://substackcdn.com/image/fetch/$s_!Bvxm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327ea35-b4ef-47bd-86e9-6d093fd937ef_999x562.png 1272w, https://substackcdn.com/image/fetch/$s_!Bvxm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327ea35-b4ef-47bd-86e9-6d093fd937ef_999x562.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Automatic Retraining</h3><p>Now that we have a minimum deployable version which is available as a containerised deployment in a container registry we should probably take a look at how can we achieve the next feat of making the retraining process smooth, so that in case of issues with the deployed model we can automatically get the data, perform pre-processing and then do a training of the model using the newer data.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ntt3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3eced-2f60-406d-b39e-12391cbd8b6c_999x562.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ntt3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3eced-2f60-406d-b39e-12391cbd8b6c_999x562.png 424w, https://substackcdn.com/image/fetch/$s_!ntt3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3eced-2f60-406d-b39e-12391cbd8b6c_999x562.png 848w, https://substackcdn.com/image/fetch/$s_!ntt3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3eced-2f60-406d-b39e-12391cbd8b6c_999x562.png 1272w, https://substackcdn.com/image/fetch/$s_!ntt3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3eced-2f60-406d-b39e-12391cbd8b6c_999x562.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ntt3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3eced-2f60-406d-b39e-12391cbd8b6c_999x562.png" width="999" height="562" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6aa3eced-2f60-406d-b39e-12391cbd8b6c_999x562.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:562,&quot;width&quot;:999,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Level 3&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Level 3" title="Level 3" srcset="https://substackcdn.com/image/fetch/$s_!ntt3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3eced-2f60-406d-b39e-12391cbd8b6c_999x562.png 424w, https://substackcdn.com/image/fetch/$s_!ntt3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3eced-2f60-406d-b39e-12391cbd8b6c_999x562.png 848w, https://substackcdn.com/image/fetch/$s_!ntt3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3eced-2f60-406d-b39e-12391cbd8b6c_999x562.png 1272w, https://substackcdn.com/image/fetch/$s_!ntt3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3eced-2f60-406d-b39e-12391cbd8b6c_999x562.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Let us take a look at some of the components and why they would be needed at this stage.</p><ul><li><p>Data Pipelines and data contracts: With data pipeline and data contracts we can fetch very reliable data that meets the input requirements of the model and the data contracts can ensure that this happens in a very type safe fashion.</p></li><li><p>Data versioning: While we do retraining it is probably a good idea to maintain the version of the data using timestamps and other metadata requirements. Tools like DVC help us maintain versions and this is essential to create a reproducible training environment if there are issues with the training or any</p></li><li><p>Training pipelines: Building Machine learning pipelines where it is probably good practice to use orchestration to run the preprocessing, training and testing as a part of single flow. By using orchestration tools we can modularize the code and recognize if there is any issues in a particular module.</p></li><li><p>Model registry: Model registry can be thought of as a metadata store for models which can help version models, provide aliases, tag and annotate them, it provides an interface which solves when multiple versions and multiple models are produced by having something unique.</p></li><li><p>Machine Learning monitoring: While a full fledged monitoring is not required an observability framework that can monitor the drifts in models, data is required and maybe an alerting system which can notify when the threshold of performance is declining can be present so that there is a manual intervention from the team on whether the models need to be retrained or not.</p></li></ul><p>While these components can add complexity to the existing workflow it is necessary to remove obvious mistake when scale of model creation increases. The best way to approach this would be to have a team that can maintain these components as a ML platform and the data scientists can be their internal customer who can use the platform.</p><h3>Complete Automatic Machine Learning pipeline</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gas_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d60d196-6a7f-422c-b850-91facc694267_999x562.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gas_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d60d196-6a7f-422c-b850-91facc694267_999x562.png 424w, https://substackcdn.com/image/fetch/$s_!gas_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d60d196-6a7f-422c-b850-91facc694267_999x562.png 848w, https://substackcdn.com/image/fetch/$s_!gas_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d60d196-6a7f-422c-b850-91facc694267_999x562.png 1272w, https://substackcdn.com/image/fetch/$s_!gas_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d60d196-6a7f-422c-b850-91facc694267_999x562.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gas_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d60d196-6a7f-422c-b850-91facc694267_999x562.png" width="999" height="562" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3d60d196-6a7f-422c-b850-91facc694267_999x562.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:562,&quot;width&quot;:999,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Level 4&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Level 4" title="Level 4" srcset="https://substackcdn.com/image/fetch/$s_!gas_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d60d196-6a7f-422c-b850-91facc694267_999x562.png 424w, https://substackcdn.com/image/fetch/$s_!gas_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d60d196-6a7f-422c-b850-91facc694267_999x562.png 848w, https://substackcdn.com/image/fetch/$s_!gas_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d60d196-6a7f-422c-b850-91facc694267_999x562.png 1272w, https://substackcdn.com/image/fetch/$s_!gas_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d60d196-6a7f-422c-b850-91facc694267_999x562.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This stage is attained by very few companies where everything is automated and there is minimal manual involvement in making things work together. It is the utopia that people aim for when they start building an MLOps department. while there is minimal manual intervention needed in between components we would still need a team that can add or remove components perform some spring cleaning to keep the platform clean and technical requirements running up to data.</p><h2>Conclusion</h2><p>While the blog limits it within the maturity model, there needs to be a deep dive into each component and this can be extremely challenging. While MLOps is still not a matured field each deployment choice can have different effects on the end product. My aim with this article was to bring some thought into what are different stages and how a beginner can approach each stage depending on their specific requirements.</p><p>I havent covered the details of each component and that is something for the future. For starters I would recommend <a href="https://www.ravirajag.dev/">this blog series</a> for building a minimum deployable product version and then the journey deepens quite a bit.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://abinavr.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading ML Mindspace! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[How to build more secure ML models?]]></title><description><![CDATA[How to build more secure ML Systems? &#8212; Part 1 Data Poisoning]]></description><link>https://abinavr.substack.com/p/how-to-build-more-secure-ml-models-fcb38eec830f</link><guid isPermaLink="false">https://abinavr.substack.com/p/how-to-build-more-secure-ml-models-fcb38eec830f</guid><dc:creator><![CDATA[Abinav R]]></dc:creator><pubDate>Sun, 15 Oct 2023 14:13:37 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!1thV!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F288b225a-ba61-49f6-a480-e7c0525a4360_4272x2848.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3>How to build more secure ML Systems?&#8202;&#8212;&#8202;Part 1 Data Poisoning</h3><p>I have been building machine learning models for over 5 years now but now that I work with writing software for a huge company the most common thing I notice is that security is considered paramount so I started researching about what are the security risks when we build models what are the things that I can ignore when I just build a model using some dataset that I find doing a cursory google search and try and get people to use it. While my impression was that not much could go wrong, the reality reflects otherwise.</p><p>While building a model there are many possible security threats. Some of them that I found on my research&nbsp;are</p><ol><li><p>Data Poisoning</p></li><li><p>Model Tampering</p></li><li><p>Adversarial attacks</p></li><li><p>Data Exposure due to privacy&nbsp;loss</p></li></ol><p>In this blog post I would like to talk about each of the security threat what they are and what are some of practices that we can include in our workflow when we go about building a machine learning or deep learning model for our next use&nbsp;case.</p><h3>Data Poisoning</h3><p>Data poisoning is a type of security threat where the attacker intentionally manipulates the training data thus giving wrong model predictions or understanding wrong patterns of behaviour.</p><p>Data poisoning can occurs in various&nbsp;forms</p><h4>Inclusion of incorrect or manipulated data</h4><p>For example training a model which contains negative connotations of language can cause misunderstanding for the model in terms of correct political language.</p><h4>Flipping the labels of subset of data to create problems in model&nbsp;training</h4><p>Labels are primary source of ground truth for the input to mean something. If the labels of a subset of data are mixed up then the model while learning will combine features which aren&#8217;t meant to be combined.</p><p>A simple example will be what if I take MNIST dataset and in the training set rearaange the labels of the numbers calling some samples of 4 and 8 and flipping them 6 and 9 and flipping them. The model might not have a decent understanding of what features represent which&nbsp;number.</p><h4>data injection</h4><p>Data Injection is a data poisoning method where attacker can add new malicious data to modify the behavior of model during training causing it to do incorrect predictions in the inference time.</p><p>Example of such an attack is adding bias in data towards a certain outcome, one of the real life examples are where there was racial discrimination against a certain race in facial recognition models.</p><h4>feature manipulation</h4><p>This is a type of data poisoning where individual features or distribution of features have been modified to change the decision boundary of the classifier. These are slightly harder to detect as the data might be valid and free of&nbsp;errors.</p><p>Adding regularization in the model can generally make the model more robust to such feature manipulations. Also performing adversarial training can make the models more robust to feature manipulations.</p><h4>Practices to avoid data poisoning:</h4><ul><li><p>Preserving or securing data sources to a principal of least privilege as this would solve most issues regarding manipulation of&nbsp;data</p></li><li><p>Data validation by checking if the data input is correct and remove any bias if present in the&nbsp;data.</p></li><li><p>Model regularization and data augmentation can be good tools to expose machine learning to a variance that can limit the damage&nbsp;caused</p></li><li><p>Adversarial training is a method where some adversarial data is included to improve robustness during training&nbsp;process</p></li><li><p>Model monitoring to detect data&nbsp;drifts.</p></li></ul>]]></content:encoded></item><item><title><![CDATA[Terraform Hashicorp Associate exam: Study and exam]]></title><description><![CDATA[I passed my terraform hashicorp associate exam in the month of November 2022.]]></description><link>https://abinavr.substack.com/p/terraform-hashicorp-associate-exam-study-and-exam-57bb64040f6f</link><guid isPermaLink="false">https://abinavr.substack.com/p/terraform-hashicorp-associate-exam-study-and-exam-57bb64040f6f</guid><dc:creator><![CDATA[Abinav R]]></dc:creator><pubDate>Thu, 19 Jan 2023 18:45:07 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/962b97f9-e8c6-4dba-b700-34d5aeac4d94_1024x1024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I passed my terraform hashicorp associate exam in the month of November 2022. In this blog post I want to highlight the preparation time for different levels and what kind of questions to expect in the exam and what resources I used to pass the&nbsp;exam.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jXhq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f2d9de-f765-4f39-ac9f-3729b03bea10_1024x1024.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jXhq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f2d9de-f765-4f39-ac9f-3729b03bea10_1024x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!jXhq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f2d9de-f765-4f39-ac9f-3729b03bea10_1024x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!jXhq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f2d9de-f765-4f39-ac9f-3729b03bea10_1024x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!jXhq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f2d9de-f765-4f39-ac9f-3729b03bea10_1024x1024.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jXhq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f2d9de-f765-4f39-ac9f-3729b03bea10_1024x1024.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/17f2d9de-f765-4f39-ac9f-3729b03bea10_1024x1024.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!jXhq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f2d9de-f765-4f39-ac9f-3729b03bea10_1024x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!jXhq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f2d9de-f765-4f39-ac9f-3729b03bea10_1024x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!jXhq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f2d9de-f765-4f39-ac9f-3729b03bea10_1024x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!jXhq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f2d9de-f765-4f39-ac9f-3729b03bea10_1024x1024.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@ianjbattaglia?utm_source=medium&amp;utm_medium=referral">Ian Battaglia</a> on&nbsp;<a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><h3>How much of Terraform do you use on a day to day&nbsp;basis?</h3><p>Ask yourself this question, if you are a light user of terraform which means the scripts are already written by someone in the organization and all that needs to be done is to perform a terraform init, terraform plan and terraform apply then allocate about 6&#8211;8 weeks of time to understand the tool completely.</p><p>If you are a medium user of terraform where you make changes to the existing scripts and understand the concepts a little bit then allocate about 4&#8211;6 weeks of time for preparation of the&nbsp;exam.</p><p>If you write terraform on a day to day basis and are efficient with the documentation of terraform then this exam is easy and 2 weeks of browsing through the exam guide should help you pass the exam with&nbsp;ease.</p><h3>Resources:</h3><p>Resources used to prepare for the exam&nbsp;are</p><ol><li><p>A cloud guru lectures&#8202;&#8212;&#8202;This resource is good enough to understand the basic concepts of terraform and what each concept does, The labs are quite helpful to gain a practical insight into what is to be done and how to use different concepts being&nbsp;taught</p></li><li><p>Udemy Practice exams&#8202;&#8212;&#8202;This I felt was the most useful, most of the questions are very similar to ones being asked in the exam, though the time limit is a lot lenient it gives a good idea of how to approach the question and if something went wrong in the exam talks about what went wrong and what can be done to correct&nbsp;it.</p></li><li><p>Exam Guide from terraform&#8202;&#8212;&#8202;One of the very best and free resources to prepare for the exam, this and the udemy practice exams itself will be sufficient enough to get a deeper insight and crack the certification exam.</p></li></ol><h3>The Exam:</h3><p>The certification exam itself is for 60 minutes with 57 question so approximately 1 minute per question, some of them are pretty straight forward that the entire exam may not take that much time, I would suggest reading through the questions deeply as multiple choice correct answers might be tricky at&nbsp;times.</p><h3>Conclusion:</h3><p>Everything being said the exam is my first professional certification for a cloud tool and it was relatively smooth&nbsp;process.</p>]]></content:encoded></item><item><title><![CDATA[Challenges in Deploying Federated Learning Models]]></title><description><![CDATA[Difference between Federated learning and Normal Machine learning]]></description><link>https://abinavr.substack.com/p/challenges-in-deploying-federated-learning-models-22f92b0cb5f2</link><guid isPermaLink="false">https://abinavr.substack.com/p/challenges-in-deploying-federated-learning-models-22f92b0cb5f2</guid><dc:creator><![CDATA[Abinav R]]></dc:creator><pubDate>Sun, 07 Aug 2022 07:06:06 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/70232bee-ad7c-45a7-8634-d6559d467ccc_1024x120.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3>Difference between Federated learning and Normal Machine&nbsp;learning</h3><p>In normal machine Learning the data resides in a single source or is aggregated into a single source by certain ETL (extract, load and transform operations) by data engineers from multiple databases and then used to train a machine learning&nbsp;model.</p><p>In Federated learning the data doesn't leave the source of origin. There is a central server which is owned by Data scientists and the data sources are considered clients. Machine learning is done by decentralized communication and collecting only relevant model updates in the central&nbsp;server.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4Snx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13ab54-a488-4c9e-ade4-bae694417847_1024x120.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4Snx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13ab54-a488-4c9e-ade4-bae694417847_1024x120.png 424w, https://substackcdn.com/image/fetch/$s_!4Snx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13ab54-a488-4c9e-ade4-bae694417847_1024x120.png 848w, https://substackcdn.com/image/fetch/$s_!4Snx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13ab54-a488-4c9e-ade4-bae694417847_1024x120.png 1272w, https://substackcdn.com/image/fetch/$s_!4Snx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13ab54-a488-4c9e-ade4-bae694417847_1024x120.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4Snx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13ab54-a488-4c9e-ade4-bae694417847_1024x120.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/af13ab54-a488-4c9e-ade4-bae694417847_1024x120.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!4Snx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13ab54-a488-4c9e-ade4-bae694417847_1024x120.png 424w, https://substackcdn.com/image/fetch/$s_!4Snx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13ab54-a488-4c9e-ade4-bae694417847_1024x120.png 848w, https://substackcdn.com/image/fetch/$s_!4Snx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13ab54-a488-4c9e-ade4-bae694417847_1024x120.png 1272w, https://substackcdn.com/image/fetch/$s_!4Snx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13ab54-a488-4c9e-ade4-bae694417847_1024x120.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption"><strong>Conventional Machine learning workflow</strong> Image Source: <a href="https://deepai.org/publication/two-stage-optimization-for-machine-learning-workflow">https://deepai.org/publication/two-stage-optimization-for-machine-learning-workflow</a></figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TOsQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c71d921-f9c9-4b2f-8f3d-5b0e85977ba7_1024x683.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TOsQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c71d921-f9c9-4b2f-8f3d-5b0e85977ba7_1024x683.png 424w, https://substackcdn.com/image/fetch/$s_!TOsQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c71d921-f9c9-4b2f-8f3d-5b0e85977ba7_1024x683.png 848w, https://substackcdn.com/image/fetch/$s_!TOsQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c71d921-f9c9-4b2f-8f3d-5b0e85977ba7_1024x683.png 1272w, https://substackcdn.com/image/fetch/$s_!TOsQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c71d921-f9c9-4b2f-8f3d-5b0e85977ba7_1024x683.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TOsQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c71d921-f9c9-4b2f-8f3d-5b0e85977ba7_1024x683.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2c71d921-f9c9-4b2f-8f3d-5b0e85977ba7_1024x683.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!TOsQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c71d921-f9c9-4b2f-8f3d-5b0e85977ba7_1024x683.png 424w, https://substackcdn.com/image/fetch/$s_!TOsQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c71d921-f9c9-4b2f-8f3d-5b0e85977ba7_1024x683.png 848w, https://substackcdn.com/image/fetch/$s_!TOsQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c71d921-f9c9-4b2f-8f3d-5b0e85977ba7_1024x683.png 1272w, https://substackcdn.com/image/fetch/$s_!TOsQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c71d921-f9c9-4b2f-8f3d-5b0e85977ba7_1024x683.png 1456w" sizes="100vw"></picture><div></div></div></a><figcaption class="image-caption"><strong>Federated Learning</strong> Image Source: <a href="https://federated.fastforwardlabs.com/">https://federated.fastforwardlabs.com/</a></figcaption></figure></div><h3>Advantages of Federated learning</h3><p>Federated learning can be used when data are locked due to several factors such as compliance, location, regulation etc. To do Machine learning on such data in a normal setting is not possible as the data cannot leave the source and distributed training with preserving privacy becomes an advantage in the favour of using Machine learning.</p><h3>Use cases of Federated Learning</h3><p>This above-mentioned advantages lead us to think about various use-cases in the field&nbsp;of</p><ul><li><p>Healthcare</p></li><li><p>Insurance</p></li><li><p>Fintech</p></li><li><p>IoT</p></li><li><p>Industries for doing predictive maintenance</p></li></ul><p>In all of the above cases there is a need for privacy and getting the data out of the source can be very cumbersome.</p><h3>Problem with deploying Federated Learning</h3><p><a href="https://research.google/pubs/pub47586/">Federated Learning in Google board</a> is a good example of how it is being deployed in the real world. However, there is a difference between the Google board use-case and the use-cases mentioned above.</p><p>The difference lies in the ownership of the source data. In most of the general cases where privacy is required the ownership differs from the person performing machine learning on the&nbsp;data.</p><p>This means that a part of the machine learning pipeline which is cleaning of the data and selecting the features needs to be done on the data owner side before allowing the learner to create a model on the data. This involves the separation of responsibility between the two&nbsp;sides.</p><p>The above situation is very similar to a front-end engineer and back-end engineer when they don't have a common API specification to talk to each other. In Machine learning feature engineering and exploratory data analysis help in the understanding of the data. With just selected features being available to the learner it becomes very difficult to understand what those features are and how an efficient model can be&nbsp;made.</p><p>Problems can also arise during communication and this may cause incorrect data to be sent to learn. The cost is also high compared to normal machine learning as two individual people with specific skills are required to complete the task at&nbsp;hand.</p><h3>How to solve this&nbsp;issue?</h3><p>The issue can be solved by both parties coming together and deciding on a general type specification on how the data should look like and what would be the necessary features (Again may be quite unproductive since there is the cost of two people involved). But that is the best possible solution as of&nbsp;now</p><h4>Use-cases where ownership of data remains the&nbsp;same</h4><p>However, the above issue will not exist in use-cases where the data collection is being done by an application which is being deployed by the owner of the server. When the application inputs and outputs are defined the data is generally of a certain structure and it is easy to run federated learning and deploy it with&nbsp;ease.</p><h4>Data Standard specification</h4><p>The other way of solving the communication issue is setting of a standard specification for different data types (tabular, image, text, audio) imposing requirements of certain fields can solve the communication problem.</p>]]></content:encoded></item><item><title><![CDATA[4 ways to get started with a codebase]]></title><description><![CDATA[At the beginning of my career, I always got stuck on seeing multiple files and modules since as beginners we just practise by programming everything in a single file and get started from there.]]></description><link>https://abinavr.substack.com/p/how-to-get-started-with-a-codebase-a4884e5bc31f</link><guid isPermaLink="false">https://abinavr.substack.com/p/how-to-get-started-with-a-codebase-a4884e5bc31f</guid><dc:creator><![CDATA[Abinav R]]></dc:creator><pubDate>Wed, 13 Apr 2022 15:24:14 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/518b818d-6b32-43e7-8d40-c90b0b4fdbf3_1024x640.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>At the beginning of my career, I always got stuck on seeing multiple files and modules since as beginners we just practise by programming everything in a single file and get started from there. The moment there are multiple files and imports things get confusing for the beginner. In this post, I transfer the sane advice that my mentor gave me for understanding the functionality of a&nbsp;codebase</p><p>The expected skills are using a debugger in the language used and a basic understanding of the features of any language (for loops will be for loops in any language and if conditions will be if conditions, the syntax might change but the basic idea is the&nbsp;same)</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!59db!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71aac350-5146-471d-88f0-613e83642cc1_1024x640.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!59db!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71aac350-5146-471d-88f0-613e83642cc1_1024x640.jpeg 424w, https://substackcdn.com/image/fetch/$s_!59db!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71aac350-5146-471d-88f0-613e83642cc1_1024x640.jpeg 848w, https://substackcdn.com/image/fetch/$s_!59db!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71aac350-5146-471d-88f0-613e83642cc1_1024x640.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!59db!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71aac350-5146-471d-88f0-613e83642cc1_1024x640.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!59db!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71aac350-5146-471d-88f0-613e83642cc1_1024x640.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/71aac350-5146-471d-88f0-613e83642cc1_1024x640.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!59db!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71aac350-5146-471d-88f0-613e83642cc1_1024x640.jpeg 424w, https://substackcdn.com/image/fetch/$s_!59db!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71aac350-5146-471d-88f0-613e83642cc1_1024x640.jpeg 848w, https://substackcdn.com/image/fetch/$s_!59db!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71aac350-5146-471d-88f0-613e83642cc1_1024x640.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!59db!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71aac350-5146-471d-88f0-613e83642cc1_1024x640.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@pankajpatel?utm_source=medium&amp;utm_medium=referral">Pankaj Patel</a> on&nbsp;<a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><h3>Tests</h3><p>Tests in a codebase are generally a good starting point since they outline what the functionality is and test with an example. The tests usually contain an example input and assert statements confirming the type of the output or the expected output itself. This helps understand the input-output relation for a particular function. Now that is cleared the next step is to read the function to understand what exactly the function does and how it does&nbsp;it.</p><p>For this, I prefer using the debugger with the test. It is possible to create breakpoints in the function and understand what transformations are happening to the data while passing through the function.</p><p>Now for a scenario that is very common, what if there are no tests in the codebase?</p><h3>Examples</h3><p>If there are no tests in the codebase the next thing to do is to check examples of usage of functions, for this you need your nearest mentor but then they can point you to where the module ends up getting used and follow the steps in the previous example with a debugger to get a detailed understanding of the&nbsp;code.</p><h3>Documentation</h3><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5R-V!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b3604c-b985-4539-8375-6bfbf8d180e0_1024x683.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5R-V!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b3604c-b985-4539-8375-6bfbf8d180e0_1024x683.jpeg 424w, https://substackcdn.com/image/fetch/$s_!5R-V!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b3604c-b985-4539-8375-6bfbf8d180e0_1024x683.jpeg 848w, https://substackcdn.com/image/fetch/$s_!5R-V!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b3604c-b985-4539-8375-6bfbf8d180e0_1024x683.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!5R-V!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b3604c-b985-4539-8375-6bfbf8d180e0_1024x683.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5R-V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b3604c-b985-4539-8375-6bfbf8d180e0_1024x683.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/79b3604c-b985-4539-8375-6bfbf8d180e0_1024x683.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!5R-V!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b3604c-b985-4539-8375-6bfbf8d180e0_1024x683.jpeg 424w, https://substackcdn.com/image/fetch/$s_!5R-V!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b3604c-b985-4539-8375-6bfbf8d180e0_1024x683.jpeg 848w, https://substackcdn.com/image/fetch/$s_!5R-V!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b3604c-b985-4539-8375-6bfbf8d180e0_1024x683.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!5R-V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b3604c-b985-4539-8375-6bfbf8d180e0_1024x683.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@sigmund?utm_source=medium&amp;utm_medium=referral">Sigmund</a> on&nbsp;<a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>Sometimes the documentation is the best place to start, there are many examples of great documented resources, most large python libraries are documented in a great way as also frameworks like docker and Kubernetes. This document contains basic examples of how to use their software. Something similar should exist for internal software and if they do exists is a good place to&nbsp;start.</p><h3>Pair Program</h3><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vkwk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b05ba5d-33c8-458e-9d9a-0b8e72be4830_1024x683.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vkwk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b05ba5d-33c8-458e-9d9a-0b8e72be4830_1024x683.jpeg 424w, https://substackcdn.com/image/fetch/$s_!vkwk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b05ba5d-33c8-458e-9d9a-0b8e72be4830_1024x683.jpeg 848w, https://substackcdn.com/image/fetch/$s_!vkwk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b05ba5d-33c8-458e-9d9a-0b8e72be4830_1024x683.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!vkwk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b05ba5d-33c8-458e-9d9a-0b8e72be4830_1024x683.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vkwk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b05ba5d-33c8-458e-9d9a-0b8e72be4830_1024x683.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1b05ba5d-33c8-458e-9d9a-0b8e72be4830_1024x683.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!vkwk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b05ba5d-33c8-458e-9d9a-0b8e72be4830_1024x683.jpeg 424w, https://substackcdn.com/image/fetch/$s_!vkwk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b05ba5d-33c8-458e-9d9a-0b8e72be4830_1024x683.jpeg 848w, https://substackcdn.com/image/fetch/$s_!vkwk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b05ba5d-33c8-458e-9d9a-0b8e72be4830_1024x683.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!vkwk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b05ba5d-33c8-458e-9d9a-0b8e72be4830_1024x683.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@alvarordesign?utm_source=medium&amp;utm_medium=referral">Alvaro Reyes</a> on&nbsp;<a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>This is a very fail-safe way since other points mentioned in the post may or may not be available. It is preferable to request some time from the code owner (The guy who maintains or is responsible for the functionality) to show the ropes around the codebase.</p><p>If the code base is too big then this can take a lot of time from that person so make sure to get the examples and starting points of usage so that it is easier to get&nbsp;started.</p><h3>Conclusion</h3><p>I hope this helps in understanding how to approach a new codebase as a beginner. The debugger (sometimes print statements) is a very useful skill to learn. If you have better ideas on how to go through a codebase please mention them in the comments&nbsp;section.</p>]]></content:encoded></item><item><title><![CDATA[My first job in a tech startup-A retrospective]]></title><description><![CDATA[Recently I took up a new offer to move jobs.]]></description><link>https://abinavr.substack.com/p/my-first-job-in-a-tech-startup-a-retrospective-ae0e3113eee0</link><guid isPermaLink="false">https://abinavr.substack.com/p/my-first-job-in-a-tech-startup-a-retrospective-ae0e3113eee0</guid><dc:creator><![CDATA[Abinav R]]></dc:creator><pubDate>Sat, 26 Mar 2022 23:14:15 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/5c0a218b-d8f3-49c0-8678-4ae252ce1720_1024x683.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Recently I took up a new offer to move jobs. These are my learnings from being one of the early employees at a&nbsp;startup.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PkxW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb8b79a-ad27-4d92-8450-2c6ecb27a544_1024x683.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PkxW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb8b79a-ad27-4d92-8450-2c6ecb27a544_1024x683.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PkxW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb8b79a-ad27-4d92-8450-2c6ecb27a544_1024x683.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PkxW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb8b79a-ad27-4d92-8450-2c6ecb27a544_1024x683.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PkxW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb8b79a-ad27-4d92-8450-2c6ecb27a544_1024x683.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PkxW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb8b79a-ad27-4d92-8450-2c6ecb27a544_1024x683.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1fb8b79a-ad27-4d92-8450-2c6ecb27a544_1024x683.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!PkxW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb8b79a-ad27-4d92-8450-2c6ecb27a544_1024x683.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PkxW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb8b79a-ad27-4d92-8450-2c6ecb27a544_1024x683.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PkxW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb8b79a-ad27-4d92-8450-2c6ecb27a544_1024x683.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PkxW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb8b79a-ad27-4d92-8450-2c6ecb27a544_1024x683.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@marvelous?utm_source=medium&amp;utm_medium=referral">Marvin Meyer</a> on&nbsp;<a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><h3>Business Impact is Important:</h3><p>As a Junior Engineer at a small startup that is growing, from the get-go, it is important to be learning and implementing stuff that is required for the business rather than going on tangents and pursuing what seems fascinating tech-wise. In a world where distractions are the new norm, it is quite easy to propose new features and ideas which don't affect the business&nbsp;outcome.</p><p>The shift in mindset between doing research at the university with multiple ideas and validation for those ideas is not possible in a company as they cost time and resources which a startup especially are quite lean on. Building products at a startup requires a different thinking process and it is important to adapt and move&nbsp;fast.</p><h3>Visibility:</h3><p>Even if you are stuck in doing stuff that doesn't matter to business anymore it is important to be visible to the team. This can be done by performing presentations on what is being worked on with a focus on if and how it can affect the product in the short term, long term or the medium term. So if you are doing some research you can present it in a way that shows a new vision or roadmap. Also, organize some activities for the team to do together like a hike, some sports, cooking for each other etc( if you can cook). This can help show that you are helping in fostering the culture of the team and is an important factor.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3rkx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc0c655-a5d3-460b-a612-a12e5b1b02f7_1024x681.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3rkx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc0c655-a5d3-460b-a612-a12e5b1b02f7_1024x681.jpeg 424w, https://substackcdn.com/image/fetch/$s_!3rkx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc0c655-a5d3-460b-a612-a12e5b1b02f7_1024x681.jpeg 848w, https://substackcdn.com/image/fetch/$s_!3rkx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc0c655-a5d3-460b-a612-a12e5b1b02f7_1024x681.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!3rkx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc0c655-a5d3-460b-a612-a12e5b1b02f7_1024x681.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3rkx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc0c655-a5d3-460b-a612-a12e5b1b02f7_1024x681.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/acc0c655-a5d3-460b-a612-a12e5b1b02f7_1024x681.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!3rkx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc0c655-a5d3-460b-a612-a12e5b1b02f7_1024x681.jpeg 424w, https://substackcdn.com/image/fetch/$s_!3rkx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc0c655-a5d3-460b-a612-a12e5b1b02f7_1024x681.jpeg 848w, https://substackcdn.com/image/fetch/$s_!3rkx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc0c655-a5d3-460b-a612-a12e5b1b02f7_1024x681.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!3rkx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc0c655-a5d3-460b-a612-a12e5b1b02f7_1024x681.jpeg 1456w" sizes="100vw"></picture><div></div></div></a><figcaption class="image-caption">Stand out in a crowd&#8202;&#8212;&#8202;PC Pexels.com</figcaption></figure></div><h3>Be agile and Move&nbsp;fast:</h3><p>By means of being agile, I don't refer to the software development philosophy of breaking things fast and fixing them fast. What I mean here is that if there is something that is needed to be learnt instead of doing a complete course or a certification it can take time. Just learning what is necessary for the task at hand and building a Proof of concept would do you and the company a world of good since there is not much time to learn stuff in detail. When a POC is established and breaks in production then there is a need to learn and implement the other details, not&nbsp;before.</p><h3>Done is better than&nbsp;perfect:</h3><p>In Academia we are taught perfection is the way to go forward in life. However, the real world is completely the opposite. If there is a task it is better completed with imperfections that can be creased out later than incomplete with components being perfect. If there is a feature to be implemented, implement it in a brute force method at first and get something working. There will be a time in the future to make things&nbsp;perfect.</p><blockquote><p>&#8220;Premature optimization is the root of all evil&#8221;&#8202;&#8212;&#8202;<a href="https://ubiquity.acm.org/article.cfm?id=1513451">Sir Tony Hoare popularized by Donald&nbsp;Knuth</a></p></blockquote><p>As you grow in experience it becomes important to turn these initial POCs into something structurally sensible before writing code, but as a junior engineer, it is important to have something rather than the perfect&nbsp;thing.</p><h3>Communication is&nbsp;Key:</h3><p>It is important to understand that time is money, it is better off to ask for help when you are stuck at something for more than 4 hours, 4 hours can be the time to check google and implement the plethora of solutions that google offer if the problem still persists it is important to ask for help and resolve the issue as fast as possible as it becomes awkward as a junior to ask for help when you have been reassuring the supervisor that all is well and progress is being done. Asking for help makes you stronger over a period of time. Also at work, there is no test to check who is accomplishing everything by themselves.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!l2DF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb992a9aa-a30f-4dcd-b66b-44229247257c_1024x768.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!l2DF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb992a9aa-a30f-4dcd-b66b-44229247257c_1024x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!l2DF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb992a9aa-a30f-4dcd-b66b-44229247257c_1024x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!l2DF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb992a9aa-a30f-4dcd-b66b-44229247257c_1024x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!l2DF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb992a9aa-a30f-4dcd-b66b-44229247257c_1024x768.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!l2DF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb992a9aa-a30f-4dcd-b66b-44229247257c_1024x768.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b992a9aa-a30f-4dcd-b66b-44229247257c_1024x768.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!l2DF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb992a9aa-a30f-4dcd-b66b-44229247257c_1024x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!l2DF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb992a9aa-a30f-4dcd-b66b-44229247257c_1024x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!l2DF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb992a9aa-a30f-4dcd-b66b-44229247257c_1024x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!l2DF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb992a9aa-a30f-4dcd-b66b-44229247257c_1024x768.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@brett_jordan?utm_source=medium&amp;utm_medium=referral">Brett Jordan</a> on&nbsp;<a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><h3>Try and document everything possible:</h3><p>This is a life hack and not just an early-career hack, Maintain a log wherein you can document the process and the approach without delving too much into the confidential details. In engineering, we can always abstract the problem and frame it in a general sense. This log can even be used when we move on to the next company. I started doing this quite late in my job. A better way to implement this would be to include it as a part of the daily routine. At the end of each day&#8217;s work just have a personal notebook or any apps and just note down the day&#8217;s challenge, situation and solution.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8OHF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F863253f3-6420-48e9-ae9d-df010abf583f_1024x683.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8OHF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F863253f3-6420-48e9-ae9d-df010abf583f_1024x683.jpeg 424w, https://substackcdn.com/image/fetch/$s_!8OHF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F863253f3-6420-48e9-ae9d-df010abf583f_1024x683.jpeg 848w, https://substackcdn.com/image/fetch/$s_!8OHF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F863253f3-6420-48e9-ae9d-df010abf583f_1024x683.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!8OHF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F863253f3-6420-48e9-ae9d-df010abf583f_1024x683.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8OHF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F863253f3-6420-48e9-ae9d-df010abf583f_1024x683.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/863253f3-6420-48e9-ae9d-df010abf583f_1024x683.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!8OHF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F863253f3-6420-48e9-ae9d-df010abf583f_1024x683.jpeg 424w, https://substackcdn.com/image/fetch/$s_!8OHF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F863253f3-6420-48e9-ae9d-df010abf583f_1024x683.jpeg 848w, https://substackcdn.com/image/fetch/$s_!8OHF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F863253f3-6420-48e9-ae9d-df010abf583f_1024x683.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!8OHF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F863253f3-6420-48e9-ae9d-df010abf583f_1024x683.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@sigmund?utm_source=medium&amp;utm_medium=referral">Sigmund</a> on&nbsp;<a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><h3>Request responsibility:</h3><p>It is always unclear on whose responsibility is what in a small group and everyone is expected to pick up something and run with it. It is important to show dedication and commitment by requesting things not under your purview to demonstrate team ability. As a developer, this means that if a team member is sick or on vacation pick up their work and perform it to the best of our ability. This can be solving immediate issues relating to a component, not under your ownership.</p><p>What this would certainly do is improve the understanding of the system and leads to better education and self-improvement.</p><h3>Conclusion</h3><p>These are the simple things that I have learnt being in an organization for over 2.75 years starting from a student to a full-time employee. Hopefully, this helps in those transitioning from academia to the industry. Some points may be relevant for bigger companies too.</p>]]></content:encoded></item></channel></rss>