<?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 Oshan Nanayakkara on Medium]]></title>
        <description><![CDATA[Stories by Oshan Nanayakkara on Medium]]></description>
        <link>https://medium.com/@oshan.nanayakkara?source=rss-b74de3236347------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*b-n4AbjRoq5kZ8GYGzrNvg.png</url>
            <title>Stories by Oshan Nanayakkara on Medium</title>
            <link>https://medium.com/@oshan.nanayakkara?source=rss-b74de3236347------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 17:18:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@oshan.nanayakkara/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[Agentic Loop in Python: A Practical Guide to Multi-Turn AI Agents]]></title>
            <link>https://medium.com/@oshan.nanayakkara/agentic-loop-in-python-a-practical-guide-to-multi-turn-ai-agents-111f59909548?source=rss-b74de3236347------2</link>
            <guid isPermaLink="false">https://medium.com/p/111f59909548</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[agentic-loop]]></category>
            <dc:creator><![CDATA[Oshan Nanayakkara]]></dc:creator>
            <pubDate>Thu, 28 May 2026 12:10:39 GMT</pubDate>
            <atom:updated>2026-05-31T05:59:15.442Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pppCA7Ek1kYcnmCUiAjVDg.png" /></figure><p>From prompt-response chatbots to autonomous reasoning systems, here’s how the loop works under the hood.</p><h3>1. Why Agentic Loops Matter Now</h3><p>For the past few years, working with LLMs meant a simple exchange: you send a prompt, the model returns an answer. Powerful, yes. But fundamentally passive.</p><p>The industry has shifted. Modern AI applications are no longer just answering questions, they are completing goals. They browse the web, write and execute code, call APIs, and ask follow-up questions until they have everything they need. This is the age of the AI agent.</p><p>At the heart of every agent is one deceptively simple idea: a loop.</p><p>By the end of this article, you will understand how to build a production-grade agentic loop in Python from scratch, one that reasons across multiple turns, calls external tools, handles failure gracefully, and knows when to stop.</p><h3>2. Core Concepts: The ReAct Framework</h3><p>Before writing a single line of code, you need to understand the cognitive architecture that makes agents work. The most widely adopted pattern is ReAct (Reasoning + Acting), introduced in a 2022 paper from <a href="https://research.google/blog/react-synergizing-reasoning-and-acting-in-language-models/">Google Research</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*kY9jbehBJTBr1TQrhi9XAw.png" /></figure><p>The cycle has three phases:</p><h4>Thought (Reasoning)</h4><p>The LLM examines the current state of the conversation and decides what it needs to do next. It is not just reacting, it is planning. A well-designed system prompt instructs the model to explicitly articulate its reasoning before acting.</p><blockquote>“The user wants to book a flight. I have their destination but I am still missing the travel date and the number of passengers. I should ask for the travel date first.”</blockquote><h4>Action (Act)</h4><p>Based on its reasoning, the LLM selects and invokes a tool, an external Python function it has been given access to. This might be a web search, a database query, an API call, or a form submission. The LLM does not execute the tool itself; it declares its intent in a structured format (typically JSON), and your code runs the tool.</p><h4>Observation (Observe)</h4><p>The result of the tool execution is fed back into the LLM’s context window as a new message. The model can now “see” what the tool returned and use that to plan its next step.</p><p>This Thought → Action → Observation cycle repeats until the agent has enough information to deliver a final answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-A6waauiC4FmvmeBHgCvZg.png" /></figure><h3>3. Architecture and Building Blocks</h3><p>An agentic loop requires four components working in concert.</p><h4>The Brain (LLM)</h4><p>Your model of choice, GPT-4o, Claude Sonnet, Gemini connected via its API. The key thing to understand: the LLM is stateless. It has no memory between calls. Your loop is responsible for maintaining the illusion of continuity by managing conversation history.</p><h4>The System Prompt</h4><p>This is arguably the most important piece. A well-engineered system prompt tells the LLM:</p><ul><li>It is operating as an agent, not a chatbot</li><li>What tools it has access to, including their names, descriptions, and parameter schemas</li><li>What structured output format it must use (strict JSON is preferred over free text)</li><li>What the goal of the interaction is</li></ul><p>Poor system prompts produce unpredictable agents. Invest time here.</p><h4>Tools / Functions</h4><p>Tools are ordinary Python functions. Each tool has:</p><ol><li>A Python implementation — the actual code that runs</li><li>A JSON schema — a machine-readable description of the function’s name, what it does, and what parameters it expects</li></ol><p>The LLM sees only the schema. Your loop sees only the implementation. The schema is the contract between them.</p><pre># Example tool schema (what the LLM sees)<br>{<br>    &quot;name&quot;: &quot;book_flight&quot;,<br>    &quot;description&quot;: &quot;Books a flight for the user. Requires destination, date, and passenger count.&quot;,<br>    &quot;parameters&quot;: {<br>        &quot;destination&quot;: {&quot;type&quot;: &quot;string&quot;, &quot;required&quot;: true},<br>        &quot;travel_date&quot;: {&quot;type&quot;: &quot;string&quot;, &quot;required&quot;: true},<br>        &quot;passengers&quot;: {&quot;type&quot;: &quot;integer&quot;, &quot;required&quot;: true}<br>    }<br>}</pre><h4>Memory / Context Window</h4><p>Every time the loop iterates, you must append the latest messages, the agent’s thought, the tool call, and the observation to a running conversation history list. This list is passed with every new LLM call. Without it, the agent forgets everything and starts over.</p><h3>4. Anatomy of an Agentic Loop</h3><h4>1. The Bounded Loop (Preventing Infinite Runs)</h4><p>The first critical piece of logic isn’t a while True loop, but a bounded for loop.</p><ul><li><strong>The Code:</strong> for step in range(max_steps):</li><li><strong>Why it matters:</strong> LLMs can get caught in hallucination loops where they repeatedly call the same tool with the wrong arguments. Explaining that the loop must have a hard limit (e.g., 5 steps) to prevent burning through API credits and hanging the application is a crucial best practice.</li></ul><h4>2. State Management (Accumulating Context)</h4><p>The loop itself is stateless per iteration; the agent’s “memory” is entirely dependent on the messages list.</p><ul><li><strong>The Code:</strong> messages.append(message)</li><li><strong>Why it matters:</strong> Every time the LLM makes a decision (even if it’s just deciding to call a tool), that decision must be recorded. If you don’t append the assistant’s response to the history before feeding it back in the next iteration, the LLM will lose its train of thought and the loop will break.</li></ul><h4>3. The Stopping Condition (The Exit Strategy)</h4><p>How does the loop know when to stop?</p><ul><li><strong>The Code:</strong> if message.tool_calls is None: return message.content</li><li><strong>Why it matters:</strong> This is the hinge of the whole agentic loop. You should explain that tool_choice=&quot;auto&quot; allows the LLM to decide if it needs a tool. If the LLM determines it has enough information to answer the user&#39;s initial prompt, it simply replies with text. The absence of tool_calls is the signal to break the loop and deliver the final answer to the user.</li></ul><h4>4. Dynamic Execution (Bridging LLM and Python)</h4><p>When the LLM decides to act, it returns structured data, not executable code. The loop must safely bridge this gap.</p><ul><li><strong>The Code:</strong></li></ul><pre>tool_name = tool_call.function.name<br>tool_args = json.loads(tool_call.function.arguments)<br>result = TOOLS[tool_name](**tool_args)</pre><ul><li><strong>Why it matters:</strong> This is where the magic happens. Explain how the logic extracts the requested function name and dynamically looks it up in your TOOLS dictionary. Highlight the use of json.loads() to convert the LLM&#39;s stringified JSON arguments into actual Python keyword arguments (tool_args). Mentioning the fallback logic (if tool_name in TOOLS:) is also great for showing how to handle hallucinations if the LLM invents a tool.</li></ul><h4>5. The Observation Phase (Closing the Loop)</h4><p>Once the tool runs, the LLM needs to see the result.</p><ul><li><strong>The Code:</strong></li></ul><pre>messages.append({<br>    &quot;role&quot;: &quot;tool&quot;,<br>    &quot;tool_call_id&quot;: tool_call.id,<br>    &quot;content&quot;: result,<br>})</pre><ul><li><strong>Why it matters:</strong> This completes the ReAct (Reason + Act + Observe) cycle. Emphasize that the result must be appended with the specific role: &quot;tool&quot; and must include the tool_call_id. This ties the execution result directly back to the specific action the LLM requested, allowing it to &quot;observe&quot; the outcome and decide its next move at the top of the next iteration.</li></ul><h3>5. Handling Edge Cases and Pitfalls</h3><p>This is where production-grade agents diverge from demos.</p><h4>Infinite Loops and the Max Steps Guard</h4><p>Without a ceiling, a confused agent will keep calling tools indefinitely, burning API credits and never returning. Always enforce a hard stop:</p><pre>for step in range(max_steps):  # Never use `while True`<br>  ...<br>return &quot;Max steps reached. Please try a simpler request.&quot;</pre><p>The right value for max_steps depends on your use case. For simple assistants, 5 is usually enough. For complex research tasks, you might go higher but log a warning and notify the user when the limit is hit.</p><h4>Hallucinated Tool Calls</h4><p>LLMs occasionally call tools that don’t exist, or pass arguments with the wrong types. Graceful handling means:</p><ol><li>Checking if tool_name in TOOLS before executing</li><li>Catching exceptions from the tool function</li><li>Feeding the error message back into messages so the LLM can self-correct on the next step</li></ol><pre>try:<br>    result = TOOLS[tool_name](**tool_args)<br>except TypeError as e:<br>    result = f&quot;Tool call failed — wrong arguments: {e}. Please try again with correct parameters.&quot;</pre><p>The key insight: treat errors as observations, not crashes. Return the error as a tool result and let the agent reason about how to fix it.</p><h4>Parsing Failures</h4><p>If you are using a custom output format, the LLM may occasionally return malformed JSON.</p><p>A Note on Modern APIs: If you are using native function-calling APIs (like OpenAI’s tool_choice: &quot;auto&quot; or Gemini&#39;s function calling), the provider&#39;s underlying infrastructure handles the JSON structuring for you, making parsing failures rare. However, if you are working with open-source models, custom JSON prompts, or legacy systems, malformed outputs are a constant hurdle.</p><p>When managing custom setups, use these strategies to stay resilient:</p><ul><li>Be strict in your system prompt: Provide an exact JSON template and explicitly state: “Respond ONLY in this format, with no conversational prose before or after the JSON object.”</li><li>Implement a retry budget with feedback: If parsing fails, catch the exception, append a message back to the history like “Your previous response was not valid JSON. Please try again with the correct structure,” and let the loop execute once more.</li><li>Cap your retries: Limit parsing retries to a maximum of 2 to avoid creating an endless loop of broken formatting.</li></ul><h4>Multi-Turn State Management</h4><p>For agents that collect information across several user messages (not just one long conversation), you need a persistent state between HTTP requests. The cleanest pattern:</p><ul><li>Assign each conversation a unique session_id</li><li>Store collected parameters, turn count, and loop status in a fast store (Redis works well)</li><li>Load state at the start of each request, save it at the end</li><li>Keep the loop logic itself stateless, it should only operate on what you pass in, so it is easy to test in isolation</li></ul><p>This separation means your loop code has no awareness of where state comes from, making it trivially mockable in unit tests.</p><h3>6. Conclusion and Next Steps</h3><p>You now understand the core mechanics of an agentic loop:</p><ul><li>The ReAct cycle (Thought → Action → Observation) is the cognitive backbone</li><li>The loop is just a for loop with a stopping condition and a guard rail on max steps</li><li>State is external — the loop itself is stateless; a session store manages persistence across turns</li><li>Errors are observations — feed them back to the LLM rather than crashing</li><li>Streaming and continuation checkpoints are the hallmarks of a production-grade implementation</li></ul><h3>Where to Go From Here</h3><p>Now that you understand the underlying mechanics, you are in a much better position to use higher-level frameworks that automate much of this:</p><ul><li><a href="https://www.langchain.com/langgraph">LangGraph</a> — Graph-based stateful agent orchestration with built-in persistence</li><li><a href="https://microsoft.github.io/autogen/">AutoGen</a> — Microsoft’s multi-agent conversation framework</li><li><a href="https://www.crewai.com/">CrewAI</a> — Role-based multi-agent collaboration</li><li><a href="https://dspy.ai/">DSPy</a> — Declarative LM programming for optimizing prompts and pipelines automatically</li></ul><p>The frameworks abstract the loop. Understanding the loop means you will know exactly what they are doing and exactly when to reach past them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=111f59909548" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Guide to clear Oracle Certified Associate, Java SE 8 Programmer exam (1Z0–808)]]></title>
            <link>https://medium.com/@oshan.nanayakkara/guide-to-clear-oracle-certified-associate-java-se-8-programmer-exam-1z0-808-335db8d6ed52?source=rss-b74de3236347------2</link>
            <guid isPermaLink="false">https://medium.com/p/335db8d6ed52</guid>
            <category><![CDATA[java8]]></category>
            <category><![CDATA[oracle]]></category>
            <category><![CDATA[1z0-808]]></category>
            <dc:creator><![CDATA[Oshan Nanayakkara]]></dc:creator>
            <pubDate>Mon, 16 Jan 2023 06:49:32 GMT</pubDate>
            <atom:updated>2023-01-16T06:49:32.009Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m writing this article to help anyone who is facing the OCA Java SE 8 Programmer exam. I followed the below mentioned steps to clear the exam successfully.</p><h3>OCA study guide by Jeanne Boyarsky &amp; Scott Selikoff</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/0*GLeLg77N-euAHkkx.jpg" /></figure><p>Before going to the exam I recommend you all to go through this study guide which helped me a lot to improve my core java knowledge. This book covers all the aspects which is relevant to the OCA exam. It includes 6 chapters and at the end of each chapter there are mock tests to evaluate your knowledge. After reading each chapter I recommend you to do those exams and test your knowledge. For every wrong question please refer that theory part and make sure you understand that concepts. Before moving to the next chapter please clear all your doubts regarding that chapter. Try to maintain a short note if you find difficulty to remember those theory parts and read those short notes on daily basis and this will help you to remind those theory parts. Make sure you complete the whole book because all of the theories which mentioned in this book is essential for you to clear the exam.</p><h3>Wiley Efficient Learning</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1KCV5vwPPULyCSkGsBnfVA.png" /></figure><p>Wiley Efficient learning platform is providing test bank which has mock exam questions of the OCA exam. It consist of 2 main modes of exams such as questions from the direct test bank and flash cards. I recommend you go through all the mock exams in this test bank. There are 345 mock questions from test bank and 127 flash cards. They have provided answers with some explanation for all the test bank questions and flash cards. Make sure you do the exams on consistent basis. Try to maintain an average above 70% for the test bank questions. Try to complete this exams in this platform because some of the questions in this platform are similar to the real exam questions.</p><h3>Exam Topics</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*by1bgb9XFEZC9mHKNdqoFw.png" /></figure><p>Exam Topics is another good platform to practice your java knowledge. This platform has the actual exam questions from OCA exam. This question bank updates weekly and they add new real exam questions weekly. Try to do these exam questions and evaluate your answer with the discussion provided by them. Don’t rely on those answers because sometimes answers and explanations are wrong. Try to run java programs on your own and see if the outputs are correct. If you are not sure then read theory parts in the study guide that mentioned earlier. Try to do as much as you can because these are the real exam questions that you’ll find in the OCA exam. I didn’t had a chance to complete all the questions in this platform because I didn’t had a premium account.</p><h3>JAVA SE8 Associate Practice Exams by Mitchell Glenn</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/0*LhVRx-sEDKBGtkRu.jpg" /></figure><p>This Mitchell Glenn’s book has over 600 questions. There are 7 standard test which help you evaluate the level you are at now. Try to do those standard tests. If your marks are lower that 65% then there are Objective-wise questions which covers all types of questions from a specific chapter. If you feel like you need special attention for some difficult chapter then go to that chapter and do those questions from the chapter. This exam guide has a good answer explanations which will help you to improve your java knowledge. I have completed all the 600 questions in this book which helped me a lot to build my confidence before the exam.</p><p>After having the theoretical knowledge, the best way to improve that knowledge further is by doing more and more mock questions. All of the above mentioned platforms are providing mock questions which will help you to build your confidence before the exam. Please don’t face the exam by just having the theory knowledge. It is essential you all to do questions to test your current knowledge. The more you do the more you get.</p><p>I have followed all the above mentioned platforms and complete all the questions provided by each platform except ExamTopics. I was able to score above 90% for the real exam by following the above mentioned steps.</p><p>Thank you for reading this article hope this article will help you to clear your exam. Good luck for your exam.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=335db8d6ed52" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Design Patterns]]></title>
            <link>https://medium.com/@oshan.nanayakkara/design-patterns-236a37bfb8d8?source=rss-b74de3236347------2</link>
            <guid isPermaLink="false">https://medium.com/p/236a37bfb8d8</guid>
            <category><![CDATA[design-patterns]]></category>
            <dc:creator><![CDATA[Oshan Nanayakkara]]></dc:creator>
            <pubDate>Tue, 19 Jul 2022 18:44:47 GMT</pubDate>
            <atom:updated>2022-07-19T18:44:47.094Z</atom:updated>
            <content:encoded><![CDATA[<p>Singleton Design pattern is a creational Design pattern. In this design pattern it ensures that only one object of that kind is exist and this design pattern single point of access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*vh4ahH2ZfMPU9k7qWDg3KA.png" /></figure><p>This is the classic approach that we can use to demonstrate singleton design. Since this getInstance method is static we can call it without instantiating it. When we call this method in our program at first time. It create an singleton object and call each time the same object. This approach is not thread safe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*XM328-111JNiQY8xtZRfjA.png" /></figure><p>By putting synchronized we ensures that only one thread can execute at a time this method. By using this synchronized it decrease the performance of the program.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/1*28wdx1oSkjkc4l13XyFAuQ.png" /></figure><p>We have created instance of singleton in a static initializer. This approach is thread safe because JVM execute this static initializer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*KAvCoqJMlFmMPQ68UglUTA.png" /></figure><p>When an object is created synchronization it is no longer useful because object is not null. We will able to lock the getinstance when it is null. By declaring volatile it ensures that multiple threads offers this variable correctly when this object is initialized to singleton. By this it reduced the calling of synchronize method each time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=236a37bfb8d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microservice project]]></title>
            <link>https://medium.com/@oshan.nanayakkara/microservice-project-f57a8a0f79c7?source=rss-b74de3236347------2</link>
            <guid isPermaLink="false">https://medium.com/p/f57a8a0f79c7</guid>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Oshan Nanayakkara]]></dc:creator>
            <pubDate>Fri, 15 Jul 2022 08:04:22 GMT</pubDate>
            <atom:updated>2022-07-15T08:04:22.823Z</atom:updated>
            <content:encoded><![CDATA[<p>Actuator- when put this actuator endpoint to the project it give you some predefine endpoints.<br>from spring boot 2 onward we don’t expose these endpoints such as info, health, beans. All these will give you not found message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*fQZn6A0X0lMh1Kpd2LA9Og.png" /></figure><p>Need to manually expose those endpoints through property file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/1*ZNdVUPbCFJ--utIeOm2ung.png" /></figure><p>Now it show some data in the postman</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*eaZePiVBTCGetQfIzTUQ3A.png" /></figure><p>By having our own actuator endpoint we can alter some values at runtime.</p><p>In spring when we annotate with a component it create a bean.</p><p>ReadOperation is used because Http get call will come and map here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*8eCT9x-Vm9mrgaN0Mdj5lw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*eHj0Ji6kwt1Gp2O5vdsl9g.png" /></figure><p>since we are passing a int value to stage it gives bad request because it expecting a object.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f57a8a0f79c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Analyze TCP dump for slow backends]]></title>
            <link>https://medium.com/@oshan.nanayakkara/analyze-tcp-dump-for-slow-backends-cc7b871f614b?source=rss-b74de3236347------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc7b871f614b</guid>
            <category><![CDATA[https]]></category>
            <category><![CDATA[wireshark]]></category>
            <category><![CDATA[tcp]]></category>
            <dc:creator><![CDATA[Oshan Nanayakkara]]></dc:creator>
            <pubDate>Wed, 06 Jul 2022 07:22:27 GMT</pubDate>
            <atom:updated>2022-07-06T07:22:27.027Z</atom:updated>
            <content:encoded><![CDATA[<p>consider the below case study.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*LA8jJHRxIXaAgimLE3Wq5Q.png" /></figure><p>This is a POST request. When we run the server nothing happen in the wireshark. But we send a JSON payload as a POST message then wireshark will show some transactions happening.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*XVp2JcBouca3I9z3931slw.png" /></figure><p>Now wireshark show some transactions happening.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*9pSiyWbJqa03JrZYTu_YbA.png" /></figure><p>In here you can see WIN which indicate Window size which means Buffer size.</p><p>In the initial you get window size as 65535 but when in POST request window size is 10230</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/291/1*dz20YaT0ywewcyn4TqsJXw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*h2tVt9sjG5n-s0FYfm_ZPQ.png" /></figure><p>In here you can see 2 to the power 8 is 256. Initially receive buffer is 65535 bytes but we are ready to accept byte size which 256 times than this. This window size option only see in TCP but not in HTTP because that only happens in handshake.</p><p><strong>When we check about the slowness of the transmission using TCP dump. You need to make sure you capture SYN, SYN ACK, ACK packets(3 way handshake). Those packets are important to capture because bandwidth use with the full scale.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*J0S_9mcGO5F9kV8FSra7Nw.png" /></figure><p>When we send a large file the window size is keep dropping from higher to lower. This happens when each time ask for next accept the substract remaining buffer from full buffer size(full size-remain in buffer). When this application is slow and this window size is keep dropping until it becomes 0 it should be considerable. When we transfer the the data in high speed the consumer who is in the upper layer might not consume it in the same speed. If window size becomes 0 then there is no space in buffer and then you have to wait. So then Window update happens and say to send few more because space available in buffer. If the communication is slow and the window size hit the 0 window size then it should be solved other wise it can cause problems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*e4GyDglXExdWqZ10vcr1BA.png" /></figure><p>If you can see delay in this delta time as 185 then 90 then 4249. Then you need to consider this because it take time to send the packet to the server and take some time to get the packet from the server you get this much of time. This happens in handshakes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/249/1*7yuAH34QDudK4KRUaoSqbQ.png" /></figure><p>When sending data initially ACK is 1 and then ACK becomes 65476 (TCP segment length + 1). That is the time to clear the send buffer. This informs that server heard me and the t is time to send the next data set to buffer. If this time is slow then ACK comes slow which means have to keep more data in the send buffer without clearing. Then next data cannot put because send buffer is full.</p><p><strong>When a connection is slow you can see many retransmission because didn’t receive a ACK after sending data after the time out triggers then sending the same data again. That’s what happens in retransmission.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*U1th02rlWy7HNVhghsVORg.png" /></figure><p>In here you can see the keep alive header is send after 45 seconds this not a network issue this is a application issue because we set the time to respond in the application 60 seconds. Hence this keep alive send within the range there is no issue in the server side it is from the application side.</p><p><strong>Summary</strong></p><p>If the delta time is increased that can lead to many things because your ACK comes slow. If ACK comes slow means you are trying to resend the data. Or can’t clear initial data in buffer and cannot send more data to buffer.</p><p>If window size is keep dropping then application not consuming data in the same speed you sending. Then need to check What HTTP other client using.</p><p>If there are any keep alive headers frequently sending that indicates that server is waiting until it gets data. Keep alive send to keep the communication without terminate.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc7b871f614b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTTP]]></title>
            <link>https://medium.com/@oshan.nanayakkara/http-cbdbd16a2ca4?source=rss-b74de3236347------2</link>
            <guid isPermaLink="false">https://medium.com/p/cbdbd16a2ca4</guid>
            <category><![CDATA[https]]></category>
            <dc:creator><![CDATA[Oshan Nanayakkara]]></dc:creator>
            <pubDate>Tue, 05 Jul 2022 11:58:20 GMT</pubDate>
            <atom:updated>2022-07-05T18:23:38.705Z</atom:updated>
            <content:encoded><![CDATA[<p>HTTP 1.0 is persistent HTTP which has 2 parts with tunneling and without tunneling. By default http 1.1 go with tunneling(send the messages and get the responses after transaction ends either server or client)</p><p>Keep alive — send a message to server to keep this connection alive.</p><p>When we run this express app below nothing is happen in the wireshark when we filter it by tcp.port==8191</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*mKl2JUY8iiCaYLOKE_KHag.png" /></figure><p>We have to run this endpoint in browser (localhost:8191/wait) and then wireshark show below content</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*ni8kr5nWi_sz3M-C5wy43Q.png" /></figure><p>Connection starts with SYN and then SYN, ACK and the ACK (26,27,28). That was the standard TCP handshake.</p><p>You can see in line 32 it send the request and get the response at line 34.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*Z_K7h8S9PDSs1GFJMAJEYA.png" /></figure><p>And you can see in line 44 server send client it going to terminate this connection. Then at line 45 client ACK to server but client did not close the connection.</p><p>Every transaction starts with SYN, SYN ACK and ACK.</p><p>By looking below image we can understand that We send the Request(line 89), then server ACK it(line 90), Server send the response(line 91), then you ACK to that(line 92). This happens over and over again when we refresh the page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*5TJZEi84nCcakdcpa2borA.png" /></figure><p>But there is no FIN because we keep talking to the backend and backend doesn’t try to end the connection. This connection is persistent. To all these send requests we send only 1 SYN packet.</p><p>What happens when we refresh the page and after response received we close that browser window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*Ik5ICIx3zsOS5OPqicE6NA.png" /></figure><p>After server send response to client at line 22. Then client ACK it to server at line 23. when we close the browser before server close the connection client send FIN to server as shown in line 24. Then server send ACK to client and server close the connection at line 26 by sending FIN to client and then client send ACK to server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*Z5Tofe3C4sYHGv4ItFIl9Q.png" /></figure><p>Now the request will come and hang for 1 minute and then it will do the response.</p><p>Now client is waiting to get the response. server is responding after 1 minute.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*jTGMuk2ixwZjAp9febRtoQ.png" /></figure><p>Now in 41 seconds later it send Keep alive header to server because server still didn’t respond. Then at line 55 server is responding to keep alive. After get the response at line 56. client send the FIN line 58.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*nUUaoBcKVKHTCmZaZh-JbA.png" /></figure><p>When we kill the server before it sending response this is what happens. In here server try to send the reset packet(20) because client try to initiate a new connection(19). No one from server is there to respond.</p><p>If client not sending keep alive header server is closing the connection. If server close the connection but client didn’t. When client try to send message again server send RESET packet back to client because connection is closed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cbdbd16a2ca4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TCP 3 way Handshake]]></title>
            <link>https://medium.com/@oshan.nanayakkara/tcp-3-way-handshake-d2f7c32c4938?source=rss-b74de3236347------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2f7c32c4938</guid>
            <category><![CDATA[wireshark]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[tcp]]></category>
            <dc:creator><![CDATA[Oshan Nanayakkara]]></dc:creator>
            <pubDate>Tue, 05 Jul 2022 07:13:00 GMT</pubDate>
            <atom:updated>2022-07-05T07:13:00.347Z</atom:updated>
            <content:encoded><![CDATA[<p>Initially client send a SYN flag and set SEQ 0 because it is the first message. Then server see this message and responds with ACK server also send SYN pattern. Every time server send the SYN client has to ACK to that. At this point this communication between client and server established.</p><p><strong>window update</strong></p><p>Either client side or server side when they communicate they use window size(how many bytes can get before buffer fill). If buffer is filled then it will send a flag to other side don’t send any more. When buffer space available then window update and say now can send.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*de6-tw5Kx1E2FmRUs8i63w.png" /></figure><p>Other side calculate next number would be current number + length of this bytes. By looking at these sequences they can see how many bytes and the length of messages that transferred in these messages. When server send the message then client has to ACK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*Q80QGDEfsnxTH88uImR9pQ.png" /></figure><p>Now the ACK is 13 because current = 1 and length of characters is 12. Now in here the send is completed.</p><p>To close the connection server set the FIN flag to 1. Client says i’m going to close then server say ok and the server says i’m going to close then client says ok.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*H6vLlqAm3KZbDpbTjHrdgg.png" /></figure><p>Now communication is done after sever sending ACK back to the client.</p><p>Create 2 simple client and server js files that establish communication between each other.</p><p>server.js — server is running on 42181 port. When the client connect it says hello client and then disconnect it.</p><p>client.js — when you run the client it connect to 42181 port on server and when disconnection comes it disconnect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*EbMrWmxOL3gjkc0qjNgswQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*G966EwIykdw0NUABL_7miw.png" /></figure><p>And open wireshark and filter it by tcp.port==42181 because we have port 42181. When we start the server nothing happen in wireshark. But when we start the client wireshark will indicate something.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/549/1*wCHoXIwn-2AnIlstOmEDDQ.png" /></figure><p>Below shows what wireshark will show.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GxKu-v5bUNnHJwvLdGmCRQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*1P4xID4-IoYHnJk-e3d3Cg.png" /></figure><p>Initially you can see it send the SYN packet and Seq set to 0.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*yALQmM-gtjjY-Ta6yY0UGw.png" /></figure><p>You can see the flags here. You can see the Syn is set to 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*5uXK_Sf3MBPYBrGjV_CjwQ.png" /></figure><p>In 2nd line it shows the return traffic it just shows the ACK plus it send the SYN as well. In here 42181 is server port is always set and the dynamic port 50121 is for client. In 3rd line it shows ACK send to server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*2fltVwqTDnLbNu_T-wbRyw.png" /></figure><p>In TCP dump you can see that server sending message to client called “hello client”. After that client send ACK to sever in line 18. After that you can see the server terminating the connection in line 19 by FIN.</p><p>In below you can see that FIN is set</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*KHxtVpzON5tKHtxYOkvBhA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*V8aFTRRlGXo_HbLGSxJoqw.png" /></figure><p>After that you can see that client acknowledge that in line 20. After that in line 21 client send FIN flag to server. And then finally in line 22 server send ACK to client.</p><p>This how TCP 3 way handshake happens.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2f7c32c4938" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Manual message acknowledge on kafka]]></title>
            <link>https://medium.com/@oshan.nanayakkara/manual-message-acknowledge-on-kafka-8a40cf7d183e?source=rss-b74de3236347------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a40cf7d183e</guid>
            <category><![CDATA[kafka]]></category>
            <dc:creator><![CDATA[Oshan Nanayakkara]]></dc:creator>
            <pubDate>Mon, 04 Jul 2022 12:51:13 GMT</pubDate>
            <atom:updated>2022-07-04T12:51:13.752Z</atom:updated>
            <content:encoded><![CDATA[<p>autoCommitThreashold — Once it reaches 10 messages it send the commit offset back to the server.</p><p>autoCommitInterval — Every 1 minute it commit back to the server.</p><p>When we set the autocommit to false that means kafka don’t do commiting part. which means automatically. You have to do it manually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*6KaKLe5aXTDDLoZoJA7wOg.png" /></figure><p>If this message is completed then it will get the topic , partition and send offset back to the server.</p><p>If we put below code it do is it get the message and take 1 second to process it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*2gDLH20UsIYxIA_wGzDBBg.png" /></figure><p>When executing this prints all 10 messages.</p><p>If we break from 6 message then Kafka again do the read write and print again starting from 5 and then 6 because 5 message prints successfully. To avoid printing last read message and print from the break point we have modify code as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*tQtpEU4uLh0bh8yBNLUXVg.png" /></figure><p>This will prevent from reprocessing.</p><p>If our process take more than session timeout then your heart beat signal will not reach the server. As a result you will be released from the cluster. To solve this we can increase the session timeout there is a disadvantage if the consumer dead rebalancing will not happen until session time ends. Or else we can modify code as below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*A2NtFq-wDPaylLPz9oDpfw.png" /></figure><p>We can put heartbeat as a input and after that can call heart beat. It tells the server that it alive. Can call this heartbeat during process like that we can keep this alive without increasing session time.</p><p>In manual offset commits you should be ready to get the messages in the same batch again and again. You can resolve this by disable the read/write for that but when you disable it stuck on the same message. If you stuck in the same message your lag will grow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a40cf7d183e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fundamentals of JavaScript]]></title>
            <link>https://medium.com/@oshan.nanayakkara/fundamentals-of-javascript-af4609a3ade0?source=rss-b74de3236347------2</link>
            <guid isPermaLink="false">https://medium.com/p/af4609a3ade0</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Oshan Nanayakkara]]></dc:creator>
            <pubDate>Sun, 03 Jul 2022 17:58:13 GMT</pubDate>
            <atom:updated>2022-07-04T06:57:25.714Z</atom:updated>
            <content:encoded><![CDATA[<p>JavaScript engine is the one that compile your code and make use of it. It works in 2 phases such as creation phase and execution phase.</p><p>creation phase — It create the activation object(scan through whole js code and list down all the variables and declarations.). Then it creates a scope chain(list down all the variables in the current function). Then it try to determine <strong>this</strong> object.</p><p>If we have any variable or function in a script then in a creation phase what it does is it create and take global scope.</p><p>whenever we invoke a function what happens is it will create new function context. All 3 phases in creation phase will run in this function scope. Every time we invoke a function it create new execution context and every time you return it destroy this and comeback to parent.</p><p>when we invoke a function it creates a frame for function in call stack. when we leave that particular function it will destroy in the stack. After that it go to the global execution context.</p><p>When we invoke a recursion function it will keep creating a stack until stack is full. This will give stack overflow error.</p><p>Heap is the place where JS keep variables. Stack is a place where JS creating a frame according to the method invocation.</p><h3>Hoisting</h3><p>During the creation phase it moves all the globally declared variables to top but it only move the variable declaration not the assignment.</p><p>When use var it creates a function scope but in let it creates a script scope. Hoisting work with both var and let.</p><p>Hoisting work for the function but not for the function reference. Hoisting support us when it is a var and when it is a function but in let hoisting works but cannot use that.</p><h3>Origin of Node JS</h3><p>Ryan Dunn says that we can JavaScript on backend and he named this framework as Node JS. A guy called Isaac Z. Schlueter created a framework called NPM(Node package Manager). This npm help to keep the js program as separate packages where you don’t need to write your own code for everything you need.</p><p>MongoDB uses document database which use a JSON. It is easy to take this JSON payload and store it in the DB directly and when needed we can take that as JSON object. When using relational DB they had to take JSON and send them through JSON parses and store in the relational DB and when needed they have to convert them back to JSON and send them to API. This also help to rise of NODE JS.</p><p>In 2010 TJ Holowaychuk released express JS. It help NODE to be a stable framework.</p><p>With the release of mongoose people don’t have to learn everything about the document DB. Then at the same period Angular JS released. Which formed MEAN stack.</p><p>With the help of chrome v8 engine Ryan Dunn was make javascript that can use on backend.</p><h3>Reactive Programming</h3><p>It a paradigm which allow to manipulate streams of data using functions.</p><p>To work with reactive programming data should come as streams and should have a good understanding about function programming. And have to deal with asynchronous(part of a program may execute independently with other programs) observers.</p><p>Advantages of Reactive programming</p><blockquote>can use where it take time to process requests.(send a request to http backend and http backend take time to process and you don’t have to wait until that time. This http backend can use reactive programming.)</blockquote><blockquote>can use for log notifications. (observer can wait for the notification and whenever the notification comes you can log it and you don’t have to block others.)</blockquote><p>Imperative programming- Focus on how program works. Easy learning curve. functions, conditions, loops and OOP concepts available. statement can change the state of the program. ex:- Java, C</p><p>Functional programming- Focus on what to solve. Can be long learning curve on the migrations. Ideally to be stateless. Use functions to create expressions rather statements. We can use chains of functions. ex:- scala</p><p>Reactivex.io is the one that governs Reactive programming. They have seperate libraries Rxjava, RxJS, Rx.Net, RxScala.</p><p>Observer pattern works like subject is emit data and we need to subscribe to that to get the result.</p><h3>Promises and Observables</h3><p>promise can return only 1 result but observables can give multiple results even after return something.</p><h3>RxJS in Angular</h3><p>In RxJS when you subscribe then you have to give a observer.</p><p>In a process Streams there 3 main steps such as <strong>Start(Subscribe)</strong>- start emitting data, <strong>observe the stream and do set of processes(Observer)</strong> which have 3 methods next() -(get the next and process), error() -(handle if any error), complete() -(end of operation). Then the last step is <strong>stop (unsubscribe)</strong>.</p><p>Observer — It is the interface which is used to feed an observable source.</p><p>Observable — It is for consumer, if can be transformed and subscribed.</p><p>we can create a new observable with an observer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/346/1*GobSmeshQkUdmxSYFLsCOg.png" /></figure><p>This will not emit any data until you subscribe it. when you start emit data there should be observer to observe it.</p><p>There are several ways to stop the observer.</p><blockquote>Calling complete()</blockquote><blockquote>use certain operators such as take(n) — calling complete() method</blockquote><blockquote>Error — Not calling complete() method.</blockquote><blockquote>Unsubscribe — Not calling complete() method.</blockquote><p>We can use of and from to print the observable</p><p>of — It will take the value and use at once.</p><p>from — It take one by one and emit.</p><h3>RxJS Operators</h3><p>Map — It passes each source value through a transformation function to get corresponding output values. This applies a projection to each value and emit that projection in the output observable.</p><p>Filter — It only emits a value from the source if it passes a criterion function. This operator takes a values from the source observable and passes them through a predicate function and only emits those values that output true.</p><p>Tap — Used when you want to affect outside state with a notification without altering the notification.</p><p>Take — first count values from the source and then completes. It returns an observable that emits only the first count values emitted by the source observable. If the source emits fewer than count values then all of its values are emitted. after that it completes regardless if the source completes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af4609a3ade0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Async REST services with messaging]]></title>
            <link>https://medium.com/@oshan.nanayakkara/async-rest-services-with-messaging-76eafd6d444a?source=rss-b74de3236347------2</link>
            <guid isPermaLink="false">https://medium.com/p/76eafd6d444a</guid>
            <category><![CDATA[kafka]]></category>
            <category><![CDATA[asynchronous]]></category>
            <category><![CDATA[rabbitmq]]></category>
            <dc:creator><![CDATA[Oshan Nanayakkara]]></dc:creator>
            <pubDate>Fri, 01 Jul 2022 18:36:40 GMT</pubDate>
            <atom:updated>2022-07-02T10:44:35.762Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Why we need a messaging system?</strong></p><p>Most of time we implement microservices using REST which is asynchronous (don’t wait until it happens). But the protocol we used here is HTTP which is synchronous. So, when we using microservices the REST become synchronous. To avoid this issue, we use messaging system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TtaTJiR9QM3qb0Za969_og.png" /></figure><p>RabbitMQ is ideal for ordinary queue management such as we send something to queue and we take what came first and process and give output and take next.</p><p>Kafka use set of queues such as fanout (when message came to queue it copy it to every single queue.), direct exchange (can directly target message to particular queue. Based on some message properties we decide which queue to reach from broker.)</p><p>We can use kafka if something happens in system then others get notified.</p><p>When we have processing power of 10 messages/minute and our one consumer processing speed is 15 sec/message then we have more data in queue because queue is getting larger by the time.</p><p><strong>In RabbitMQ</strong> — distribute these messages to different consumers in a circular format. We can speed up this by increasing the number of consumers. If we have some messages that take more time process and the lower consumers take less time to process. Upper consumers get created a queue because it waits one message finishes to process next message. RabbitMQ doesn’t wait until you finish process it will keep sending messages and creating a queue. In here lower consumers gets idle due to this. RabbitMQ has fair dispatch which use prefetch, if we set prefetch to 2 it will not send messages until initially send 2 messages processed.</p><p>If we get a message in consumer and we can’t process it now message is not in queue not nowhere. To avoid that it uses ACK, rather than doing auto acknowledgement RabbitMQ tells when to delete the message and notify other party that they can delete the message because message finish processed.</p><p><strong>In kafka</strong> — when considering the same above scenario kafka has consumer group. We can create multiple partitions within the one topic. When we publish a message to the topic. We have a key and we mod this key by the number of partitions and see which partition comes. If we assume our customer no. as the key the we can guarantee that same customers message delivers into the same partition. This order guaranteed within the partition not within the topic. We can take a consumer and point it to listen to partition like that all partition has their own consumer. This is called consumer group configuration. No of consumers should be less than or equal to the number of partitions have. Kafka has consumer offset if we deliver message from some point it knows from here to give the next message.</p><p>We can use kafka in a place that need RabbitMQ.</p><p>Generally in Kafka we have 1 topic and several partitions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*BZ-HlXeAyqElPc0wXCyY4g.png" /></figure><p>In here each consumer is listening to each partition but when we add more consumers then those extra consumers will be idle. There is a rule that no of consumers in a consumer group should be equal or less than to no of partitions in a topic. If we kill 1 active consumer then the extra partition starts listening to the partition.</p><p>Kafka doesn’t guarantee order in between partitions.</p><p>If we provide the key with the producer then it uses the mod algorithm and determined based on the key. Same key guaranteed that all go to that same partition. If we don’t give the key then kafka do the round robin this is not good because order is not guaranteeing in same customer and in between messages. To guarantee the order we need to specify the key but within the partition no order guarantee.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76eafd6d444a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>