<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shailendra Bhatt on Medium]]></title>
        <description><![CDATA[Stories by Shailendra Bhatt on Medium]]></description>
        <link>https://medium.com/@bhattshailendra?source=rss-960757890ef9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*Wai14vme-alVGKH3Nd3M9Q.jpeg</url>
            <title>Stories by Shailendra Bhatt on Medium</title>
            <link>https://medium.com/@bhattshailendra?source=rss-960757890ef9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 08:39:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bhattshailendra/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Part 3: Next-Gen Personal Running and Health Coach: Smarter AI, Deeper Insights, and Context-Aware…]]></title>
            <link>https://bhattshailendra.medium.com/part-3-next-gen-personal-running-and-health-coach-smarter-ai-deeper-insights-and-context-aware-99ecd4f0f3f5?source=rss-960757890ef9------2</link>
            <guid isPermaLink="false">https://medium.com/p/99ecd4f0f3f5</guid>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[multimodal-ai]]></category>
            <category><![CDATA[running]]></category>
            <category><![CDATA[writing-prompts]]></category>
            <category><![CDATA[openai]]></category>
            <dc:creator><![CDATA[Shailendra Bhatt]]></dc:creator>
            <pubDate>Mon, 15 Sep 2025 11:59:57 GMT</pubDate>
            <atom:updated>2025-09-15T11:59:57.720Z</atom:updated>
            <content:encoded><![CDATA[<h3>Part 3: Next-Gen Personal Running and Health Coach: Smarter AI, Deeper Insights, and Context-Aware Analytics</h3><p>Part 1 — <a href="https://medium.com/@bhattshailendra/extracting-running-data-out-of-nrc-nike-nike-run-club-using-apis-bcee76a714c3">https://medium.com/@bhattshailendra/extracting-running-data-out-of-nrc-nike-nike-run-club-using-apis-bcee76a714c3</a></p><p>Part 2 — <a href="https://medium.com/@bhattshailendra/from-extracting-running-data-to-transforming-it-into-ai-powered-insights-with-nike-nrc-strava-0f19742b2f11">https://medium.com/@bhattshailendra/from-extracting-running-data-to-transforming-it-into-ai-powered-insights-with-nike-nrc-strava-0f19742b2f11</a></p><p>Building on Part 2’s foundation of extracting, embedding, and querying running data from Nike NRC, Strava, Garmin, and OpenAI-powered vector search, in this part I have expanded the application to incorporate multimodal data, contextual external knowledge, and agentic tooling for more accurate AI insights.</p><p>My architecture now does the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U-BZzXHAK7u3Q-3YynJF2Q.png" /><figcaption>Personal Running and Health Recommendation using Open AI GPT 5 Multi Model Architecture</figcaption></figure><p><strong><em>Step 1 — </em></strong><em>Multiple running, knowledge based and health data sources are ingested and normalized into the back-end.</em></p><p><strong><em>Step 2 — </em></strong><em>Data — including multi-modal records are embedded and stored in the vector database.</em></p><p><strong><em>Step 3 — </em></strong><em>User queries are routed through the chat app initiate vector-based similarity searches for pertinent personal data.</em></p><p><strong><em>Step4 — </em></strong><em>The OpenAI GPT-5 LLM synthesizes responses, enhanced by injected external knowledge and agentic tool outputs.</em></p><p><strong><em>Step 5 — </em></strong><em>Insights and predictions are returned in conversational form, evolving with feedback and new data.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99ecd4f0f3f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 2 : From Extracting Running Data to transforming it into AI-Powered Insights with Nike NRC…]]></title>
            <link>https://bhattshailendra.medium.com/from-extracting-running-data-to-transforming-it-into-ai-powered-insights-with-nike-nrc-strava-0f19742b2f11?source=rss-960757890ef9------2</link>
            <guid isPermaLink="false">https://medium.com/p/0f19742b2f11</guid>
            <category><![CDATA[nike]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[gpt-5]]></category>
            <category><![CDATA[vector-database]]></category>
            <category><![CDATA[strava]]></category>
            <dc:creator><![CDATA[Shailendra Bhatt]]></dc:creator>
            <pubDate>Sun, 14 Sep 2025 09:21:17 GMT</pubDate>
            <atom:updated>2025-09-15T15:08:41.818Z</atom:updated>
            <content:encoded><![CDATA[<h3>Part 2 : From Extracting Running Data to transforming it into AI-Powered Insights with Nike NRC, Strava and OpenAI</h3><p><strong>Part 1 </strong>→<a href="https://bhattshailendra.medium.com/extracting-running-data-out-of-nrc-nike-nike-run-club-using-apis-bcee76a714c3"> https://bhattshailendra.medium.com/extracting-running-data-out-of-nrc-nike-nike-run-club-using-apis-bcee76a714c3</a></p><p><strong>Part 3 </strong>→ <a href="https://bhattshailendra.medium.com/part-3-next-gen-personal-running-and-health-coach-smarter-ai-deeper-insights-and-context-aware-99ecd4f0f3f5">https://bhattshailendra.medium.com/part-3-next-gen-personal-running-and-health-coach-smarter-ai-deeper-insights-and-context-aware-99ecd4f0f3f5</a></p><p>Few years back during Covid in <a href="https://www.shailendrabhatt.com/2020/11/extracting-running-data-out-of-nrcnike.html">my first article</a>, I explained how to extract running data from Nike NRC using public endpoints and basic API scripts. At that time, this was a step up from manual tracking, a way to view runs, pace, and totals using dashboards and exported files. Seeing progress week-to-week and analyzing simple trends locally felt empowering and encouraging to go back to do the next run. Also, back then running api’s were publically available, which they no longer are and that was another reason to store this information locally for future references.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*pVb4B9zUKa1kOJ_vgi8nsw.png" /></figure><p>In this article, I am trying to move beyond static tracking to an autonomous coach that suggests plans in real-time based on historical data. Instead of just visualizing past metrics in dashboards, I have tried using OpenAI’s models (GPT-5) and vector search databases to analyze my performance. The idea was to use the tools to correlate training variables and create predictions for upcoming runs, all based on my own historical data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*0DN-jdf3eUB9foqFoXqqww.png" /></figure><p>Leveraging OpenAI’s LLMs, I added chat-based analysis — so the app answers training questions in natural language instead of just showing numbers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/0*t0Cw43F8X7Nsg-jf.png" /></figure><p><strong>Step 1:</strong> The first step was bringing together Nike NRC, Strava data into a unified dataset. After several manually exporting activity logs, I finally automated the pipeline for both Nike NRC and Strava using API’s. The updated codebase is present here → <a href="https://github.com/shailendrabhatt/runanalysis-usingopenai">https://github.com/shailendrabhatt/runanalysis-usingopenai</a></p><p><strong>Step 2: </strong>The next step was feeding the data into a Vector database. All summary of runs are sent to the Open AI’s embedding endpoint.</p><p><strong><em>var embeddingPayload = new { input = runSummary, model = “” };var response = await httpClient.PostAsJsonAsync(“https://api.openai.com/v1/embeddings&quot;, embeddingPayload);var embedding = await response.Content.ReadFromJsonAsync&lt;EmbeddingResponse&gt;();</em></strong></p><p>For semantic analysis, runs and embeddings are indexed using a vector database</p><p><strong>Step 3: </strong>The application features a chat window. When prompted about my running trends or wanting any advice, the chat backend sends context data with the query to the OpenAI endpoint:</p><p><strong><em>var gptRequest = new { model = “gpt-4-turbo”, messages = new[] { new { role = “system”, content = “You are a running coach.” }, new { role = “user”, content = “Analyze my last four days of training and suggest improvements.” } } };var resp = await httpClient.PostAsJsonAsync(“https://api.openai.com/v1/chat/completions&quot;, gptRequest);</em></strong></p><p>By integrating OpenAI’s GPT-based models as a chat interface on top of my fitness vector database, I can now do more than just browse charts:</p><figure><img alt="Front end chat window" src="https://cdn-images-1.medium.com/max/714/1*fQEozFJK8pYit9RVMTYDtw.png" /></figure><p>I ask, “When did I last have a similar training block to this month?”, and the LLM summarizes and compares periods — even if I don’t remember the dates or specific workouts.</p><p>Even questions like, “Did my pace improve after switching shoes?” or “Which kind of recovery week led to my highest VO2max gains?” The LLM pulls contextually relevant vectors (embeddings) from the DB that has almost 10 years of my running information, draws parallels and trends, and gives coherent, actionable feedback.</p><p>I have now started to actually trigger the query just before a workout to evaluate how long I should do that specific run. The next step is to fetch the Garmin data, which seems to be a tricky case and then integrate the heart rate, stress levels to get more accurate feedback. Also, would be nice to use solutions to improve accuracy of the responses.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0f19742b2f11" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Hidden Carbon Cost when Working Remote]]></title>
            <link>https://bhattshailendra.medium.com/the-hidden-carbon-cost-when-working-remote-b652281b9f65?source=rss-960757890ef9------2</link>
            <guid isPermaLink="false">https://medium.com/p/b652281b9f65</guid>
            <category><![CDATA[carbon-emissions]]></category>
            <category><![CDATA[carbon-footprint]]></category>
            <category><![CDATA[sustainability]]></category>
            <category><![CDATA[sustainable-development]]></category>
            <category><![CDATA[work-life-balance]]></category>
            <dc:creator><![CDATA[Shailendra Bhatt]]></dc:creator>
            <pubDate>Tue, 19 Nov 2024 09:52:36 GMT</pubDate>
            <atom:updated>2024-11-19T09:52:36.871Z</atom:updated>
            <content:encoded><![CDATA[<p>As part of an Organization that has sustainability as one of its top agenda , I’ve been closely examining the environmental impact of remote work, and the results are not as straightforward as many might assume. While initial studies painted a rosy picture of reduced emissions due to eliminated commutes, a more nuanced personal analysis reveals that working from home may , in a lot of cases, lead to higher CO2 emissions than traditional office work.</p><p>Since I live in Sweden, a cold country, this analysis seems even more true, considering the high number of dark and cold months in a calendar year. Let me try to break this down into real-world numbers. Let me try to take an example of how sustainable I am as an Architect when it comes to working from the office or from home.</p><p><strong>Carbon Emission Numbers when working from the office</strong></p><p>For a day when I am working from the office with proper sustainable practices (walking commute, single screen use, no overtime, reusable coffee mug, no printing), I calculated my daily CO2 emissions of 14.3 kg.</p><p>This includes approximately 6 kg from office energy use, 2.4 kg from computer usage, and other small contributions from digital activities and shared resources like sending emails, taking video calls, etc.</p><p>My reference for the data is from articles that support how remote working reduces CO2 footprint.</p><p>Also, for the fact that like most modern offices, the office I work at also offers green building technologies, and energy-efficient workspaces leading to sustainable corporate facilities.</p><p><a href="https://www.sciencedaily.com/releases/2023/09/230918153242.htm">https://www.sciencedaily.com/releases/2023/09/230918153242.htm</a></p><p><a href="https://allwork.space/2023/09/digest-remote-works-green-potential-can-working-from-home-slash-carbon-emissions/">https://allwork.space/2023/09/digest-remote-works-green-potential-can-working-from-home-slash-carbon-emissions/</a></p><p><a href="https://www.anthropocenemagazine.org/2023/09/remote-work-is-better-for-the-climate-but-mainly-in-large-doses/">https://www.anthropocenemagazine.org/2023/09/remote-work-is-better-for-the-climate-but-mainly-in-large-doses/</a></p><p><strong>Carbon Emission Numbers when Working Remote</strong></p><p>In contrast, when I work from home initially it appeared to have lower emissions at 10.7 kg CO2 per day based on the above factors. However, when I factor in the limitations and long-term impacts of remote work, the numbers change dramatically. Let me detail out</p><p>1. <strong>Basic home energy use</strong>: Electricity for computer and multiple screens: 2.0 kWh/day, CO2 emissions: 0.512 kg CO2/day</p><p>2. <strong>Heating/Cooling (year-round average, Sweden is a cold country still keeping the numbers low)</strong>: 50 kWh/day (assuming less efficient home HVAC) CO2 emissions: 9.2 kg CO2/day</p><p>3. <strong>Additional residential energy use</strong>: Cooking, appliances, increased device usage. Estimated additional 2 kWh/day, CO2 emissions: 0.512 kg CO2/day</p><p>4. <strong>Inefficiencies due to work-from-home disadvantages</strong>:</p><p>a. <strong>Communication delays</strong> (1.5 hours/day lost): CO2 emissions: 0.0576 kg CO2/day</p><p>b. <strong>Reduced collaboration efficiency</strong> (Appx 1.5 hours/day lost): CO2 emissions: 0.0576 kg CO2/day</p><p>c. <strong>Misunderstandings in digital communication</strong> (Appx 1 hour/day): CO2 emissions: 0.0384 kg CO2/day</p><p>d. <strong>Limited access to physical resources</strong> (1 hour/day of inefficiency): CO2 emissions: 0.0384 kg CO2/day</p><p>5. <strong>Longer working hours due to blurred boundaries</strong>: Extra energy use: 0.3 kWh with CO2 emissions: 0.0768 kg CO2/day</p><p>6. <strong>Increased use of digital tools for team bonding</strong>: Video calls, and virtual social events: 0.5 kWh/day, CO2 emissions: 0.128 kg CO2/day</p><p>7. <strong>Additional lighting needs for home office</strong>: 0.5 kWh/day CO2 emissions: 0.128 kg CO2/day</p><p>8. <strong>Increased non-work energy use during breaks</strong>: TV, Mobile, additional cooking: 2 kWh/day, CO2 emissions: 0.512 kg CO2/day</p><p>9. <strong>Less efficient home office equipment</strong>: Additional 1 kWh/day, CO2 emissions: 0.256 kg CO2/day</p><p>10. <strong>Frequent additional trips during work hours</strong>: CO2 emissions: 4.04 kg CO2/day (using 0.404 kg CO2/mile)</p><p>Some of these additional factors bring the total daily emissions for our remote worker to 15.7 kg CO2, surpassing the office-based scenario by couple of kg’s, and I have gone easy with the numbers for <strong>point 4</strong> → Inefficiencies due to work-from-home disadvantages.</p><p><strong>Conclusion</strong></p><p>In conclusion, this data may differ from case to case and for different working models. But just in my case, I feel working from the office isn’t just a traditional approach, it’s, turning out to be a strategic environmental choice. By centralizing my work, optimizing shared resources, and fostering collaborative environments, I think I am being more sustainable than when I am working from home.</p><p>What I am still missing is a spontaneous innovative environment that fosters, immediate problem-solving, people-to-people knowledge transfers, and most importantly, enhanced mental health through social interactions.</p><p>Imagine how these sustainable numbers will improve if all my colleagues were also working from the office.</p><p><em>Originally published at </em><a href="https://www.shailendrabhatt.com/2024/11/the-hidden-carbon-cost-when-working.html"><em>https://www.shailendrabhatt.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b652281b9f65" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Session Management: B2C vs B2B Customer Facing Applications]]></title>
            <link>https://bhattshailendra.medium.com/session-management-b2c-vs-b2b-customer-facing-applications-afb1507d9f68?source=rss-960757890ef9------2</link>
            <guid isPermaLink="false">https://medium.com/p/afb1507d9f68</guid>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[session-management]]></category>
            <category><![CDATA[b2c]]></category>
            <category><![CDATA[b2b]]></category>
            <dc:creator><![CDATA[Shailendra Bhatt]]></dc:creator>
            <pubDate>Sun, 20 Oct 2024 13:29:20 GMT</pubDate>
            <atom:updated>2024-10-20T13:29:20.383Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/113/0*Jp1qKPUSTdQEKlXj.jpg" /></figure><p>As I was thinking about a good topic to write about this week, I couldn’t help but reflect on the subject of user session management. It is a critical topic that plays a pivotal role in shaping user experiences on customer-facing websites. Since being part of both B2C and B2B applications, I have noticed how different approaches to session management can either enhance or hinder user engagement.</p><p>In B2C applications, we have used a browser-level cookie with a 30-minute timeout, while the B2B applications employ server pinging every few minutes. Both approaches have their merits and challenges.</p><p>When designing a session management system, these are the architecture abilities considered:</p><p><strong>Scalability</strong>: Our solution must handle varying user loads efficiently.</p><p><strong>Security</strong>: Protecting user data and preventing unauthorized access.</p><p><strong>User Experience</strong>: The system should balance security with ease of use.</p><p><strong>Flexibility</strong>: How flexible does the session management solution cater to different timeouts?</p><p><strong>Performance</strong>: We must minimize the impact on server resources and network traffic.</p><p><strong>Compliance</strong>: Our implementation should adhere to relevant data protection regulations.</p><p>Based on these considerations, our ideal implementation was</p><p><strong>For B2C</strong></p><p>Since the number of users accessing the application is very high and requires high concurrency, there was a requirement for better user experience and performance. Hence, using secure HTTP-only cookies for session tokens was more suited.</p><p>Also, since the application had several public pages, security was achieved by storing limited data in cookies and ensuring all secured information was on the server side.</p><p>A distributed session could have been achieved, as there was a Redis cache layer. However, we wanted to keep the session stateless, and using a sticky session was available, and scalability was not an issue.</p><p><strong>For B2B</strong></p><p>Since concurrency was not an issue, server-side session management with client-side pinging periodically was a more apt solution. It did not hamper user experience SLAs and was more secure.</p><p>Also, different b2b functionalities required different session timeouts. Keeping the logic on the server side made it more flexible and more controlled in terms of monitoring.</p><p>In conclusion, this is a good topic to revisit continuously, considering how the application security landscape is evolving, and so will our session management approach.</p><p><em>Originally published at </em><a href="https://www.shailendrabhatt.com/2024/10/session-management-b2c-vs-b2b-customer.html"><em>https://www.shailendrabhatt.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=afb1507d9f68" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Perils of Holiday Code Freezes]]></title>
            <link>https://bhattshailendra.medium.com/perils-of-holiday-code-freezes-21067976c165?source=rss-960757890ef9------2</link>
            <guid isPermaLink="false">https://medium.com/p/21067976c165</guid>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[best-practice-programming]]></category>
            <category><![CDATA[memory-leak]]></category>
            <category><![CDATA[caching]]></category>
            <category><![CDATA[code-freeze]]></category>
            <dc:creator><![CDATA[Shailendra Bhatt]]></dc:creator>
            <pubDate>Tue, 13 Aug 2024 12:36:08 GMT</pubDate>
            <atom:updated>2024-08-13T12:36:08.758Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/113/0*QZo50pgshCTpGgM6.jpg" /></figure><p><strong>Holiday Code Freeze</strong> has now become an age-old practice where deployments are stopped, and it’s aimed to reduce any risk of new bugs or issues in the system when a majority of support staff is away. However, this also means the servers and infrastructure are left untouched for several weeks, and surprisingly, in my experience, this can be a bit chaotic.</p><h3><strong>Application and Database Leaks</strong></h3><p>First and foremost, the most common error noticed is the <strong>Application leak</strong>. I recall one particular instance where an e-commerce application began to slow down significantly a week into the holiday break. The application retained references to several objects that were not required, causing the heap memory to fill up gradually. As the memory usage increased, the application became sluggish, eventually leading to crashes and “ <strong>out of memory</strong>” errors.</p><p><strong>Leaks</strong> can also happen when connecting to a database. In another example, the same e-commerce application began experiencing intermittent outages. The root cause was traced to a connection leak where the application was not releasing database connections after it was used. As the number of open connections grew, the database server eventually refused new connections, causing the application to crash.</p><p>Similarly, I have also experienced code freeze situations, where <strong>thread leaks</strong> were consuming system resources and slowing down the application. This typically happens when threads are created but not terminated.</p><h3><strong>Array index out-of-bounds errors</strong></h3><p>Another issue I recently encountered during a recent freeze was the <strong>Array index out-of-bounds error</strong>. The application was a CMS, and system downtime started in the middle of a week when an application tried to access an index in an array that didn’t exist. It happened due to unexpected input and data changes not accounted for in the custom code.</p><p><strong>Array Index out-of-bound exceptions</strong> can also be caused by data mismatch when interacting with external services or APIs, not under code freeze. Once, during a holiday season, a financial reporting application began throwing array index out-of-bounds exceptions. The root cause was traced back to an external data feed that had changed its format. The application was expecting a certain number of fields, but the external feed had added additional fields, causing the application to attempt to access non-existent indices. It led to errors that took the application offline until a patch was deployed after the freeze.</p><h3><strong>Cache Corruption</strong></h3><p><strong>Cache corruption</strong> is another potential way of bringing down heavy cache-dependent applications. In online real-time applications, caches improve the application performances, but, on several occasions, I have seen over time, if not cleared, caches can become corrupt, leading to stale and receiving of incorrect data.</p><h3><strong>Conclusion</strong></h3><p>While it’s funny that IT stakeholders think that the code freeze aims to maintain stability, in most cases, they expose underlying issues that might not be apparent during regular operations. The even more funnier thing is that a majority of the time, these issues are resolved by a simple server restart.</p><p><em>Originally published at </em><a href="https://www.shailendrabhatt.com/2024/08/perils-of-holiday-code-freezes.html"><em>https://www.shailendrabhatt.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21067976c165" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Aspirations but lacking the Automation Foundation]]></title>
            <link>https://bhattshailendra.medium.com/ai-aspirations-but-lacking-the-automation-foundation-45ac9e6c2c21?source=rss-960757890ef9------2</link>
            <guid isPermaLink="false">https://medium.com/p/45ac9e6c2c21</guid>
            <category><![CDATA[architects]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[architecture]]></category>
            <dc:creator><![CDATA[Shailendra Bhatt]]></dc:creator>
            <pubDate>Thu, 25 Jul 2024 07:47:02 GMT</pubDate>
            <atom:updated>2024-07-25T07:50:06.435Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/113/0*4XnJqtarHlCYdPR6.jpg" /></figure><p>I am witnessing a growing need for more clarity among management teams regarding AI and Automation. They see competitors touting AI initiatives and feel pressured to follow suit, often without even grasping the fundamental differences between AI and automation. Everyone wants to implement AI, but they do not realize that they have yet to scratch the surface of basic automation.</p><p>In a recent event at a client, the management heads proudly announced an AI workshop day and their plans to implement AI into their development process. However, as the workshop started, I observed the lack of technical know-how at the management level. Even developers struggled to differentiate between rule-based automation and the more complex, adaptive nature of AI. This knowledge gap has led to unrealistic expectations and misaligned strategies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZD7v5rj0UUGS1uj4Fj5fVQ.jpeg" /></figure><p>Let me cite another example from a client and elaborate. A year back the business management was pushing to implement an AI-driven customer service chatbot, which was the need of the hour, and went live with some cutting-edge services and technology. However, since its implementation, the chatbot did not see much traffic. As we tried to understand the reasons were several:-</p><ol><li>Poor integrations to existing systems like CRM, customer service tools, or even marketing automation. This meant the chatbot could not even access or update customer information in real time. Everything was done manually.</li><li>It lacked typical customer interaction functionalities like personalization, order tracking, appointment scheduling, and even FAQs efficiently as it lacked automated processes.</li><li>It could not seamlessly hand off to a human agent</li><li>finally, the bot engine lacked sufficient training and updates.</li></ol><p>All of the above reasons are directly related to the lack of automation in various aspects of IT and business.</p><p>One initiative that hopefully works is to begin by asking management teams to map out their current automated processes. This exercise usually reveals significant gaps and helps shift the focus from AI to necessary automation steps.</p><p>As we read and learn from others successful AI implementation is a journey, not a destination. It requires a solid foundation of automated processes, clean data, and a clear understanding of organizational goals. Until this reality is grasped, AI initiatives will continue to fall short of expectations.</p><p><em>Originally published at </em><a href="https://www.shailendrabhatt.com/2024/07/ai-aspirations-and-lacking-automation.html"><em>https://www.shailendrabhatt.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45ac9e6c2c21" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learnings from Microsoft Global outages due to Crowdstrike incident — An Architect’s view]]></title>
            <link>https://bhattshailendra.medium.com/learnings-from-microsoft-global-outages-due-to-crowdstrike-incident-an-architects-view-4ac22b475d47?source=rss-960757890ef9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ac22b475d47</guid>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[it-architecture]]></category>
            <category><![CDATA[global-outage]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[crowdstrike]]></category>
            <dc:creator><![CDATA[Shailendra Bhatt]]></dc:creator>
            <pubDate>Fri, 19 Jul 2024 17:48:51 GMT</pubDate>
            <atom:updated>2024-07-19T18:26:25.472Z</atom:updated>
            <content:encoded><![CDATA[<h3>Learnings from Microsoft Global outages due to Crowdstrike incident — An Architect’s view</h3><p>I’ve seen and heard fair share of system outages as an IT architect. But today’s Microsoft Global system outages due to a Crowdstrike update got me thinking and finally got me some action to read about in this quiet few weeks of summer vacation. It’s a perfect example of what can go wrong when we’re not careful with our system designs. So, I wanted to share some thoughts on what we should avoid to prevent similar issues in any IT system or landscape.</p><p><strong>Don’t Put All Your Eggs in One Basket</strong></p><p>The first and foremost principle is to avoid a single point of failure. Relying too much on one vendor, service or solution is always risky. It’s like putting all your eggs in one basket. If that basket falls, you’re in big trouble. We need to mix things up and have backup plans.</p><p><strong>Test, Test, and Test Again</strong></p><p>We have heard the saying, “Measure twice, cut once”? in IT it’s more like “test a hundred times, deploy once.” We can’t just roll out updates and hope for the best. We need to test thoroughly in a safe and like environment first.</p><p><strong>Have an “Undo” Button</strong></p><p>Sometimes, things go wrong no matter how careful we are. That’s why we need a way to undo changes quickly. It’s like having a time machine for our systems. If we can’t roll back or roll forward easily, small problems can soon turn into big headaches.</p><p><strong>Keep the Lines of Communication Open</strong></p><p>When things go south, we need to be able to talk to everyone affected. It’s not just about fixing the problem, it’s about keeping people in the loop. We should have multiple ways to reach out and give updates.</p><p><strong>Plan for the Worst</strong></p><p>Our systems should be like cats — able to land on their feet. Even if part of the system fails, the rest should keep working. It’s about being prepared for the worst while hoping for the best.</p><p><strong>Know Your Weak Spots</strong></p><p>We should regularly check our technology supply chain. Who and what third-party systems, services, and tools are we depending on? What could go wrong? It’s like doing a health check-up but for our IT systems.</p><p><strong>Change with Care</strong></p><p>Rushing changes is asking for trouble, especially in production. We need a solid process for making updates. Think of it like air traffic control for our systems — everything needs to be cleared before it takes off.</p><p><strong>Don’t Put All Your Faith in One System</strong></p><p>Using the same operating system or platform for everything is convenient, but risky. It’s good to mix things up a bit. That way, if one system has issues, not everything should go down.</p><p>In the end, it’s all about being prepared and thinking ahead. For me, the CrowdStrike incident is not a surprise and it’s more of a wake-up call for all of us in IT. We need to learn from this to build stronger, more reliable systems that can weather any storm.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ac22b475d47" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Edge Tech Realities — Part 1 — Web Performance]]></title>
            <link>https://bhattshailendra.medium.com/edge-tech-realities-part-1-web-performance-cead05546292?source=rss-960757890ef9------2</link>
            <guid isPermaLink="false">https://medium.com/p/cead05546292</guid>
            <category><![CDATA[caching]]></category>
            <category><![CDATA[edge-computing]]></category>
            <category><![CDATA[performance]]></category>
            <dc:creator><![CDATA[Shailendra Bhatt]]></dc:creator>
            <pubDate>Wed, 10 Jan 2024 15:41:04 GMT</pubDate>
            <atom:updated>2024-01-10T15:41:04.001Z</atom:updated>
            <content:encoded><![CDATA[<h3>Edge Tech Realities — Part 1 — Web Performance</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/113/0*81mPqDjO8mVOHylg.jpg" /></figure><p>The edge technology has improved severalfold in the last decade or so. In the late 2000s, I used Akamai to serve static content for several market-leading clients. These platforms typically made the application calls lesser and improved the performance and latency of the websites.</p><p>Last year or so, I have been working with Microsoft Azure’s front door, and this is when I realized that, like any technological advancement, edge platforms have their fair share of disadvantages and practical challenges.</p><p>First and foremost is the performance itself. Recently, after caching all static pages on the CDN, a global website that I was part of had its average page load times surprisingly increased. That’s when I realized that the distribution of resources across multiple edge locations can lead to inconsistencies in processing power and network connectivity. Also, the page load times will differ based on where the nearest edge locations are present.</p><p>Also, I learned that with Microsoft Azure backbone networking, the distributed nature of edge platforms and their edge servers are not created equal. They differ in processing power, storage capacity, and network bandwidth. Based on the logs, some users had slower response times, as their requests were directed to an underperforming edge server.</p><p>In a web application whose static content needs frequent updates, the purging of the cache happens very often. This will need a very close synchronization between all the edge servers. A lot of times, I have seen that it takes time for these edge locations to be in sync, and the more the purges, the more inconsistencies.</p><p>Lastly, if there are sudden spikes in traffic, say due to promotional campaigns or seasonal traffic. Scaling of edge servers may not always be instantaneous, leading to performance bottlenecks. Though this can be only for a certain period, it still has an impact on the end user.</p><p><em>Originally published at </em><a href="https://www.shailendrabhatt.com/2024/01/edge-tech-realities-part-1-web.html"><em>https://www.shailendrabhatt.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cead05546292" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Caching Strategies for Improved Website Performance]]></title>
            <link>https://bhattshailendra.medium.com/caching-strategies-for-improved-website-performance-be546d7548fd?source=rss-960757890ef9------2</link>
            <guid isPermaLink="false">https://medium.com/p/be546d7548fd</guid>
            <category><![CDATA[performance-optimization]]></category>
            <category><![CDATA[content-delivery-network]]></category>
            <category><![CDATA[caching]]></category>
            <category><![CDATA[application-performance]]></category>
            <category><![CDATA[cdn]]></category>
            <dc:creator><![CDATA[Shailendra Bhatt]]></dc:creator>
            <pubDate>Thu, 30 Nov 2023 15:59:13 GMT</pubDate>
            <atom:updated>2023-11-30T15:59:13.703Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/113/0*K6H5Hh3qmsX1qgDL.jpg" /></figure><p>When it comes to performance, the first thing that comes to mind is Caching. The concept of Caching is complex to implement for a website, and we need to have the right balance with the underlying infrastructure. We need to understand the in-depth end-to-end data communications, their bandwidths, and how they get stored at each layer.</p><p>One general mistake development teams typically make is looking at code optimization randomly to solve all caching issues. While this helps resolve some performance bottlenecks and memory issues in legacy code, it does not eliminate the core problems.</p><p>The first and foremost fundamental point is that caching strategies differ between Static and Dynamic contents. Content Delivery Network serving contents is a no-brainer, and applications having a CDN make it easy to cache static contents for a specific amount of time on edge layers closest to the end-user.</p><p>CDN, however, makes it tricky to implement when it comes to semi-dynamic or dynamic pages. It is much easier to shift the caching responsibilities for the dynamic functionalities closer to the application layers.</p><p>The second tricky point is that, the Cache at the application layer influences the health of the underlying infrastructure. After any cache tweaks, it is always better to review the application server sizing after analyzing the cached data amount, cache size, cache duration, cache hit ratio, etc. Even caching at the database layer influences the underlying infrastructure. Query caches can be heavy and sometimes unnecessary, as all modern ORMs already have an internal cache implemented.</p><p>While it’s tempting to resort to code optimization as a quick fix, the fundamental lesson learned is implementing caching tailored to the nature of content-static or dynamic. Also, the application layer involves a delicate balance, influencing the overall health of the underlying infrastructure. By approaching caching strategically and understanding its nuanced impact on the entire ecosystem, development teams can navigate performance challenges effectively and deliver a seamless experience to end users.</p><p><em>Originally published at </em><a href="https://www.shailendrabhatt.com/2019/02/implementing-concept-of-caching-in.html"><em>https://www.shailendrabhatt.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be546d7548fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering the Art of Reading Thread Dumps]]></title>
            <link>https://bhattshailendra.medium.com/mastering-the-art-of-reading-thread-dumps-a0cc8c007e7b?source=rss-960757890ef9------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0cc8c007e7b</guid>
            <category><![CDATA[art]]></category>
            <category><![CDATA[application-development]]></category>
            <category><![CDATA[threaddump]]></category>
            <category><![CDATA[science]]></category>
            <category><![CDATA[threads]]></category>
            <dc:creator><![CDATA[Shailendra Bhatt]]></dc:creator>
            <pubDate>Wed, 29 Nov 2023 20:34:49 GMT</pubDate>
            <atom:updated>2023-11-29T20:34:49.612Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/113/0*E5WedFs9dQJntxdu.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*sC0P_R_-M7fvjwikv2z3IQ.jpeg" /></figure><p>I have been for years trying to find a structured way to read thread dumps in production whenever there is an issue. I have often found myself in a situation like finding a needle in a haystack and deciphering the cryptic language of thread dumps. These snapshots of thread activities within a running application have so much information, providing insights into performance bottlenecks, resource contention, and High Memory/CPU.</p><p>In this article, I’ll share my tips and tricks based on my experience, having read several production thread dumps effectively across multiple projects, demystifying the process for fellow expert engineers.</p><p><strong>Tip 1: Understand the Thread States</strong></p><p>Thread states, such as <strong>RUNNABLE</strong>, <strong>WAITING</strong>, or <strong>TIMED_WAITING</strong>, offer a quick glimpse into what a thread is currently doing. Mastering these states helps in identifying threads that might be causing performance issues. For instance, a thread stuck in a <strong>WAITING </strong>state can be a candidate for further investigation.</p><p><strong>Tip 2: Identify High CPU Threads</strong></p><p>The threads consuming a significant amount of CPU time are often the culprits behind performance degradation. Look for “<strong>Top 5 Threads by CPU time</strong>” threads and dig into their stack traces. It is where the full stack trace is defined, pinpointing the exact method or task responsible for the CPU spike.</p><p><strong>Tip 3: Contextualize with Application Logs</strong></p><p>Thread dumps are more powerful when correlated with <strong>application logs</strong>. Integrate logging within critical sections of your code to capture additional context. This fusion of thread dump analysis and log inspection (looking at the timestamps) provides a holistic view of the application’s behavior.</p><p><strong>Tip 4: Pay Attention to Deadlocks</strong></p><p>Deadlocks are the nightmares of multithreaded applications. Thread dumps provide clear indications of deadlock scenarios. Look for threads marked as<strong> “BLOCKED</strong>” and investigate their dependencies to identify the circular dependencies causing the deadlock.</p><p><strong>Tip 5: Explore External Dependencies</strong></p><p>Modern applications often rely on external services or APIs. Threads waiting for responses from these external dependencies can significantly impact performance. Identify threads in <strong>WAITING </strong>states and trace their dependencies to external services.</p><p><strong>Tip 6: Utilize Profiling Tools</strong></p><p>While thread dumps offer a snapshot of the application state, profiling tools like <strong>VisualVM, YourKit, </strong>or <strong>jVisualVM</strong> provide a dynamic and interactive way to analyze thread behavior. These tools allow you to trace thread activities in real time, making it easier to pinpoint performance bottlenecks.</p><p><strong>Tip 8: Leverage Thread Grouping</strong></p><p>Grouping threads by their purpose or functionality can simplify the analysis process. In complex applications, the number of threads can be really confusing. Hence, collating or grouping them together can be helpful. For example, grouping threads related to database connections, HTTP requests, or background tasks together. This approach often provides a more coherent view of the application’s concurrent activities.</p><p>In conclusion, reading thread dumps is both an art and a science. It requires a keen eye, a deep understanding of the application’s Architecture, and the ability to connect the dots between threads and their activities. It took years for me to get better at it, but it’s a skill that will always be helpful in troubleshooting any application.</p><p><em>Originally published at </em><a href="https://www.shailendrabhatt.com/2023/11/mastering-art-of-reading-thread-dumps.html"><em>https://www.shailendrabhatt.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0cc8c007e7b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>