<?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 Sidath Weerasinghe on Medium]]></title>
        <description><![CDATA[Stories by Sidath Weerasinghe on Medium]]></description>
        <link>https://medium.com/@sidath?source=rss-82cc35c5ecfa------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pdnj8Ti0AlyOUzauc2STXQ.jpeg</url>
            <title>Stories by Sidath Weerasinghe on Medium</title>
            <link>https://medium.com/@sidath?source=rss-82cc35c5ecfa------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 03:15:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sidath/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[Loop Engineering: The New Discipline Behind AI Coding Agents]]></title>
            <link>https://sidath.medium.com/loop-engineering-the-new-discipline-behind-ai-coding-agents-4fa10330ad56?source=rss-82cc35c5ecfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fa10330ad56</guid>
            <category><![CDATA[langgraph]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[loop-engineering]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Sidath Weerasinghe]]></dc:creator>
            <pubDate>Sun, 28 Jun 2026 16:26:54 GMT</pubDate>
            <atom:updated>2026-06-28T16:26:54.269Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3TKVtQ37SVzNd9KolrkEtA.png" /></figure><p>If you’ve been paying attention to how AI coding tools have evolved over the last couple of years, you’ve probably noticed a shift. It’s no longer just about asking an AI to write a function and copying the output. Increasingly, AI agents are <em>acting</em>. They open files, run tests, read error messages, and try again, all on their own.</p><p>This is where <strong>Loop Engineering</strong> comes in.</p><p>Loop engineering is the practice of designing, operating, and refining the autonomous feedback cycles that enable this kind of agent behaviour. If prompting is like writing a letter to an AI, loop engineering is like designing the job, the workspace, and the rules the AI works within, so it can get things done without you looking over its shoulder every second.</p><h3>Why Prompting Alone Isn’t Enough Anymore</h3><p>Most developers started with single-shot prompting: you type something in Cursor or Claude, you get code back, you tweak it, and you move on. That model works for simple tasks. But it breaks down fast when you’re dealing with anything real, such as a bug that only shows up at runtime, a test suite that needs to pass before a merge, or a refactor that touches fifteen files.</p><p>The problem with single-shot prompting is that <strong>the feedback loop is you</strong>. Every time the code doesn’t compile, or a test fails, a human has to read the output, understand what went wrong, update the prompt, and go again. That’s fine once. It’s exhausting ten times. And it’s completely unscalable.</p><p>Loop engineering fixes this by moving that feedback loop <em>inside the agent itself</em>. The agent runs the tests, reads the failure output, reasons about what went wrong, and tries a different approach without asking you anything.</p><h3>The Five Building Blocks of a Well-Designed Agent Loop</h3><p>Before you can build a reliable agent loop, you need to understand what one actually consists of. There are five core components that every solid loop needs.</p><h4>1. Context and Memory</h4><p>An agent that forgets what it just did is an agent that goes in circles. Good loop design ensures the agent always has access to the relevant parts of the codebase, its own recent actions and their outcomes, and any project conventions, style guides, or constraints it needs to follow.</p><p>This is harder than it sounds. Context windows have limits, and dumping an entire repo into every prompt is wasteful and ineffective. Good loop engineers think carefully about <em>what</em> the agent needs to know at each step and how to prune what it doesn’t.</p><h4>2. Actionable Tools</h4><p>The agent needs to be able to <em>do</em> things. It should read files, write code, run tests, check compiler output, call a linter, and deploy to a staging environment.</p><p>The keyword here is <strong>safe</strong>. Every tool you give an agent should be scoped, predictable, and ideally reversible. Giving an agent unrestricted shell access to a production system is a very bad idea. Giving it a sandboxed build runner and a test suite? Now you’re talking.</p><h4>3. Execution and Validation</h4><p>This is the heart of the loop. The agent makes a change, runs a validation step such as a unit test, a build command, or a type check, and observes the outcome. The result of that observation feeds directly back into the agent’s next decision.</p><p>Think of it as a tight <strong>observe-decide-act</strong> cycle. The faster and more reliable this cycle is, the more iterations the agent can run in a given time, and the better the outcome tends to be.</p><h4>4. Error Handling and Retry Logic</h4><p>Things will go wrong. A test will fail. The compiler will complain. An API will return an unexpected response. A well-engineered loop doesn’t treat this as a dead end. It treats it as data.</p><p>When a step fails, the agent should ingest the error output, reason about what it means, and adjust its approach. This is where a lot of the intelligence lives. A loop with poor error handling either gives up immediately or ignores failures entirely. Neither is useful.</p><h4>5. Termination Logic</h4><p>This one is critically underrated. <strong>Every loop needs a clear exit condition.</strong> That might be all tests passing, reaching the maximum number of retry attempts, crossing a confidence threshold, or triggering a human review checkpoint.</p><p>Without termination logic, you end up with agents that run forever, burn tokens, and occasionally cause very creative kinds of chaos. Defining exactly when the loop stops is just as important as defining what it does while it’s running.</p><h3>Three Common Loop Patterns</h3><p>Different tasks call for different loop shapes. Here are three patterns you’ll see most often.</p><h4>Plan, Execute, and Verify (PEV)</h4><p>This is the workhorse pattern. The agent starts by forming a plan, such as “I need to refactor this function to handle null inputs,” applies the change, and then runs a verification step. If the verification passes, it moves on. If it fails, it loops back to the planning stage with the failure output in hand.</p><p>This pattern works extremely well for well-defined tasks where success is easy to measure, including passing tests, successful builds, and clean linter output.</p><h4>Explore and Narrow</h4><p>For ambiguous problems, this pattern is more effective. The agent first tries multiple approaches in parallel or in quick sequence, evaluates each one, and progressively narrows down to the solution that looks most promising.</p><p>You would use this for tasks like finding a performance issue somewhere in a service. The agent doesn’t know where to start, so it explores, measures, and converges.</p><h4>Human-in-the-Loop</h4><p>Not everything should be fully autonomous. For high-stakes operations such as merging to main, deploying to production, or modifying authentication logic, you might want the agent to pause and request human sign-off before proceeding.</p><p>This isn’t a failure of loop engineering. It’s smart loop engineering. Knowing where to insert human checkpoints is a skill in itself.</p><h3>Challenges You Will Definitely Run Into</h3><p>Loop engineering is powerful, but it’s not magic. Here are the practical problems you’ll encounter when you start building these systems.</p><h4>Token Bloat</h4><p>Every iteration of the loop consumes tokens. If your agent gets stuck trying the same fix over and over, it can burn through a lot of API budget very quickly. Good loop design includes context pruning strategies such as summarising older history, trimming irrelevant file contents, and keeping only the most recent steps in the working context.</p><h4>Infinite Loops</h4><p>This one follows directly from the termination logic point above. An agent with no clear stopping condition will keep going. Sometimes this is harmless and it just wastes money. Sometimes it’s destructive because the agent keeps rewriting the same file in contradictory ways. Define your exit conditions before you start, not after things go sideways.</p><h4>Verification Debt</h4><p>Automated loops can move fast, and sometimes too fast. An agent that’s been running unattended for an hour might have technically passed every test in the suite while also making architectural decisions that will cause headaches for months.</p><p>Tests verify behaviour. They don’t verify intent. Human review of what the agent actually shipped is still non-negotiable for anything going to production.</p><h3>What Tools Are People Using?</h3><p>If you’re looking to experiment with loop engineering, a few environments are worth knowing about.</p><p><strong>Claude Code</strong> is Anthropic’s agentic coding tool that operates directly in the terminal with full file system access and built-in loop behaviour.</p><p><strong>Cursor</strong> is the AI code editor that supports agent mode with multi-step autonomous execution.</p><p><strong>LangGraph</strong> is a framework for building stateful, graph-based agent workflows with fine-grained control over loop structure.</p><p><strong>Custom scripts</strong> are also common. Many teams build their own pipelines using the Anthropic or OpenAI APIs directly, with bash scripts or Python orchestration handling the validation steps.</p><h3>Conclusion</h3><p>Loop engineering is what happens when you stop treating AI as a fancy autocomplete and start treating it as a collaborator that can work through problems end-to-end. Getting it right requires thinking carefully about context, tooling, validation, failure handling, and knowing when to stop.</p><p>The developers who invest in understanding these loops today are going to have a significant edge as AI agents become a more central part of how software gets built. It’s not just about what the AI knows. It’s about how well you’ve designed the environment it works in.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fa10330ad56" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Save Your Org IPs — Custom Networking for AWS EKS Pods]]></title>
            <link>https://sidath.medium.com/save-your-org-ips-custom-networking-for-aws-eks-pods-87a7749e642d?source=rss-82cc35c5ecfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/87a7749e642d</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[subnet]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[ip-networking]]></category>
            <category><![CDATA[aws-eks]]></category>
            <dc:creator><![CDATA[Sidath Weerasinghe]]></dc:creator>
            <pubDate>Wed, 23 Jul 2025 17:09:29 GMT</pubDate>
            <atom:updated>2025-07-23T17:09:29.376Z</atom:updated>
            <content:encoded><![CDATA[<h3>Save Your Org IPs — <strong>Custom Networking for AWS EKS Pods</strong></h3><figure><img alt="https://docs.aws.amazon.com/eks/latest/userguide/cni-custom-network.html" src="https://cdn-images-1.medium.com/max/1024/0*W3DUptxYtmOXykcU.png" /><figcaption><a href="https://docs.aws.amazon.com/eks/latest/userguide/cni-custom-network.html">https://docs.aws.amazon.com/eks/latest/userguide/cni-custom-network.html</a></figcaption></figure><p>Custom networking for <strong>AWS EKS Pods</strong> (also known as <strong>secondary IP address assignment</strong> or <strong>custom CNI networking</strong>) is used to give you greater control over the networking behavior of your Kubernetes workloads running on <strong>Amazon Elastic Kubernetes Service (EKS)</strong>.</p><h3>Why We Need Custom Networking for AWS EKS Pods</h3><p>By default, EKS uses the <strong>Amazon VPC CNI plugin</strong>, which:</p><ul><li>Assigns pod IPs from the VPC subnet range.</li><li>Binds pods directly to ENIs (Elastic Network Interfaces) on EC2 worker nodes.</li></ul><p>This default setup can lead to limitations:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Mf-iCVJMleZ08I264f4fSw.png" /></figure><h3>Benefits of Custom Networking in AWS EKS</h3><p>Custom networking allows you to:</p><p><strong>1. Use Your Organization’s IP Range</strong></p><p>You can assign pods IPs from custom subnets or IP ranges that match your corporate network. This is useful when:</p><ul><li>You need pods to have <strong>routable, identifiable IPs</strong> across your enterprise.</li><li>You’re operating in <strong>hybrid networks</strong> (on-prem + cloud).</li><li>You want to implement <strong>network policies, routing, or firewall rules</strong> using known IP ranges.</li></ul><p><strong>2. Avoid IP Exhaustion</strong></p><ul><li>You can attach <strong>secondary ENIs in separate subnets</strong> to offload pod IP assignments.</li><li>This increases scalability and control over IP usage.</li></ul><p><strong>3. Network Isolation</strong></p><ul><li>You can create <strong>dedicated subnets</strong> just for pods.</li><li>Helps enforce stricter <strong>security boundaries</strong> (e.g., regulatory compliance).</li></ul><p><strong>4. Enhanced VPC Routing</strong></p><ul><li>You can direct traffic through specific <strong>transit gateways, firewalls, or NATs</strong>.</li><li>Enables <strong>fine-grained control over egress and ingress</strong> traffic for pods.</li></ul><p><strong>5. Multi-AZ and High Availability</strong></p><ul><li>You can configure custom networking for high availability with <strong>ENIs across AZs</strong>, while still having centralized control.</li></ul><h3>How to Use Custom Networking</h3><p><strong>Step 1: Creating Your VPN and VPC Subnets</strong></p><p>Begin by establishing your VPN connection to AWS. With the VPN in place, proceed to set up your Virtual Private Cloud (VPC). Within the VPC, create two types of subnets:</p><ul><li><strong>Organizational Subnets:</strong> These serve as the primary logical segmentation within your VPC.</li><li><strong>Secondary Subnets:</strong> Designed explicitly for custom networking purposes, these will play a crucial role in the later ENIConfig setup.</li></ul><p>Creating these distinct subnets lays the foundation for an optimized network setup that will support both general and customized traffic routing.</p><p><strong>Step 2: Setting Up Your EKS Cluster</strong></p><p>Next, establish your EKS cluster. When creating the cluster, make sure to include node groups to host your workloads. The nodes in these groups will eventually leverage the custom networking configuration, so proper initial setup is key.</p><p><strong>Step 3: Configuring the AWS VPC CNI for Custom Networking</strong></p><p>To activate custom networking features, execute the following command that updates the AWS VPC CNI plugin configuration:</p><pre>kubectl set env daemonset aws-node -n kube-system AWS_VPC_K8S_CNI_CUSTOM_NETWORK_CFG=true</pre><p>This command directs the aws-node daemonset to recognize and utilize custom network settings, enabling enhanced network control.</p><p><strong>Step 4: Creating and Applying the ENIConfig Custom Resource</strong></p><p>With the groundwork in place, it’s time to create an ENIConfig custom resource. This configuration tells the EKS cluster which secondary subnet and security groups to use. Below is an example YAML configuration for an availability zone (AZ):</p><pre>apiVersion: crd.k8s.amazonaws.com/v1alpha1<br>kind: ENIConfig<br>metadata:<br>  name: ap-southeast-1a  # The name must match your availability zone<br>spec:<br>  securityGroups:<br>    - sg-0682XXXXXXXX  # Replace with your cluster&#39;s security group<br>  subnet: subnet-05XXXXXXXX  # Replace with the ID of your created secondary subnet</pre><blockquote><strong>Important Notes:</strong></blockquote><blockquote><strong>Name:</strong> The metadata name must match your availability zone.</blockquote><blockquote><strong>Security Groups:</strong> Use the security group assigned to your EKS cluster.</blockquote><blockquote><strong>Subnet:</strong> Reference the secondary subnet created for custom networking.</blockquote><p>Repeat this configuration for every availability zone where your nodes are deployed.</p><p><strong>Step 5: Enabling Automatic ENIConfig Mapping</strong></p><p>Once your ENIConfigs are applied, ensure that the mapping to each availability zone is handled automatically. Run the following command to enable dynamic mapping:</p><pre>kubectl set env daemonset aws-node -n kube-system ENI_CONFIG_LABEL_DEF=topology.kubernetes.io/zone</pre><p>This step updates the environment variable for the aws-node daemonset, making it aware of the AZ-specific labels. The result is an automatic association between node pods and their corresponding ENI configurations.</p><p><strong>Step 6: Finalizing the Setup by Recreating Nodes</strong></p><p>The last step involves scaling down your node group. By doing so, AWS recreates the nodes, allowing them to pick up the newly applied custom networking configurations. Scaling down and then back up is a vital step to ensure that all nodes integrate with the updated ENIConfig settings seamlessly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*dzWYKCY34pcyBStbo4pvAw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*1e7lCbMP_b0Aov_0T-WwKQ.png" /></figure><p><strong>Step 7: Verification</strong></p><pre>kubectl get ENIConfigs</pre><pre>kubectl get pods -o wide</pre><h3>Conclusion</h3><p>By following these detailed steps, you have effectively set up a custom network configuration for your AWS EKS cluster using ENIConfig resources. This setup allows your cluster to manage secondary subnets and security groups dynamically across multiple availability zones, providing enhanced flexibility and control. Whether you’re optimizing network performance or enforcing security policies across different segments, these configurations help streamline your cloud infrastructure.</p><p>Happy networking and cluster management!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87a7749e642d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy the IoT Edge module to an Ubuntu VM — Azure Cloud]]></title>
            <link>https://sidath.medium.com/deploy-the-iot-edge-module-to-an-ubuntu-vm-azure-cloud-4462015b7696?source=rss-82cc35c5ecfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/4462015b7696</guid>
            <dc:creator><![CDATA[Sidath Weerasinghe]]></dc:creator>
            <pubDate>Fri, 06 Dec 2024 15:59:14 GMT</pubDate>
            <atom:updated>2024-12-07T07:39:40.662Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deploy the IoT Edge module to an Ubuntu VM — Azure Cloud</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*KFId1kaaaInA72ON9zeStg.jpeg" /></figure><p>This guide will walk you through deploying containerized applications to a virtual Linux device using Azure IoT Edge. IoT Edge enables you to manage and deploy code remotely, optimizing your IoT solutions by processing data closer to the source.</p><p><strong>Steps:</strong></p><ol><li><strong>Set Up Virtual Machine:</strong> Create a virtual machine to serve as your IoT Edge device.</li><li><strong>Create IoT Hub:</strong> Establish an IoT Hub in Azure to securely connect and manage your IoT devices.</li><li><strong>Register IoT Edge Device:</strong> Register your virtual machine as an IoT Edge device within the IoT Hub.</li><li><strong>Install IoT Edge Runtime:</strong> Install and start the IoT Edge runtime on the virtual machine, enabling it to execute IoT Edge modules.</li><li><strong>Deploy IoT Edge Module:</strong> Remotely deploy a containerized module to the IoT Edge device from Azure. This module will execute specific tasks on the device.</li></ol><h3>Create Ubuntu VM on Azure Cloud</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ip8LR9EBBJIikygRFERNGg.png" /></figure><p><strong>Here’s a step-by-step guide on how to create an Ubuntu VM on Azure:</strong></p><p>1. Log in to the Azure Portal</p><ul><li>Navigate to the Azure portal:</li><li>Sign in with your Azure account credentials.</li></ul><p>2. Create a Resource Group</p><ul><li>Search for “Resource group” in the search bar and select it.</li><li>Click “Create”.</li><li>Provide a name for your resource group</li><li>Choose a region</li><li>Click “Create”.</li></ul><p>3. Create a Virtual Machine</p><ul><li>Search for “Virtual machine” in the search bar and select it.</li><li>Click “Create”.</li><li>Enter the information as per the your choice (please check the above image for more details)</li></ul><p>Once the VM is deployed, you can connect to it using SSH.</p><h3>Prepare your Linux virtual machine for IoT Edge</h3><p>Installing can be done with a few commands. Open a terminal and run the following commands:</p><pre>wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb<br>sudo dpkg -i packages-microsoft-prod.deb</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D2bJCH-oZUChGRpZGwwx7w.png" /></figure><h3>Install a container engine</h3><p>Azure IoT Edge relies on an <a href="https://opencontainers.org/">OCI</a>-compatible container runtime. Docker CE/EE container images are compatible with the Moby runtime.</p><ol><li>Installing container runtime</li></ol><pre>sudo apt-get update<br>sudo apt-get install moby-engine</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KISRXzxcCFxiLwstX7xgPQ.png" /></figure><p>2. Add the following configurations to the /etc/docker/daemon.json file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*_eXOTVpHf7h0nTVOCXxo3Q.png" /></figure><p>3. Restart the docker service.</p><pre>systemctl restart docker</pre><h3>Install the IoT Edge runtime</h3><p>Azure IoT Edge empowers you to extend cloud intelligence to the edge, enabling real-time decision-making, reduced latency, enhanced security, and optimized bandwidth utilization. By deploying and managing containerized modules on your IoT devices, you can create more responsive, reliable, and scalable IoT solutions.</p><p>By following the steps below, you should have the latest version of IoT Edge installed and ready to deploy modules.</p><pre>sudo apt-get install aziot-edge</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E-pA8ZmS780_EjoSiBTKgw.png" /></figure><h3>Creating Azure IOT Hub</h3><p>To create an Azure IoT Hub, follow these steps:</p><ol><li><strong>Log in to the Azure portal:</strong> Sign in to your Azure account.</li><li><strong>Create a new resource:</strong> Click on “Create a resource” and search for “IoT Hub”.</li><li><strong>Fill in the details:</strong> Provide a name for your IoT hub, choose a pricing tier, and select a resource group and location.</li><li><strong>Review and create:</strong> Review the settings and click on “Create” to deploy your IoT hub.</li></ol><p>Once deployed, you can manage your IoT devices, configure device connections, and monitor device telemetry data through your IoT hub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*MpttxvaUMjRRME15emlUJg.png" /></figure><p>Here, you can see that no devices are connected, and no data are pushed to the IoT Hub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zekEk6jVbPaFRC--6x8iNw.png" /></figure><h3>Creating a device on IOT Hub</h3><p>To create a device in your Azure IoT Hub, follow these steps:</p><ol><li><strong>Navigate to your IoT hub:</strong> Go to the Azure portal and select your IoT hub.</li><li><strong>Open Device Management:</strong> Under the <strong>IoT Devices</strong> section, click on <strong>Devices</strong>.</li><li><strong>Add a new device:</strong> Click the <strong>Add device</strong> button.</li><li><strong>Provide device details:</strong> Enter a name for your device and choose a security method (symmetric key, X.509 certificate, or device provisioning service).</li><li><strong>Save the device:</strong> Click <strong>Save</strong> to create the device.</li></ol><p>Once created, you’ll get a device connection string, which is essential for your device to connect to the IoT hub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*QAzvs0SvGF5wVYUdk3yQ6A.png" /></figure><p>After the provision, you can see all the connection strings on this device to integrate with the edge device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Y9XdRR7AZi1U-kwsNwCXA.png" /></figure><h3>Provision the device</h3><p>To establish a secure connection between your IoT Edge device and the Azure IoT Hub, you’ll need to provision your device with a unique identity and authentication credentials. This process is typically referred to as device provisioning.</p><ol><li>Adding the configuration</li></ol><pre>sudo vi /etc/aziot/config.toml</pre><pre>[provisioning]<br>source = “manual”<br>connection_string = “HostName=sid-iot-hub.azure-devices.net;DeviceId=sid-edge-device;SharedAccessKey=+6PGG7eQbKcIcEv/52loEVCsl3seTWh9ewuyWv8i7Eo=”</pre><pre>sudo iotedge config apply</pre><p><em>connection_string got from the ‘sid-edge-device’ details. (primary connection string)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r8aiRW3d9SpaileSuai8kg.png" /></figure><h3>Deploy a module</h3><p>This means installing and running a specific piece of software, known as a “module,” onto your IoT Edge device. These modules are essentially containers that contain the code and dependencies needed to perform specific tasks, such as:</p><ul><li><strong>Collecting sensor data:</strong> Gathering data from various sensors attached to the device.</li><li><strong>Processing data:</strong> Analyzing and transforming the collected data.</li><li><strong>Sending data to the cloud:</strong> Uploading processed data to the cloud for further analysis or storage.</li></ul><p><strong>Why Deploy Modules?</strong></p><p>By deploying modules to your IoT Edge device, you can:</p><ul><li><strong>Reduce latency:</strong> Process data locally instead of sending it to the cloud.</li><li><strong>Improve reliability:</strong> Continue operations even with intermittent network connectivity.</li><li><strong>Enhance security:</strong> Process sensitive data locally to minimize security risks.</li><li><strong>Optimize bandwidth usage:</strong> Send only essential data to the cloud.</li></ul><p><strong>How to Deploy Modules:</strong></p><ul><li>Log into the Azure portal and navigate to your IoT Hub.</li><li>Select your IoT Edge device and click “Set modules.”</li><li>Add the desired modules, configure their settings, and deploy them.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y2EGQKmJKEI36VY3CoFTjg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vs847xKIBcfAw_hIZFDyzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ieq1ZkVjC6CfRBV1j6Vuzw.png" /></figure><p>Here, you can see that our module has been deployed successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u0Fv8bu67xnRSVSqwVKUfQ.png" /></figure><h3>How to verify</h3><ol><li>List down the iotedge list</li></ol><pre>sudo iotedge list</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JVhKaONHgqmEGS1A8qoZDw.png" /></figure><p>2. Check the logs and status</p><pre>sudo iotedge system status</pre><pre>sudo iotedge system logs</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7GOyVcQ-PmAnt_zPnwZgXQ.png" /></figure><p>3. Log into the Azure IoT Hub portal and check the dashboards. Here, you can see that data has been pushed to the IoT Hub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*arttBLZxEZYSLbXJSYmRGA.png" /></figure><h3>Summary</h3><p>Azure IoT Edge empowers you to extend cloud intelligence to the edge, enabling real-time decision-making, reduced latency, and enhanced security. By deploying and managing containerized modules on your IoT devices, you can create more responsive, reliable, and scalable IoT solutions.</p><p><strong>Key Benefits:</strong></p><ul><li><strong>Reduced Latency:</strong> Process data locally for faster insights.</li><li><strong>Optimized Bandwidth Usage:</strong> Minimize data transfer to the cloud.</li><li><strong>Enhanced Security:</strong> Process sensitive data on-device.</li><li><strong>Increased Reliability:</strong> Maintain operations even with network disruptions.</li></ul><p><strong>Key Steps:</strong></p><ol><li><strong>Create an IoT Hub:</strong> Set up a central hub for managing your IoT devices.</li><li><strong>Provision Devices:</strong> Assign unique identities and security credentials to your devices.</li><li><strong>Deploy Modules:</strong> Install and configure software modules to perform specific tasks on your devices.</li><li><strong>Monitor and Manage:</strong> Use the Azure portal or IoT Edge CLI to monitor device health and manage module deployments.</li></ol><p>By leveraging Azure IoT Edge, you can unlock the full potential of your IoT solutions and drive innovation in various industries.</p><p><strong>References</strong></p><p><a href="https://learn.microsoft.com/en-us/azure/iot-edge/quickstart-linux?view=iotedge-1.5">Quickstart creates an Azure IoT Edge device on Linux | Microsoft Learn</a></p><p><a href="https://learn.microsoft.com/en-us/azure/iot-edge/how-to-provision-single-device-linux-symmetric?view=iotedge-1.5&amp;tabs=azure-portal%2Cubuntu">Create IoT Edge device on Linux using symmetric keys — Azure IoT Edge | Microsoft Learn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4462015b7696" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup MySQL Master-Slave Replication Using MySQL 8 on RHEL 8]]></title>
            <link>https://blog.devops.dev/setup-mysql-master-slave-replication-using-mysql-8-on-rhel-8-e5fa115ac6f4?source=rss-82cc35c5ecfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5fa115ac6f4</guid>
            <category><![CDATA[replication]]></category>
            <category><![CDATA[failover]]></category>
            <category><![CDATA[master-slave-replication]]></category>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[architecture]]></category>
            <dc:creator><![CDATA[Sidath Weerasinghe]]></dc:creator>
            <pubDate>Fri, 12 May 2023 09:13:29 GMT</pubDate>
            <atom:updated>2023-05-15T16:42:02.272Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*qgPN7oq5uFN0Nllb.png" /></figure><p>MySQL master-slave replication is a process that allows data from a single MySQL database to be replicated to multiple MySQL servers, referred to as slaves. This allows for load balancing, backup, and redundancy of the database.</p><p>In a typical MySQL replication setup, one server is designated as the master, which is the primary database that receives all the write operations, while one or more servers are designated as slaves, which receive a copy of the data from the master. The replication is asynchronous, meaning that the slave servers may not have the latest data at all times but are eventually consistent.</p><ul><li>To set up MySQL master-slave replication, the following high level steps are typically taken:</li><li>Enable binary logging on the master server. This is done by modifying the MySQL configuration file to add the log_bin parameter.</li><li>Configure the slave server to connect to the master server. This is done by modifying the MySQL configuration file on the slave server to include the master-host, master-port, master-user, and master-password parameters.</li><li>Start the replication process by issuing the CHANGE MASTER TO command on the slave server, specifying the log file and position from which to start the replication.</li><li>Verify that replication is working by checking the slave status using the SHOW SLAVE STATUS command on the slave server.</li></ul><p>Once replication is set up, any changes made to the data on the master server will be automatically propagated to the slave servers. It is important to note that MySQL replication is not a backup solution and does not provide full consistency or guarantee of data safety, so it is important to have a backup plan in place.</p><h3><strong>Step 1 —</strong></h3><p>To enable binary logging and other configuration you need navigate to the below path of the MYSQL server</p><pre>sudo vim /etc/my.cnf</pre><p>Add the following line to the configuration file and save it.</p><p><em>Master Node</em></p><pre>bind-address =0.0.0.0<br>server-id = 1<br>log_bin = mysql-bin</pre><p><em>Slave Node</em></p><pre>bind-address =0.0.0.0<br>server-id = 2<br>log_bin = mysql-bin</pre><p>Then restart the MYSQL servers in both Master and Slave nodes</p><pre><br>sudo systemctl restart mysqld</pre><p>Check the running status and make sure that in active (running) state</p><pre><br>sudo systemctl status mysqld</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*ptyw4rNJCY0MLx7bc_04lg.png" /></figure><h3><strong>Step 2 —</strong></h3><p>You need to create a replication user. Therefore, log in to your MySQL master server as the root user and provide the password.</p><pre>CREATE USER ‘&lt;Replica Username&gt;’@’&lt;Replica IP&gt;’ IDENTIFIED BY ‘&lt;Replica User Password&gt;’;</pre><pre>GRANT REPLICATION SLAVE ON *.*TO ‘&lt;Replica Username&gt;’@’&lt;Replica IP&gt;’;</pre><pre>FLUSH PRIVILEGES;</pre><h3><strong>Step 3 —</strong></h3><p>Get the binary filename and position of the master MYSQL node</p><pre>SHOW MASTER STATUS \G;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*cgn0yMKgqp5_iWSTSwexTw.png" /></figure><p>Remember to take note of the resulting <strong>filename</strong> <em>mysql-bin.000001 </em>and its <strong>position</strong> <em>891</em>.</p><h3><strong>Step 4 —</strong></h3><p>In order to configure the slave node you may follow the below steps,</p><pre>STOP SLAVE;</pre><pre>CHANGE MASTER TO MASTER_HOST=’&lt;Master IP&gt;’,MASTER_USER=’&lt;Replica Username&gt;’,MASTER_PASSWORD=&lt;Replica User Password&gt;’,MASTER_LOG_FILE=’mysql-bin.000001&#39;,MASTER_LOG_POS=891;</pre><blockquote>MASTER_LOG_FILE and MASTER_LOG_POS values are obtained from the previous command (SHOW MASTER STATUS\G;) we ran on the master node.</blockquote><pre>START SLAVE;</pre><h3><strong>Step 5 —</strong></h3><p>Check the Slave status.</p><pre>SHOW SLAVE STATUS \G;</pre><p>If there are no errors, create a database on the master node and check whether that is replicated to the slave node.</p><h4><strong>Errors —</strong></h4><p>SHOW SLAVE STATUS \G; has some issues like the below,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xgHpOe2JGBxqARxbstHLMg.png" /></figure><p>Last_IO_Error: error connecting to master ‘&lt;Replica Username&gt;@&lt;IP&gt;:3306’ — retry-time: 60 retries: 1 message: Authentication plugin ‘caching_sha2_password’ reported error: Authentication requires secure connection.</p><p>In this case, you have to reset the slave and need to reconfigure it.</p><pre>STOP SLAVE;<br>RESET SLAVE;<br>RESET SLAVE ALL;</pre><pre>CHANGE MASTER TO GET_MASTER_PUBLIC_KEY=1;</pre><pre>CHANGE MASTER TO MASTER_HOST=’&lt;Master IP&gt;’,MASTER_USER=’&lt;Replica Username&gt;’,MASTER_PASSWORD=&lt;Replica User Password&gt;’,MASTER_LOG_FILE=’mysql-bin.000001&#39;,MASTER_LOG_POS=891;</pre><pre>START SLAVE;</pre><pre>SHOW SLAVE STATUS \G;</pre><p>It is important to note that MySQL master-slave replication failover is not a backup solution and does not provide full consistency or guarantee of data safety, so it is important to have a backup plan in place.</p><p>References —</p><ul><li><a href="https://dev.mysql.com/blog-archive/mysql-terminology-updates/">MySQL :: MySQL Terminology Updates</a></li><li><a href="https://dev.mysql.com/doc/refman/8.0/en/replication-howto-repuser.html">MySQL :: MySQL 8.0 Reference Manual :: 17.1.2.3 Creating a User for Replication</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5fa115ac6f4" width="1" height="1" alt=""><hr><p><a href="https://blog.devops.dev/setup-mysql-master-slave-replication-using-mysql-8-on-rhel-8-e5fa115ac6f4">Setup MySQL Master-Slave Replication Using MySQL 8 on RHEL 8</a> was originally published in <a href="https://blog.devops.dev/">DevOps.dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s prepare for GKE cluster versions >= 1.19]]></title>
            <link>https://sidath.medium.com/lets-prepare-for-gke-cluster-versions-1-19-c1e432f161d3?source=rss-82cc35c5ecfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1e432f161d3</guid>
            <category><![CDATA[site-reliability-engineer]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[google-kubernetes-engine]]></category>
            <dc:creator><![CDATA[Sidath Weerasinghe]]></dc:creator>
            <pubDate>Sun, 07 Aug 2022 08:35:51 GMT</pubDate>
            <atom:updated>2022-08-07T08:35:51.790Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fXf5tP7HtXDkEvvqS0njWQ.jpeg" /></figure><p>Google cloud has taken two significant changes in the GKE cluster version from 1.18 to 1.19 that we need to pay more attention to.</p><p>1. Google Kubernetes Engine doesn’t support the basic authentication for accessing the Kubernetes APIs.</p><p>2. Kubernetes controller manager image change from Debian to distroless.</p><p>Considering the above changes, here we are talking about the 1st change because that is the change most of the applications used for building the application coordination in the Kubernetes environment.</p><p>First, you have to identify your application components that use the Kubernetes APIs. Most of the applications which built early stage of the Kubernetes versions probably that application used the basic authentication for calling the Kubernetes APIs.</p><blockquote>“Basic Authentication<strong><em> </em></strong>means that you have to enter the username and password when making the API request to get authenticated.”</blockquote><p>Below API call can get all the endpoint details from your Kubernetes cluster using the basic authentication.</p><pre>curl -u username:password https://&lt;cluster_endpoint&gt;/api/v1/namespaces/default/endpoints</pre><p>After upgrading your cluster to the GKE version 1.19 or above, this API call wasn’t work because upgraded GKE versions do not support basic authentication. You can get the below error for the above API call,</p><pre>{<br>   &quot;kind&quot;:&quot;Status&quot;,<br>   &quot;apiVersion&quot;:&quot;v1&quot;,<br>   &quot;metadata&quot;:{<br>   },<br>   &quot;status&quot;:&quot;Failure&quot;,<br>   &quot;message&quot;:&quot;endpoints is forbidden: User \&quot;system:anonymous\&quot; cannot list resource \&quot;endpoints\&quot; in API group \&quot;\&quot; in the namespace \&quot;default\&quot;&quot;,<br>   &quot;reason&quot;:&quot;Forbidden&quot;,<br>   &quot;details&quot;:{<br>      &quot;kind&quot;:&quot;endpoints&quot;<br>   },<br>   &quot;code&quot;:403</pre><p>The solution is to use the Token-based authentication instead of the basic authentication. You have to follow the below steps to generate the token.</p><p><strong>Step 01</strong></p><p>You have to create the service account for your namespace in the Kubernetes cluster.</p><p><em>Service account name = my-service-account</em></p><p><em>Namespace = my-namespace</em></p><pre>kubectl create serviceaccount my-service-account -n my-namespace</pre><p>You can verify by list downing the service account,</p><pre>kubectl get sa -n my-namespace</pre><p><strong>Step 2</strong></p><p>You have to create the cluster role by allowing the allowed accesses.</p><p>Create the <em>cluster-role.yaml </em>file using the below content.</p><pre>apiVersion: rbac.authorization.k8s.io/v1<br>kind: ClusterRole<br>metadata:<br>  name: my-cluster-role<br>  namespace: my-namespace<br>rules:<br>  - apiGroups:<br>        - &quot;&quot;<br>        - apps<br>        - autoscaling<br>        - batch<br>        - extensions<br>        - policy<br>        - rbac.authorization.k8s.io<br>    resources:<br>      - pods<br>      - componentstatuses<br>      - configmaps<br>      - daemonsets<br>      - deployments<br>      - events<br>      - endpoints<br>      - horizontalpodautoscalers<br>      - ingress<br>      - jobs<br>      - limitranges<br>      - namespaces<br>      - nodes<br>      - pods<br>      - persistentvolumes<br>      - persistentvolumeclaims<br>      - resourcequotas<br>      - replicasets<br>      - replicationcontrollers<br>      - serviceaccounts<br>      - services<br>    verbs: [&quot;get&quot;, &quot;list&quot;, &quot;watch&quot;, &quot;create&quot;, &quot;update&quot;, &quot;patch&quot;, &quot;delete&quot;]</pre><p>You can apply the changes by executing the below command,</p><pre>kubectl apply -f cluster-role.yaml</pre><p>my-cluster-role has full access to all Kubernetes cluster resources. In your scenarios, you can choose the access level and the resource that your cluster role should access. Based on that, you can adjust the able yaml file.</p><p><strong>Step 3</strong></p><p>We have to map our service account and the cluster role by creating the CluserRole Binding.</p><p>Create the <em>cluster-binding.yaml</em> file using the below content.</p><pre>apiVersion: rbac.authorization.k8s.io/v1<br>kind: ClusterRoleBinding<br>metadata:<br>  name: my-cluster-role-binding<br>subjects:<br>- namespace: my-namespace <br>  kind: ServiceAccount<br>  name: my-service-account <br>roleRef:<br>  apiGroup: rbac.authorization.k8s.io<br>  kind: ClusterRole<br>  name: my-cluster-role</pre><p>You can apply the changes by executing the below command,</p><pre>kubectl apply -f cluster-binding.yaml</pre><p><strong>Step 4</strong></p><p>Getting the token which is created for the service account.</p><pre>kubectl get sa -n my-namespace</pre><pre>kubectl describe sa my-service-account -n my-namespace</pre><p>Get token name from the above command results.</p><pre>kubectl get secrets -n my-namespace</pre><p>Get the correct token similar to the token name that is returned from the description of the service account.</p><pre>kubectl describe secrets &lt;token_name&gt; -n my-namespace</pre><p>Now, let’s call the API call again with the token –</p><pre>curl https://&lt;cluster_endpoint&gt;/api/v1/namespaces/default/endpoints -H “Authorization: Bearer &lt;token&gt;”</pre><p>You can get the correct results, and the curl is authenticated through the bearer token.</p><blockquote>Try to migrate your GKE version to the new GKE version. Don’t wait until GCP does the force upgrades.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1e432f161d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[High Performance Logging — Java]]></title>
            <link>https://medium.com/javarevisited/high-performance-logging-java-59ba374b2166?source=rss-82cc35c5ecfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/59ba374b2166</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[high-performance]]></category>
            <category><![CDATA[chronicle]]></category>
            <category><![CDATA[logging]]></category>
            <category><![CDATA[log4j2]]></category>
            <dc:creator><![CDATA[Sidath Weerasinghe]]></dc:creator>
            <pubDate>Tue, 07 Sep 2021 18:32:34 GMT</pubDate>
            <atom:updated>2021-09-25T15:44:01.624Z</atom:updated>
            <content:encoded><![CDATA[<h3>High Performance Logging — Java</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*5ifr_P2aTHyNcc4xuoR7gA.jpeg" /></figure><p>Logging is an essential principle in the software when architecting and designing the development. Because logging directly affects the application performance. If we do not do meaningful and understandable logging in our application, troubleshooting in the production application is a nightmare. We need to know what we need to log and what we should not log. Otherwise, we will end up with many issues such as security issues, capacity issues, etc.</p><h4>SLF4J (Simple Logging Facade for Java)</h4><p>SLF4J provides the logging API for logging frameworks such as Log4j, Log4j2, Logback and so on. This help to reduce the tight coupling between the various logging framework and your application. That will improve the code maintainability as well. The best way is to <a href="https://javarevisited.blogspot.com/2013/08/why-use-sl4j-over-log4j-for-logging-in.html#axzz6JyHI5fGb">use the SLF4J in your code</a> and use the logging framework on the runtime.</p><p>The most popular logging frameworks are Log4j and Log4j2 in the software industry.</p><h4>Why Log4j2 is better than Log4j ?</h4><ul><li>Mainly Log4j2 supports the Async loggers.</li><li>No need to restart the servers when configuration modification on the Log4j2 configuration files.</li><li>Garbage-free runtime.</li><li>Developers can define the custom log levels.</li><li>Concurrency improvement and no any deadlocks.</li><li>From java 8 onwards lambda function support for the logging.</li></ul><h4>Chronicle Logger with Log4j2</h4><p>Chronicle logger is an extremely fast logger developed for the Java language with the use of Chronicle Queue as a persistence engine. It supports the use of the Log4j2 logging framework. With this implementation of chronicle logger, we can minimize the logging overhead on the application and improve the application performance. In this method, the logging part takes care from the OS level on in the <a href="https://medium.com/javarevisited/7-best-courses-to-learn-jvm-garbage-collection-and-performance-tuning-for-experienced-java-331705180686?source=---------8------------------">JVM application</a>.</p><p><em>Use this Dependency —</em></p><pre>&lt;<strong>dependency</strong>&gt;<br>    &lt;<strong>groupId</strong>&gt;net.openhft&lt;/<strong>groupId</strong>&gt;<br>    &lt;<strong>artifactId</strong>&gt;chronicle-logger-log4j-2&lt;/<strong>artifactId</strong>&gt;<br>    &lt;<strong>version</strong>&gt;4.21ea40&lt;/<strong>version</strong>&gt;<br>&lt;/<strong>dependency</strong>&gt;</pre><p><em>Sample logging configuration file —</em></p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;configuration packages=&quot;net.openhft.chronicle.logger,net.openhft.chronicle.logger.log4j2&quot;&gt;<br>    &lt;appenders&gt;<br>        &lt;Chronicle name=&quot;CHRONICLE&quot;&gt;<br>            &lt;path&gt;/var/log/&lt;/path&gt;<br>            &lt;chronicleCfg&gt;<br>                &lt;blockSize&gt;128&lt;/blockSize&gt;<br>                &lt;bufferCapacity&gt;256&lt;/bufferCapacity&gt;<br>     &lt;rollCycle&gt;HOURLY&lt;/rollCycle&gt;<br>            &lt;/chronicleCfg&gt;<br>        &lt;/Chronicle&gt;<br>    &lt;/appenders&gt;<br>    &lt;loggers&gt;<br>        &lt;logger name=&quot;chronicle&quot; level=&quot;info&quot; additivity=&quot;false&quot;&gt;<br>            &lt;appender-ref ref=&quot;CHRONICLE&quot;/&gt;<br>        &lt;/logger&gt;<br>    &lt;/loggers&gt;<br>&lt;/configuration&gt;</pre><h4>Log4j2 Memory Mapped File Appender</h4><p>This is another way of high-performance logging that gives the logging responsibility to the operating system. The main benefit of using memory-mapped files is application performance. There are not I/O overhead to the JVM when performing logging. Because instead of logging the logs to the disk memory-mapped File appender writes the log events to the local memory.</p><p><em>Sample logging configuration file —</em></p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;Configuration status=&quot;info&quot; name=&quot;SampleApplication&quot; packages=&quot;com.sidath.app&quot;&gt;<br>  &lt;Appenders&gt;<br>    &lt;MemoryMappedFile name=&quot;AppLog&quot; fileName=&quot;/var/log/application.log&quot;&gt;<br>      &lt;PatternLayout&gt;<br>        &lt;Pattern&gt;%d %p %c{1.} [%t] %m%n&lt;/Pattern&gt;<br>      &lt;/PatternLayout&gt;<br>    &lt;/MemoryMappedFile&gt;<br>  &lt;/Appenders&gt;<br>  &lt;Loggers&gt;<br>    &lt;Root level=&quot;Info&quot;&gt;<br>      &lt;AppenderRef ref=&quot;AppLog&quot;/&gt;<br>    &lt;/Root&gt;<br>  &lt;/Loggers&gt;<br>&lt;/Configuration&gt;</pre><h4>Summery</h4><p>Logging is a crucial part of software development. That directly affects the application performance because logging is a highly I/O intensive operation. If you really concern about the application performance, then better to use above mention approach.</p><p><strong><em>References</em></strong></p><p><a href="https://github.com/OpenHFT/Chronicle-Logger#chronicle-logger-log4j-2">OpenHFT/Chronicle-Logger: A sub microsecond java logger, supporting standard logging APIs such as Slf &amp; Log4J (github.com)</a></p><p><a href="https://logging.apache.org/log4j/log4j-2.1/manual/appenders.html">Log4j 2 Appenders — Apache Log4j 2</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=59ba374b2166" width="1" height="1" alt=""><hr><p><a href="https://medium.com/javarevisited/high-performance-logging-java-59ba374b2166">High Performance Logging — Java</a> was originally published in <a href="https://medium.com/javarevisited">Javarevisited</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Builder Pattern with Java Lombok]]></title>
            <link>https://sidath.medium.com/builder-pattern-with-java-lombok-67c507aeb06d?source=rss-82cc35c5ecfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/67c507aeb06d</guid>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[lombok]]></category>
            <category><![CDATA[builder-pattern]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Sidath Weerasinghe]]></dc:creator>
            <pubDate>Sat, 26 Dec 2020 19:32:07 GMT</pubDate>
            <atom:updated>2020-12-27T04:28:06.896Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/564/0*vMsX1jaQBd4BbZ28.png" /><figcaption>Image source — <a href="https://stacktraceguru.com/builder-pattern">https://stacktraceguru.com/builder-pattern</a></figcaption></figure><p>Most developers use the builder pattern to reduce the complexity of creating complex objects by giving the step by step approach. The builder pattern reduces the boilerplate codes in your program.</p><blockquote>What are the problems we are going to solve from the builder pattern?</blockquote><p>If we have several parameters on the constructor, it isn’t easy to remember the parameters’ order. Based on the application logic, sometimes we need to write to several constructors.</p><p>Suppose you want to create immutable classes, then better to use the builder pattern. The builder pattern gives immutable classes with a large set of state attributes.</p><p>If you have mandatory parameters and optional parameters, then you need to maintain several constructors. In this case, better to use the builder pattern.</p><h4>Traditional way of implementation without builder pattern</h4><pre><strong>public class </strong>Person {<br><br>    <strong>private </strong>String <strong>firstName</strong>;<br>    <strong>private </strong>String <strong>secondName</strong>;<br>    <strong>private int age</strong>;<br>    <strong>private </strong>String <strong>address</strong>;<br>    <strong>private </strong>String <strong>idNumber</strong>;<br><br><br>    <strong>public </strong>Person(String firstName) {<br>        <strong>this</strong>.<strong>firstName </strong>= firstName;<br>    }<br><br>    <strong>public </strong>Person(String firstName, <strong>int </strong>age) {<br>        <strong>this</strong>.<strong>firstName </strong>= firstName;<br>        <strong>this</strong>.<strong>age </strong>= age;<br>    }<br><br>    <strong>public </strong>Person(String firstName, <strong>int </strong>age, String idNumber) {<br>        <strong>this</strong>.<strong>firstName </strong>= firstName;<br>        <strong>this</strong>.<strong>age </strong>= age;<br>        <strong>this</strong>.<strong>idNumber </strong>= idNumber;<br>    }<br><br>    <strong>public </strong>Person(String firstName, String secondName, String address) {<br>        <strong>this</strong>.<strong>firstName </strong>= firstName;<br>        <strong>this</strong>.<strong>secondName </strong>= secondName;<br>        <strong>this</strong>.<strong>address </strong>= address;<br>    }<br><br>    <strong>public </strong>Person(String firstName, String secondName, <strong>int </strong>age, String address, String idNumber) {<br>        <strong>this</strong>.<strong>firstName </strong>= firstName;<br>        <strong>this</strong>.<strong>secondName </strong>= secondName;<br>        <strong>this</strong>.<strong>age </strong>= age;<br>        <strong>this</strong>.<strong>address </strong>= address;<br>        <strong>this</strong>.<strong>idNumber </strong>= idNumber;<br>    }<br><br>    <strong>public </strong>String getFirstName() {<br>        <strong>return firstName</strong>;<br>    }<br><br>    <strong>public void </strong>setFirstName(String firstName) {<br>        <strong>this</strong>.<strong>firstName </strong>= firstName;<br>    }<br><br>    <strong>public </strong>String getSecondName() {<br>        <strong>return secondName</strong>;<br>    }<br><br>    <strong>public void </strong>setSecondName(String secondName) {<br>        <strong>this</strong>.<strong>secondName </strong>= secondName;<br>    }<br><br>    <strong>public int </strong>getAge() {<br>        <strong>return age</strong>;<br>    }<br><br>    <strong>public void </strong>setAge(<strong>int </strong>age) {<br>        <strong>this</strong>.<strong>age </strong>= age;<br>    }<br><br>    <strong>public </strong>String getAddress() {<br>        <strong>return address</strong>;<br>    }<br><br>    <strong>public void </strong>setAddress(String address) {<br>        <strong>this</strong>.<strong>address </strong>= address;<br>    }<br><br>    <strong>public </strong>String getIdNumber() {<br>        <strong>return idNumber</strong>;<br>    }<br><br>    <strong>public void </strong>setIdNumber(String idNumber) {<br>        <strong>this</strong>.<strong>idNumber </strong>= idNumber;<br>    }<br>}</pre><p>By looking at the above code, you can see so many code lines (boilerplate code). The above class has several constructors with different parameters and the getter and setters for each variable.</p><h4>Builder pattern traditional implementation</h4><pre><strong>public class </strong>Person {<br><br>    <strong>private </strong>String <strong>firstName</strong>;<br>    <strong>private </strong>String <strong>secondName</strong>;<br>    <strong>private int age</strong>;<br>    <strong>private </strong>String <strong>address</strong>;<br>    <strong>private </strong>String <strong>idNumber</strong>;<br><br>    <strong>private </strong>Person(PersonBuilder builder) {<br>        <strong>this</strong>.<strong>firstName </strong>= builder.<strong>firstName</strong>;<br>        <strong>this</strong>.<strong>secondName </strong>= builder.<strong>secondName</strong>;<br>        <strong>this</strong>.<strong>age </strong>= builder.<strong>age</strong>;<br>        <strong>this</strong>.<strong>address </strong>= builder.<strong>address</strong>;<br>        <strong>this</strong>.<strong>idNumber </strong>= builder.<strong>idNumber</strong>;<br>    }<br><br>    <strong>public </strong>String getFirstName() {<br>        <strong>return firstName</strong>;<br>    }<br><br>    <strong>public </strong>String getSecondName() {<br>        <strong>return secondName</strong>;<br>    }<br><br>    <strong>public int </strong>getAge() {<br>        <strong>return age</strong>;<br>    }<br><br>    <strong>public </strong>String getAddress() {<br>        <strong>return address</strong>;<br>    }<br><br>    <strong>public </strong>String getIdNumber() {<br>        <strong>return idNumber</strong>;<br>    }<br>    <br>    <strong>public static class </strong>PersonBuilder {<br>        <strong>private </strong>String <strong>firstName</strong>;<br>        <strong>private </strong>String <strong>secondName</strong>;<br>        <strong>private int age</strong>;<br>        <strong>private </strong>String <strong>address</strong>;<br>        <strong>private </strong>String <strong>idNumber</strong>;<br>        <br>        <strong>public </strong>PersonBuilder firstName(String firstName) {<br>            <strong>this</strong>.<strong>firstName </strong>= firstName;<br>            <strong>return this</strong>;<br>        }<br><br>        <strong>public </strong>PersonBuilder secondName(String secondName) {<br>            <strong>this</strong>.<strong>secondName </strong>= secondName;<br>            <strong>return this</strong>;<br>        }<br><br>        <strong>public </strong>PersonBuilder age(<strong>int </strong>age) {<br>            <strong>this</strong>.<strong>age </strong>= age;<br>            <strong>return this</strong>;<br>        }<br><br>        <strong>public </strong>PersonBuilder address(String address) {<br>            <strong>this</strong>.<strong>address </strong>= address;<br>            <strong>return this</strong>;<br>        }<br><br>        <strong>public </strong>PersonBuilder idNumber(String idNumber) {<br>            <strong>this</strong>.<strong>idNumber </strong>= idNumber;<br>            <strong>return this</strong>;<br>        }<br><br>        <strong>public </strong>Person build() {<br>            Person person = <strong>new </strong>Person(<strong>this</strong>);<br>            <strong>return </strong>person;<br>        }<br><br>    }<br>}</pre><p>Usage —</p><pre>Person person = <strong>new </strong>Person.PersonBuilder()<br>        .firstName(<strong>&quot;Sidath&quot;</strong>)<br>        .secondName(<strong>&quot;Weerasinghe&quot;</strong>)<br>        .age(26).build();</pre><h3>Lombok</h3><p>Lombok is a small java library tool that reduces the boiler pate code in the java project using annotations. It improves the code readability and helps to reduce the lines of code in the program.</p><blockquote>Any performance issue using Lombok ?</blockquote><p>Lombok works on the java compile time, so there is no performance issue with the java runtime. Based on the annotations we are putting on the code base Lombok add all the boilerplate code according to that provided annotations to the .class files during the compilation time.</p><h4>Builder pattern implementation with Lombok annotations</h4><pre><strong>import </strong>lombok.Builder;<br><strong>import </strong>lombok.Getter;<br><br>@Getter<br>@Builder<br><strong>public class </strong>Person {<br><br>    <strong>private </strong>String <strong>firstName</strong>;<br>    <strong>private </strong>String <strong>secondName</strong>;<br>    <strong>private int age</strong>;<br>    <strong>private </strong>String <strong>address</strong>;<br>    <strong>private </strong>String <strong>idNumber</strong>;<br>}</pre><p>Usage —</p><pre>Person person = <strong>new </strong>Person.PersonBuilder()<br>        .firstName(<strong>&quot;Sidath&quot;</strong>)<br>        .secondName(<strong>&quot;Weerasinghe&quot;</strong>)<br>        .age(26).build();</pre><h3>Disadvantages of the builder pattern</h3><p>You cant create mutable objects. (this can be also resolved by using the genetic builder using the java reflection)</p><p>Reference —</p><ul><li><a href="https://stackoverflow.com/questions/39030576/can-lombok-decrease-performance">Can lombok decrease performance?</a></li><li><a href="https://projectlombok.org/">Project Lombok</a></li><li><a href="https://stackoverflow.com/questions/2829106/disadvantages-of-builder-design-pattern">disadvantages of builder design pattern</a></li><li><a href="https://stackoverflow.com/questions/31754786/how-to-implement-the-builder-pattern-in-java-8">How to implement the builder pattern in Java 8?</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67c507aeb06d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Resolve Docker Local MySQL “Warning: Error in connection_create: Failed to connect” Issue]]></title>
            <link>https://sidath.medium.com/how-to-resolve-docker-local-mysql-warning-error-in-connection-create-failed-to-connect-issue-c6454b309597?source=rss-82cc35c5ecfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6454b309597</guid>
            <category><![CDATA[dockerfiles]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[solutions]]></category>
            <dc:creator><![CDATA[Sidath Weerasinghe]]></dc:creator>
            <pubDate>Sat, 24 Oct 2020 15:54:47 GMT</pubDate>
            <atom:updated>2020-10-24T15:54:47.003Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/599/0*pErJLsQQEMfWy0HV" /></figure><p>Most of the developers building the docker images to reduce the setup time for development testing environment. Developer’s use the production equal docker container to do the testing for a developed product. Also, it enables better continuous integration and continuous deployment strategies.</p><p>As a development testing setups, most of the people run the MySQL as a service inside the docker container rather than using the cloud database service or separate database server.</p><p>Please find the below docker file for example -</p><p>Use the Ubuntu OS for the docker image</p><pre><strong>FROM</strong> ubuntu:16.04</pre><p>Installing the MYSQL using the apt commands</p><pre><strong>RUN</strong> apt-get update</pre><pre><strong>RUN</strong> apt-get install -y mysql-server</pre><p>Can start the MySQL server</p><pre><strong>RUN </strong>service mysql start</pre><p>Most of the time when building the docker image process is stopped and throwing an error by saying</p><blockquote>Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2 “No such file or directory”)</blockquote><p>This is basically happening because of the MySQL file directory permission issue.</p><p>To resolve this issue, you want to set the correct permissions for MySQL directories.</p><pre><strong>RUN </strong>chown <strong>-</strong>R mysql:mysql <strong>/</strong>var<strong>/</strong>lib<strong>/</strong>mysql <strong>&amp;&amp; </strong>service mysql start</pre><p>If you use the CMD command and start the MySQL server when the container launching in build image.</p><p>Set the MySQL directories permissions as below,</p><pre><strong>CMD </strong>chown <strong>-</strong>R mysql:mysql <strong>/</strong>var<strong>/</strong>lib<strong>/</strong>mysql <strong>/</strong>var<strong>/</strong>run<strong>/</strong>mysqld <strong>&amp;&amp; </strong>service mysql restart</pre><p>Reference —</p><p><a href="https://support.openanalytics.eu/t/docker-cant-connect-to-local-mysql-server-through-socket/1408">https://support.openanalytics.eu/t/docker-cant-connect-to-local-mysql-server-through-socket/1408</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6454b309597" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building CI/CD Pipeline without Jenkins]]></title>
            <link>https://sidath.medium.com/building-ci-cd-pipeline-without-jenkins-cab2bdc085b7?source=rss-82cc35c5ecfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/cab2bdc085b7</guid>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[workflow]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Sidath Weerasinghe]]></dc:creator>
            <pubDate>Sat, 06 Jun 2020 19:08:10 GMT</pubDate>
            <atom:updated>2020-06-06T19:08:10.909Z</atom:updated>
            <content:encoded><![CDATA[<p>In this blog, I&#39;m talking about the building a CI/CD pipeline without using the Jenkins server. We can build the CI/CD pipeline using the GitHub and the Docker Hub.</p><p>Below image shows that the CI/CD flow with the integration of GitHub, Docker Hub and on-premise server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PVSjJFpEgUx4p-yy.jpeg" /></figure><h3>Prerequisites</h3><ul><li>GitHub account (<a href="https://github.com/">https://github.com</a>)</li><li>Docker Hub account(<a href="https://hub.docker.com/">https://hub.docker.com</a>)</li><li>Application deployed server</li></ul><h3>Steps</h3><p>Please follow the below steps to setup simple CI-CD pipeline with your on-premise servers.</p><h3>Step 1</h3><p>First, create a Docker file for your codebase to deploy that in a docker container.</p><p>Create a file as “Dockerfile” in the code repository home and add the below content or you can write the docker scripts with respect to your application.</p><pre>FROM maven:3.6.3-jdk-11-slim</pre><pre>ENV PROJECT_HOME /mnt/project</pre><pre># add the directory to the path<br>ADD . /mnt/project</pre><pre>#Add a directory for logs<br>RUN mkdir -p /mnt/project/logs</pre><pre># Run maven<br>RUN cd /mnt/project &amp;&amp; mvn clean install</pre><pre># Expose the port<br>EXPOSE 8080</pre><pre># Run the jar file<br>CMD [&quot;java&quot;,&quot;-jar&quot;,&quot;-DlogPath=/mnt/project/logs&quot;,&quot;/mnt/project/target/simplecicd-1.0.0.jar&quot;]</pre><h3>Step 2</h3><p>Install docker in your on-premise server.</p><pre>sudo apt-get update<br>sudo apt-get remove docker docker-engine docker.io<br>sudo apt install docker.io<br>sudo systemctl start docker<br>sudo systemctl enable docker</pre><p>To verification</p><pre>docker --version<br>docker ps</pre><h3>Step 3</h3><p>Install webhook to the on-premise server.</p><pre><a href="https://packages.debian.org/sid/amd64/webhook/download">https://packages.debian.org/sid/amd64/webhook/download</a></pre><pre>wget <a href="http://ftp.cn.debian.org/debian/pool/main/w/webhook/webhook_2.6.9-1+b1_amd64.deb">http://ftp.cn.debian.org/debian/pool/main/w/webhook/webhook_2.6.9-1+b1_amd64.deb</a></pre><pre>sudo dpkg -i webhook_2.6.9-1+b1_amd64.deb</pre><h3>Step 4</h3><p>Create a repository on Docker Hub</p><h3>Step 5</h3><p>Add the secrets to GitHub Secrets under repository settings.</p><ul><li>DOCKER_REPO — address of your repository at Docker Hub</li><li>DOCKER_USER — Docker Hub username</li><li>DOCKER_PASS — Docker Hub password</li></ul><h3>Step 6</h3><p>Create a GitHub workflow.</p><p>Log into GitHub -&gt; go to your repository -&gt; Action -&gt; New Workflow -&gt; set up a workflow yourself</p><pre>name: CI-CD Pipeline</pre><pre>on:<br>  push:<br>    branches: [ master ]</pre><pre>jobs:<br>  build:<br>    name: Building the codebase<br>    runs-on: ubuntu-latest<br>    steps:<br>    - uses: actions/checkout@v2<br>    - name: Set up JDK 1.8<br>      uses: actions/setup-java@v1<br>      with:<br>        java-version: 1.8<br>    - name: Build with Maven<br>      run: mvn -B package --file pom.xml</pre><pre>  docker:<br>    name: Publish - Docker Hub<br>    runs-on: ubuntu-16.04<br>    needs: [build]</pre><pre>    env:<br>      REPO: ${{ secrets.DOCKER_REPO }}<br>    steps:<br>      - uses: actions/checkout@v2<br>      - name: Set up JDK 1.8<br>        uses: actions/setup-java@v1<br>        with:<br>          java-version: 1.8<br>      - name: Login to Docker Hub<br>        run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }}<br>      - name: Build Docker image<br>        run: docker build -t $REPO:latest .<br>      - name: Publish Docker image<br>        run: docker push $REPO</pre><h3>Step 7</h3><p>Go to the GitHub action tab and see the logs on the workflow executing.</p><p>After execution has done. Go to the Docker Hub and check the docker image under your repository.</p><h3>Step 8</h3><p>Now, you need to pull the docker image from the docker HUB and run it in the server.</p><pre>docker pull sidathweerasinghe/simple-cicd-pipeline:latest</pre><pre>docker run -itd --name demoapp -p 8080:8080 sidathweerasinghe/simple-cicd-pipeline:latest</pre><h3>Step 9</h3><p>Let’s config the webhook on the server.</p><p>Create a folder on the server name as “scripts”.</p><p>Then add the “hooks.json” config to that folder.</p><pre>[<br>  {<br>    &quot;id&quot;: &quot;redeploy-webhook&quot;,<br>    &quot;execute-command&quot;: &quot;/mnt/scripts/redeploy.sh&quot;,<br>    &quot;command-working-directory&quot;: &quot;/mnt/scripts&quot;<br>  }<br>]</pre><p>Create the “redeploy.sh” to redeploy the docker image after webhook triggered from the GitHub.</p><pre>#!/bin/sh<br>docker pull sidathweerasinghe/simple-cicd-pipeline:latest<br>docker stop demoapp<br>docker system prune -f</pre><pre>docker run -itd --name demoapp -p 8080:8080 sidathweerasinghe/simple-cicd-pipeline:latest</pre><p>Change the permission on that file.</p><pre>chmod +x redeploy.sh</pre><h3>Step 10</h3><p>Run the webhook service and test.</p><pre>webhook -hooks /mnt/scripts/hooks.json  -verbose &amp;</pre><p>Test URL -</p><pre>http://&lt;ip&gt;:9000/hooks/redeploy-webhook</pre><h3>Step 11</h3><p>Integrate with the GitHub workflow</p><p>Add the WEBHOOK_URL to the GitHub Secrets and edit the workflow.</p><pre>name: CI-CD Pipeline</pre><pre>on:<br>  push:<br>    branches: [ master ]</pre><pre>jobs:<br>  build:<br>    name: Building the codebase<br>    runs-on: ubuntu-latest<br>    steps:<br>    - uses: actions/checkout@v2<br>    - name: Set up JDK 1.8<br>      uses: actions/setup-java@v1<br>      with:<br>        java-version: 1.8<br>    - name: Build with Maven<br>      run: mvn -B package --file pom.xml</pre><pre>  docker:<br>    name: Publish - Docker Hub<br>    runs-on: ubuntu-16.04<br>    needs: [build]</pre><pre>    env:<br>      REPO: ${{ secrets.DOCKER_REPO }}<br>    steps:<br>      - uses: actions/checkout@v2<br>      - name: Set up JDK 1.8<br>        uses: actions/setup-java@v1<br>        with:<br>          java-version: 1.8<br>      - name: Login to Docker Hub<br>        run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }}<br>      - name: Build Docker image<br>        run: docker build -t $REPO:latest .<br>      - name: Publish Docker image<br>        run: docker push $REPO</pre><pre> redeploy:<br>   name: Trigger webhook to Redeploy<br>   runs-on: ubuntu-16.04<br>   needs: [docker]<br>   steps:<br>   - name: Invoke deployment hook<br>     uses: joelwmale/webhook-action@master<br>     env:<br>       WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}<br>       data: &quot;{ &#39;myField&#39;: &#39;myFieldValue&#39;}&quot;</pre><p>Go to your GitHub action tab and see your workflow logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uJSsxzUT4zL5XoklxjDP3w.png" /></figure><p>For more detail refer my GitHub repository — <a href="https://github.com/SidathWeerasinghe/simple-cicd-pipeline">https://github.com/SidathWeerasinghe/simple-cicd-pipeline</a></p><p>You can watch this tutorial video —</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FB3326IAiTvI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DB3326IAiTvI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FB3326IAiTvI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/14787b98eed73365a395f03feb903d14/href">https://medium.com/media/14787b98eed73365a395f03feb903d14/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cab2bdc085b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Calling Lambda Functions Through AWS API Gateway]]></title>
            <link>https://sidath.medium.com/calling-lambda-functions-through-aws-api-gateway-7ce4879f3ccb?source=rss-82cc35c5ecfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ce4879f3ccb</guid>
            <category><![CDATA[aws-api-gateway]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Sidath Weerasinghe]]></dc:creator>
            <pubDate>Tue, 20 Aug 2019 17:31:29 GMT</pubDate>
            <atom:updated>2019-08-20T17:31:29.586Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TyUf7RYaeFnf9EMP9dgHIA.png" /></figure><p>Read my article — <a href="https://dzone.com/articles/calling-lambda-function-through-aws-api-gateway">https://dzone.com/articles/calling-lambda-function-through-aws-api-gateway</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ce4879f3ccb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>