<?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 Shreeharan Hareendran on Medium]]></title>
        <description><![CDATA[Stories by Shreeharan Hareendran on Medium]]></description>
        <link>https://medium.com/@hareendran7?source=rss-257b6e74d0e1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*fqTjjUbFbK9JhWCVNkUJ0Q.jpeg</url>
            <title>Stories by Shreeharan Hareendran on Medium</title>
            <link>https://medium.com/@hareendran7?source=rss-257b6e74d0e1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 08:52:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hareendran7/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[Why EKS Was Secretly Killing Our Jobs — The Story Behind Exit Code 137]]></title>
            <link>https://towardsaws.com/why-eks-was-secretly-killing-our-jobs-the-story-behind-exit-code-137-231a99c68abd?source=rss-257b6e74d0e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/231a99c68abd</guid>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[auto-scaling-groups]]></category>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Shreeharan Hareendran]]></dc:creator>
            <pubDate>Thu, 30 Apr 2026 18:01:01 GMT</pubDate>
            <atom:updated>2026-04-30T18:01:01.583Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PPhMDVXJznlsYuPskbzAIA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@tar1k?utm_source=medium&amp;utm_medium=referral">Tarik Haiga</a></figcaption></figure><p>We run daily jobs on EKS using on demand capacity in self managed node groups. Throughout the day, we spin up 20–30 nodes from 0 node capcity multiple times to handle high I/O, memory intensive workloads. This setup was working reliably until it suddenly didn’t.</p><p>Out of nowhere, randomly some of our jobs started terminating with <strong>exit code 137</strong>.</p><h3>The First Assumption</h3><p>Our immediate assumption was straightforward:</p><blockquote><strong>We must be running out of memory.</strong></blockquote><p>After all, these jobs are resource heavy. High memory, it made sense.</p><p>But things didn’t add up.</p><ul><li>Containers exited with 137 (SIGKILL) but were not marked OOMKilled</li><li>Container memory usage stayed well below request/limit values</li></ul><p>That’s when the confusion started. Exit code 137 typically means the process was killed with a <strong>SIGKILL</strong>. But what was sending that signal?</p><h3>Chasing the Wrong Leads</h3><p>At this point, we were deep into debugging mode pulling our hair out trying to trace the source of the SIGKILL.</p><p>Our initial investigation focused on:</p><ul><li>The application itself</li><li>The nodes where the jobs were scheduled</li></ul><p>We also made a few changes to get better visibility:</p><ul><li>Continuously monitored memory allocation vs usage</li><li>Added application level logging to capture OS signals at the process level</li><li>Investigated <strong>Cluster Autoscaler (CA)</strong> and <strong>Auto Scaling Group (ASG)</strong> behavior</li></ul><p>The real breakthrough came when we shifted focus to the underlying infrastructure.</p><h3>Looking at the Infrastructure Layer</h3><p>Since our EKS node groups are managed by <strong>Cluster Autoscaler </strong>and backed by <strong>Auto Scaling Groups</strong>, we suspected something might be happening at that layer.</p><p>CA logs didn’t reveal anything unusual.</p><p>Additionally, we had already applied an annotation to the pod.</p><pre>cluster-autoscaler/safe-to-evict: &quot;false&quot;</pre><p>This prevents the Cluster Autoscaler from evicting the pod during any consolidation process that it triggers.</p><h3>The Clue That Changed Everything</h3><p>With further digging, we found the following entry in ASG activity logs:</p><pre>{<br>    &quot;Description&quot;: &quot;Terminating EC2 instance: i-04792288ff245cba2&quot;,<br>    &quot;Cause&quot;: &quot;At 2026-01-13T06:14:28Z instances were launched to balance <br>    instances in zones eu-west-2a eu-west-2b with other zones resulting <br>    in more than desired number of instances in the group. At <br>    2026-01-13T06:14:57Z an instance was taken out of service in response <br>    to a difference between desired and actual capacity, shrinking the <br>    capacity from 13 to 12.&quot;,<br>    &quot;StatusCode&quot;: &quot;Successful&quot;<br>}</pre><p>We started correlating events:</p><ul><li>Job failure timestamp</li><li>ASG activity logs</li><li>Node instance IDs</li></ul><p>Every time a job failed, we saw a matching ASG termination event. The instance ID always lined up with the node running the job. That’s when it clicked.</p><h3>The Culprit: AZ Rebalancing</h3><p>This wasn’t a memory issue. This wasn’t an application issue. This was <strong>AWS Auto Scaling doing AZ rebalancing</strong>.</p><p>When ASG detects imbalance across Availability Zones , it:</p><ol><li>Launches new instances in underrepresented AZs</li><li>Terminates instances in overrepresented AZs</li></ol><p>And it doesn’t care if your workloads are mid flight.</p><blockquote>The node gets terminated → Kubernetes kills the pods → your job exits with <strong>code 137 (SIGKILL)</strong>.</blockquote><p>We noticed that when we suddenly scale up a large number of nodes, the ASG rebalances across AZs and terminates excess instances, sometimes even the node running a workload.</p><h3>The Fix</h3><p>The quickest mitigation was to suspend the ASG AZRebalance process. This stopped mid-job terminations, but it comes with a tradeoff, the group may remain uneven across AZs, which can affect resilience and capacity distribution</p><p>CLI:</p><pre>aws autoscaling suspend-processes -scaling-processes AZRebalance <br>-auto-scaling-group-name &lt;asg-name&gt;</pre><p>Or via console:<br> <strong>ASG → Advanced configurations → Suspended processes → AZRebalance</strong></p><p>After this change, the unexpected job terminations stopped.</p><h3>Not Just Us</h3><p>We later did some research to see if anything similar had been reported and to find any community recommended fixes, and found that others had reported similar issues:</p><ul><li><a href="https://github.com/kubernetes/autoscaler/issues/6107">https://github.com/kubernetes/autoscaler/issues/6107</a></li><li><a href="https://github.com/aws/containers-roadmap/issues/1453">https://github.com/aws/containers-roadmap/issues/1453</a></li></ul><h3>What This Leaves Us Wondering</h3><p>Even though we found a fix, it raised some bigger questions for us as we think about the next steps. How do we move towards a more permanent solution? More importantly, how do we anticipate and prevent issues like this, instead of constantly reacting once they surface?</p><p>Or are these the kinds of trade offs we inevitably accept when running workloads on cloud infrastructure?</p><ul><li>Why does AZ rebalancing apply to <strong>on-demand </strong>compute capacity, which are expected to be stable?</li><li>What if users run <strong>critical/non interruptible workloads </strong>on on-demand compute capacity?</li><li>Why does infrastructure balancing take precedence over running workloads?</li><li>Should AZ rebalancing be <strong>disabled by default</strong>?</li><li>Should we consider <strong>single AZ node groups</strong> for <strong>non interruptible/stateless </strong>workloads?</li><li>Should <strong>one off </strong>workloads be architected in a way to always handle node interuptions?</li></ul><h3>Closing Thought</h3><p>If you ever see <strong>exit code 137 without OOMKilled</strong>, don’t stop at application level debugging.</p><p>Sometimes, the thing killing your workloads isn’t inside your container it’s your infrastructure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=231a99c68abd" width="1" height="1" alt=""><hr><p><a href="https://towardsaws.com/why-eks-was-secretly-killing-our-jobs-the-story-behind-exit-code-137-231a99c68abd">Why EKS Was Secretly Killing Our Jobs — The Story Behind Exit Code 137</a> was originally published in <a href="https://towardsaws.com/">Towards AWS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When Terraform Became a Bottleneck: How We Separated Infra and App Delivery]]></title>
            <link>https://aws.plainenglish.io/when-terraform-became-a-bottleneck-how-we-separated-infra-and-app-delivery-54781f4c7a80?source=rss-257b6e74d0e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/54781f4c7a80</guid>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[gitops]]></category>
            <dc:creator><![CDATA[Shreeharan Hareendran]]></dc:creator>
            <pubDate>Sat, 04 Apr 2026 12:20:18 GMT</pubDate>
            <atom:updated>2026-04-04T12:20:18.668Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_sm767tU3R1jhIz4toGXbA.png" /><figcaption>Image Credits AI</figcaption></figure><p>What started as a simple setup became a bottleneck and how we fixed it.</p><h3>Background</h3><p>We were a small platform team building and maintaining an internal cloud native platform on AWS. Like many early stage teams, we optimized for <strong>simplicity over perfection</strong>.</p><p>Due to the small team size and the need to keep things simple, we relied heavily on Terraform for everything. It was used as our Infrastructure as Code (IaC) tool to provision AWS resources (compute, network, storage, IAM, etc).</p><p>On top of that, we also used Terraform to manage the application lifecycle of platform components. These components were packaged as Helm charts and deployed into EKS via Terraform using the Helm and Kubernetes provider.</p><p>Overall, it was a single workflow with a single state file and a unified pipeline that handled both infrastructure provisioning and application deployment in an automated way.</p><p>Initially, this worked smoothly.</p><h3>The Turning Point</h3><p>As the team grew, multiple members started working in parallel across both infrastructure and application layers. This is where cracks began to appear.</p><p>We started facing several challenges:</p><ul><li><strong>Everything was tightly coupled</strong><br>Application and infrastructure changes were bundled together in a single tool</li><li><strong>We were stepping on each other’s toes</strong><br>Terraform state locking meant only one person could make changes at a time</li><li><strong>Reduced team velocity</strong><br>Both infrastructure provisioning and application delivery slowed down because everything had to go through the same pipeline</li><li><strong>Poor diff visibility for Helm changes</strong><br>You don’t get clean, readable diffs of Kubernetes manifests and harder to review changes</li><li><strong>No clear rollback mechanism</strong><br>Rolling back application changes deployed via Terraform was not straightforward</li><li><strong>No effective drift detection for applications</strong><br>Terraform had no awareness of any manual changes in application configs unless someone explicitly triggered a pipeline run</li></ul><p>This quickly became a bottleneck, and it was clear we needed a better approach.</p><h3>The Approach</h3><p>The task was to research and brainstorm possible solutions with the team to address the above challenges.</p><p>The goal was simple:</p><ul><li>Keep <strong>infrastructure provisioning and cloud resource management</strong> within Terraform (since it’s the industry standard IaC and the team was already comfortable with it)</li><li>Decouple <strong>application deployment and configuration management</strong> so developers and DevOps engineers could work independently without blocking each other</li></ul><p>After experimenting with different tools and workflows, we arrived at a solution that worked well for us internally:</p><blockquote><strong><em>Use Terraform for infrastructure and GitOps for application delivery</em></strong></blockquote><h3>The Solution</h3><h4>1. GitOps for Application Delivery</h4><p>We adopted GitOps (using Flux - tool selection reasoning is out of scope here).</p><ul><li>All application Helm charts, along with their configurations, were stored in a Git repository</li><li>Flux continuously monitored the repository and automatically applied changes to the cluster</li><li>Changes were automatically first rolled out to lower environments</li><li>Based on our internal defined conditions, they were progressively promoted to production</li></ul><p>This gave us:</p><ul><li>Automated deployments</li><li>Better visibility into changes</li><li>Easier rollbacks</li><li>Continuous drift detection</li></ul><h4>2. Terraform for Infrastructure</h4><p>Terraform continued to handle:</p><ul><li>Provisioning infrastructure resources (compute, networking, storage, DNS, monitoring) across multiple accounts and environments</li><li>Manage provisioning and maintenance of cloud resources required for applications such as: databases, S3 buckets, IAM users/roles, IAM policies</li></ul><p>This kept infrastructure concerns cleanly separated and predictable.</p><h3>Conclusion</h3><p>Looking back, the issue wasn’t Terraform itself.</p><p>It was how we used it.</p><p>Trying to manage both infrastructure and application delivery in a single workflow created unnecessary friction as the team scaled.</p><p>This approach gave us a <strong>decoupled workflow</strong> where developers and devops/cloud team members could work independently without blocking each other.</p><ul><li>Infrastructure changes remained stable and controlled via Terraform</li><li>Application delivery became faster, safer, and more flexible with GitOps</li></ul><p>In short:</p><blockquote><strong>Terraform is great for infra provisioning, but not ideal for application delivery</strong></blockquote><p>Separating these concerns significantly improved our team’s velocity, clarity, and overall developer experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54781f4c7a80" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/when-terraform-became-a-bottleneck-how-we-separated-infra-and-app-delivery-54781f4c7a80">When Terraform Became a Bottleneck: How We Separated Infra and App Delivery</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Hidden EKS Gotcha: Taints Don’t Work the Way You Think]]></title>
            <link>https://towardsaws.com/the-hidden-eks-gotcha-taints-dont-work-the-way-you-think-when-you-pin-amis-f646fcb135de?source=rss-257b6e74d0e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f646fcb135de</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[upgrade]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[ek]]></category>
            <category><![CDATA[taints-and-toleration]]></category>
            <dc:creator><![CDATA[Shreeharan Hareendran]]></dc:creator>
            <pubDate>Thu, 19 Mar 2026 10:29:47 GMT</pubDate>
            <atom:updated>2026-03-26T09:40:51.928Z</atom:updated>
            <content:encoded><![CDATA[<p>This post is about an interesting limitation we recently encountered while pinning the AMI ID in Amazon EKS.</p><h3>The Setup (Pretty Standard, or So We Thought)</h3><p>Our environment is set up with EKS self-managed node groups. Since we manage the lifecycle of these node groups, we recently decided to pin the AMI ID.</p><p>The goal was to ensure that the same AMI version tested in lower environments is promoted to production, while avoiding unexpected issues with application dependencies due to underlying OS changes. Without pinning, the latest available AMI could be pulled, leading to inconsistencies. To address this, we pinned the AMI version in our launch templates.</p><p>Certain node groups were already configured with specific taints and labels. Some workloads are expected to run only on these node groups. For example, we have:</p><ul><li><strong>Node Group A</strong> with:<br>– Taint: A<br>– Label: A</li></ul><p>We expect that only pods with:</p><ul><li>Toleration A, and</li><li>Node selector A</li></ul><p>should be scheduled onto these nodes.</p><h3>What We Saw (And Didn’t Expect)</h3><p>Pods <strong>without any tolerations</strong> started getting scheduled onto these nodes. That immediately felt wrong. Taints are supposed to <strong>block</strong> scheduling unless explicitly tolerated.</p><h3>What Was Actually Happening</h3><p>This behavior was surprising, so we began troubleshooting. Our initial thoughts were:</p><ul><li>Has EKS scheduling behavior changed?</li><li>Is there a misconfiguration somewhere?</li></ul><p>To dig deeper, we observed the node lifecycle in real time for a paricular node. What we found was:</p><ol><li>The node is created and joins the cluster.</li><li>It reaches the <strong>Ready</strong> state.</li><li><strong>After a delay</strong>, the taints are applied to the node.</li></ol><p>This means that during the time window the node becoming Ready and the taints being applied, <strong>pods without tolerations can get scheduled onto the node</strong>, which explains the unexpected behavior.</p><h3>Why This Happens</h3><p>We weren’t initially sure why this was happening, so we explored EKS documentation, launch template docs, AMI details, and EKS GitHub issues. After spending a fair amount of time digging through these, we eventually found the explanation in the AWS launch template documentation:</p><blockquote><strong><em>“Any taints set in the API are applied asynchronously if you specify an AMI ID. To apply taints prior to a node joining the cluster, you must pass the taints to kubelet in your user data using the </em></strong><strong><em>--register-with-taints command line flag.”</em></strong></blockquote><p><strong>Source:</strong><br><a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html</a></p><h3>The Fix (Not Obvious, But Simple)</h3><p>To ensure taints are applied <strong>before</strong> the node joins the cluster, they must be passed directly to the kubelet during bootstrap.</p><p>For AL2023 based AMIs, the fix is to include the following flag in the userdata script of node configuration:</p><pre> — register-with-taints=special=true:NoSchedule</pre><h4>Sample nodegroup launch template userdata</h4><pre>MIME-Version: 1.0<br>Content-Type: multipart/mixed; boundary=&quot;//&quot;<br><br>--//<br>Content-Type: application/node.eks.aws<br><br>---<br>apiVersion: node.eks.aws/v1alpha1<br>kind: NodeConfig<br>spec:<br>  cluster:<br>    apiServerEndpoint: https://XXXX.eu-west-2.eks.amazonaws.com<br>    certificateAuthority: xxx<br>    cidr: 10.100.0.0/16<br>    name: my_clutster<br>  kubelet:<br>    flags:<br>      - --register-with-taints=special=true:NoSchedule<br>--//--</pre><p><strong>Source:</strong><br><a href="https://docs.aws.amazon.com/eks/latest/eksctl/node-bootstrapping.html">https://docs.aws.amazon.com/eks/latest/eksctl/node-bootstrapping.html</a></p><h3>The Bigger Question</h3><p>This left us with bigger, slightly uncomfortable questions:</p><ul><li>How can we proactively identify such behavioral nuances before they impact workloads?</li><li>Is it realistic to expect teams to stay continuously up to date with such limitations and edge cases through resource specific official documentation?</li></ul><h3>Closing Thought</h3><p>Pinning AMIs gives you control, but it also removes some of the “safe defaults” EKS quietly handles for you.</p><p>And sometimes, those defaults matter more than you think.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f646fcb135de" width="1" height="1" alt=""><hr><p><a href="https://towardsaws.com/the-hidden-eks-gotcha-taints-dont-work-the-way-you-think-when-you-pin-amis-f646fcb135de">The Hidden EKS Gotcha: Taints Don’t Work the Way You Think</a> was originally published in <a href="https://towardsaws.com/">Towards AWS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ELK Stack]]></title>
            <link>https://medium.com/@hareendran7/elk-stack-7ced1aef9def?source=rss-257b6e74d0e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ced1aef9def</guid>
            <dc:creator><![CDATA[Shreeharan Hareendran]]></dc:creator>
            <pubDate>Thu, 18 May 2023 14:57:13 GMT</pubDate>
            <atom:updated>2023-05-18T14:57:13.914Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>The products we work daily rely and use multiple web servers and/or database servers. In such scenarios we don’t have a centralized logging system for analyzing or storing logs. During such situations analyzing, correlating logs and making educated decisions becomes an impossible task</p><p>For example a single exception which gets thrown in the middle of the system during a payment process can be devastating for both the end user and developers. This may lead a user viewing a blank page after clicking on the payment button. The appropriate remedy would be finding the issue and fixing it which falls on system administrators and developers..</p><p>But this means pulling logs from various servers and consolidating them through some manner before making a decision. That&#39;s how traditional system mangers treat logs. Set up one or more log servers receiving logs from servers, routers. Then using Unix commands such as — grep+awk,+sed+sort etc. Executing cronjobs periodically . After doing all these another burden is managing and analyzing the obtained paramount of data. They will in</p><p>This is where ELK stack comes for rescue. Users started to utile ELK for store logs, process and visualize them.The ELK stack is a collection of 3 open source products namely Elasticsearch, Logstash and Kibana</p><h3><strong>Basic Architecture of ELK</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*WFwWrKSd5RyEQCe1uwPMGg.png" /></figure><h3><strong>* Elasticsearch</strong></h3><p>Elastic Search is a robust search and analytics tool that stores data in a document-oriented data store. It is open source, meaning you can download, use and modify the program free of charge. The most popular usage of Elasticsearch today is Log Management. With document-oriented data storage, data is stored as structured JSON documents. Every field is indexed by default. Therefore, the search speed is incredible.</p><h3><strong>* Kibana</strong></h3><p>Kibana is an analytics and visualization platform which enables to easily visualize data from Elasticsearch Kibana is an Elasticsearch dashboard consist with line charts, pie charts and many others. Can plot the traffic to our website and show traffic in real time Can manage certain parts of elastic search and log stash such as authentication and authorization. Simply it is a web interface for the data stored in elastic search</p><h3><strong>* Logstash</strong></h3><p>Traditionally Logstash has been used to process logs from applications and send them to Elasticsearch. It is a data processing pipeline. The data Logstash receives will be handled as events and it can be of any kind</p><p>Ex — log file entries, ecommerce orders, chat messages</p><p>Log stash pipeline consist of 3 stages/plugins</p><p>Inputs, filters and outputs</p><p>Inputs can be from Kafka ques, http messages, relational DATABASE. These are processed by log stash and sent to one or more destinations. Such as elastic search, Kafka queue, Emil message.</p><p><strong>So, in a nutshell Logstash receives events from one or more inputs processes them and sends them to one more stash</strong></p><h3><strong>* Beats</strong></h3><p>Beats is a collection of so-called data shippers. They are light weight agents with a single purpose that you install on servers, which then sends data to Logstash or elastic search</p><h4>Types of beats</h4><p><strong>File beat</strong></p><p>collecting log files and sending them to Logstash or elastic search.File beat ships with modules for common logs such as ngnix the apache web server and MySQL.Can be used to collect access logs and error logs</p><p><strong>Metric beat</strong></p><p>collects system level or service metrics such as CPU and memory usage of OS and any other service</p><h4><strong>Various methods in which beats, Logstash, Elasticsearch and Kibana can be utilized</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*uecfEs3ASWhAaE5vPQEF4g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*G7ydCa2LUWb_-qkrEeLWSw.png" /></figure><h4><strong>References</strong></h4><p><a href="https://www.elastic.co/what-is/elk-stack">https://www.elastic.co/what-is/elk-stack</a></p><p><a href="https://towardsdatascience.com/an-overview-on-elasticsearch-and-its-usage-e26df1d1d24a">https://towardsdatascience.com/an-overview-on-elasticsearch-and-its-usage-e26df1d1d24a</a></p><p><a href="https://www.youtube.com/watch?v=Hqn5p67uev4">https://www.youtube.com/watch?v=Hqn5p67uev4</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ced1aef9def" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Integration with ETL and SSIS]]></title>
            <link>https://medium.com/@hareendran7/data-integration-with-etl-and-ssis-c1e8eda53f86?source=rss-257b6e74d0e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1e8eda53f86</guid>
            <category><![CDATA[etl]]></category>
            <category><![CDATA[bi]]></category>
            <category><![CDATA[data-integration]]></category>
            <dc:creator><![CDATA[Shreeharan Hareendran]]></dc:creator>
            <pubDate>Tue, 12 Nov 2019 02:57:24 GMT</pubDate>
            <atom:updated>2019-11-12T02:57:24.438Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to yet another post. This will provide you basic insights on ETL and SSIS.</p><h4><strong>Introduction</strong></h4><p>The availability of data on time is an important factor for a business to thrive. Organizations generate huge amounts of data daily about various activities based on their daily business operations. However data in raw format does not provide any meaningful insights, it should be processed by correct techniques to convert it to useful information.</p><p>Converting data to information is just part of the problem. In reality, an organization will consist of several operational units and interacts with external entities. Different sources will generate data in different formats and expose in different ways. The integration of those is a challenging task.</p><p>Data Integration/migration is a process in which heterogeneous data is retrieved and combined as an incorporated form and structure.</p><p>Data orchestration can be achieved through several processes/concepts,</p><ol><li>ETL</li><li>Data Cleansing</li><li>Data modeling</li><li>Data warehousing</li><li>Data merging migration and replication</li></ol><p><strong>What is ETL?</strong></p><p><a href="https://en.wikipedia.org/wiki/Data_extraction">Data extraction</a> involves extracting data from homogeneous or heterogeneous sources; <a href="https://en.wikipedia.org/wiki/Data_transformation">data transformation</a> processes data by <a href="https://en.wikipedia.org/wiki/Data_cleansing">data cleansing</a> and transforming them into a proper storage format/structure for the purposes of querying and analysis; finally, <a href="https://en.wikipedia.org/wiki/Data_loading">data loading</a> describes the insertion of data into the final target database such as an <a href="https://en.wikipedia.org/wiki/Operational_data_store">operational data store</a>, a <a href="https://en.wikipedia.org/wiki/Data_mart">data mart</a>, <a href="https://en.wikipedia.org/wiki/Data_lake">data lake</a> or a <a href="https://en.wikipedia.org/wiki/Data_warehouse">data warehouse</a>.</p><p>Source :- <a href="https://en.wikipedia.org/wiki/Extract,_transform,_load">https://en.wikipedia.org/wiki/Extract,_transform,_load</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*R5ycr8667WiiMfXSlN6RCQ.png" /></figure><p>Data integration mainly focuses on transferring data from a source or multiple sources to a destination in an expected format.</p><p>ETL solves this by,</p><ul><li><strong>E</strong>xtraction of data from source or multiple sources</li><li><strong>T</strong>ransformations of heterogeneous source data to destination expected format</li><li><strong>L</strong>oading or storing transformed data in the destination</li></ul><p><strong>The major benefit using ETL is that it is easier, convenient and faster to use to move data within two entities with transformations than traditional methods which requires many lines of codes. ETL tools contain graphical user interfaces which speeds up the process of mapping tables and columns between the source and destination tables.</strong></p><p>To achieve<strong> data integration</strong> via ETL there are several <strong>tools</strong> which are being used,</p><ol><li>SSIS</li><li>Informatica</li><li>Oracle Data Integrator</li><li>AWS Glue</li></ol><p>So let’s get going with <strong>SSIS</strong>,</p><p>Microsoft provides a suite of BI tools for data manipulation and reporting. Following are the main tools in the Microsoft BI Suite (MSBI),</p><ul><li><strong>SSIS -SQL Server Integration Services</strong></li><li><strong>SSAS-SQL Server Analysis Services</strong></li><li><strong>SSRS-SQL Server Reporting Services</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*VkTOBNL0rXIBqJixGnmL7Q.jpeg" /><figcaption>Application of MSBI Suite in a nutshell</figcaption></figure><p>It is a new tool provided by Microsoft called Sequel Software Integration Services (SSIS), which is more commonly known as SSIS. It is a component of the Microsoft SQL Server database software that can be used to perform a broad range of data integration and data transformation tasks, which is simply referred to as an ETL process.</p><p><strong>So simply put, SSIS provides you with tools to perform ETL.</strong></p><p>Don’t get overwhelmed with these jargons.</p><p>Let me take you through some visual of these concepts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*D3rtZjXxOOuDOWitqlbzaw.png" /></figure><p>On the left-hand side is what we call as extracting data. Your data may be spread across various systems such as CRM, billing, supply chain. So using SSIS, you can easily connect to these data sources or systems like Ekso, Hadoop, Oracle, excel files, etc and start pulling across systems.</p><p>Maybe different.</p><p><strong>For example, consider that employee payroll information is stored in Oracle and employee information is stored in Sequel Server and you need to build cubes for reporting and analysis. Another scenario would be like employee state represented with the word Washington in one database and the letters WA in another. So in both these scenarios, different formats of data will be maintained in both the databases and they should be transferred and maintained in a common format before analysis or report generation.</strong></p><p>This is where the trick of transformation comes into play. You can plan and clean or massage the data across systems so that your warehouse becomes a clean single source of truth. Once you transform the data you can load the data into a predefined and pre-designed table in a database.</p><h4><strong>Most common use cases of SSIS packages</strong></h4><ul><li>Archival of data (export)/loading of new data (import)</li><li>Transferring data from one data source to another</li><li>Data cleansing or transformation of dirty data</li><li>Merging Data from Heterogeneous Data Stores Populating Data</li><li>Warehouses and Data Marts Cleaning and Standardizing Data Building</li><li>Business Intelligence into a Data Transformation Process Automation</li></ul><h3><strong>Some more technicalities of SSIS</strong></h3><p>To get a comprehensive idea about SSIS I strongly recommend you to take a look at the below concepts and follow the attached tutorials.</p><h4><strong>SSISDB CatLog</strong></h4><p>The <strong>SSISDB</strong> catalog is the central point for working with Integration Services (SSIS) projects that you’ve deployed to the Integration Services server. For example, you set project and package parameters, configure environments to specify runtime values for packages, execute and troubleshoot packages, and manage Integration Services server operations.</p><p>The objects that are stored in the <strong>SSISDB</strong> catalog include projects, packages, parameters, environments, and operational history.</p><p>Source :- <a href="https://docs.microsoft.com/en-us/sql/integration-services/catalog/ssis-catalog?view=sql-server-ver15">https://docs.microsoft.com/en-us/sql/integration-services/catalog/ssis-catalog?view=sql-server-ver15</a></p><h4><strong>Parameters vs Variables</strong></h4><p><a href="https://docs.microsoft.com/en-us/sql/integration-services/integration-services-ssis-package-and-project-parameters?view=sql-server-ver15">Integration Services (SSIS) Package and Project Parameters - SQL Server Integration Services (SSIS)</a></p><h4><strong>Deploy and execute an SSIS package</strong></h4><p><a href="https://www.sqlservercentral.com/articles/how-to-deploy-and-execute-an-ssis-package-from-the-ssisdb-catalog">How to deploy and execute an SSIS package from the SSISDB catalog - SQLServerCentral</a></p><p>Makes sense?</p><p><strong>I would like to emphasize that, I have used many SSIS oriented terminologies (ex-SSISDB, parameters, package deployment, etc). My aim wasn’t to make you uncomfortable with the topic by using so many technical jargons, but rather give you an idea of all the basic components and terminologies to kick start with SSIS. Definitely, some terms will be hard to digest as newbies, so I recommend you to refer the following materials to get the meaning/understanding of those since the main goal of this post is to get your legs wet on SSIS and not to elaborate on every artifact.</strong></p><p>To get a clear understanding of the above, I recommend you to build a basic SSIS package to transfer data from a source to a destination with some basic transformations and deploy the created package on a SQL Server Integration Services and execute. This task will make you comfortable with the above.</p><p>Refer the below-mentioned links for a simple package creation and terminology explanations respectively,</p><ul><li><a href="https://docs.microsoft.com/en-us/sql/integration-services/lesson-1-create-a-project-and-basic-package-with-ssis?view=sql-server-ver15">Lesson 1: Create a project and basic package with SSIS - SQL Server Integration Services (SSIS)</a></li><li><a href="https://www.tutorialgateway.org/ssis/">SSIS Tutorial | SQL Server Integration Services Tutorial</a></li></ul><h4><strong>Conclusion</strong></h4><p>Organizations started to use ETL to integrate data and gather various insights. ETL is designed to operate majorly with databases and uses batch processing. Every business in the world deals with a vast amount of data. But these are nothing without a powerful tool to clean them up and make them accessible for analysis. So data management is becoming complex and data integration tools are needed to change to keep up the pace. So SSIS helps to successfully run an ETL task in eased manner.</p><p>I hope the above has given you a comprehensive idea on ETL and SSIS with all necessary basic components to start with.</p><p>Catch you in another post!!!</p><p>For further details refer the following,</p><ul><li><a href="https://datavirtuality.com/blog-etl-tools-and-processes/">ETL Tools and Processes 2019 Overview | Data Virtuality</a></li><li><a href="https://www.forbes.com/sites/louiscolumbus/2018/05/23/10-charts-that-will-change-your-perspective-of-big-datas-growth/#59e49f522926">10 Charts That Will Change Your Perspective Of Big Data&#39;s Growth</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1e8eda53f86" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reliability of Internet Banking Authentication Mechanisms]]></title>
            <link>https://medium.com/@hareendran7/reliability-of-internet-banking-authentication-mechanisms-a81f4b4127bb?source=rss-257b6e74d0e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/a81f4b4127bb</guid>
            <category><![CDATA[internet-banking]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[biometrics]]></category>
            <dc:creator><![CDATA[Shreeharan Hareendran]]></dc:creator>
            <pubDate>Tue, 12 Nov 2019 02:16:42 GMT</pubDate>
            <atom:updated>2019-11-12T02:16:42.469Z</atom:updated>
            <content:encoded><![CDATA[<p>The following post is an excerpt from one of my review papers. Since the domain of the paper was very much applicable and related in current online banking scenarios, I decided to make it a post.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*cKibMEtA00ZlfpT1bOZYkw.jpeg" /></figure><p>Internet banking is one of many services provided by a financial institution and is most widely used by the customers. Since the usage has increased a lot, internet banking has become a point of exploitation for data breaches. To prevent exploitation, authentication mechanisms are implemented to validate a user’s identity. Though various authentication mechanisms exist adversaries exploit them via the available vulnerabilities. Therefore it’s important to know the reliability/credibility level of different mechanisms to prevent hackers from exploiting the vulnerabilities and can further develop countermeasures for better security mechanisms to provide enhanced authentication experience for end-users.</p><h4><strong>Introduction</strong></h4><p>Internet banking or e-banking is around people’s lives for some time now. This service has been popular amongst users because it provides many conveniences to them. With this facility users are allowed to do tasks such as viewing personal details, checking account balances, making payments and fund transfers.</p><p>But unfortunately, this facility has come under many kinds of cyber-attacks. Attacks include phishing, espionage, social engineering and many more[1]. All these have resulted in affecting users on their confidence in using the internet banking facility. Therefore, the responsibility and duty of financial institutions to further enhance the existing security mechanisms or implement a new enhanced version of security measures for this facility.</p><p>There have been much researches and studies based on finding the various aspects of the reliability of internet banking security. However there have not been many, that emphasize the first line of defense or authentication. Authentication is verifying the identity of the user whom the individual claims to be. It is therefore important to focus on the credibility for the initial protection of internet banking named Authentication[1].</p><p>As stated above there have been many cases of attacks on internet banking. But the most commonly used method of attack is made at the beginning of the internet banking process, which is the exploitation of authentication. Vulnerabilities of authentication mechanisms are used to gain illegal access to an individual’s account to perform illegal activities. Furthermore, it is known one-factor authentication using passwords have been widely and only used mechanism by many institutions for authentication. People have forgotten how important the login process is because a lot of personal and financial data can been seen after authentication [1].</p><p><strong><em>The objective of this post is to discuss various available authentication mechanisms, risks, vulnerabilities involved in those, countermeasures taken and its level of reliability in today’s world.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/1*KcWjBu7P_REaBqVqPTX4Eg.jpeg" /></figure><h4><strong>Body</strong></h4><p>Many of the existing authentication mechanisms mainly depend on a conventional password-only authentication which is also widely known as the <strong>one-factor authentication/single factor authentication/knowledge-based authentication</strong>. The reason for using this is because of its easy operation, scalability, compatibility [3].</p><p>In this simply the user needs to remember a low entropy password while the passwords are stored in the sensitive verifier tables of the server. <strong>Even though passwords are stored using a salted hash function, once the server is compromised those will be available for the attackers because user-chosen passwords are highly skewed and the majority isn’t complex enough</strong>. So password cracking hardware and algorithms are continuously improved to attack traditional hash functions[3].</p><p>In recent years there were many news about data breaches such as Adobe(150 million), Evernote(50 million), Gmail(4.9million)[3]. The thing that makes this worse is that users use the same password to access multiple servers. So a compromise on one server will lead to compromisations of all the other servers. Which is also referred to as the “domino effect” of password reuse.</p><p>As stated above existing password-only authentication is not resistant to password guessing and password cracking attacks. However to address this problem research proposes an idea as <strong>eXtended Honey Encryption (XHE) scheme</strong> [2]. In this when an attacker attempts to log into an unauthorized account to gain illegal access by providing the guessed password, instead of rejection, the XHE algorithm will generate indistinguishable false bank data and redirect the illegal user to a false account by which the attacker cannot determine whether the guessed password was correct or not. Therefore<strong> this increases the complexity of password guessing and cracking attacks. This mechanism adds an additional layer of protection on the existing password-only authentication.</strong></p><p>With the available threats to one-factor authentication, many institutions have started to adopt two-factor authentication or token-based authentication. These mechanisms still requires the user to enter a password and a temporary password will be sent to the user’s mobile device as SMS at the login instance as a secondary confirmation, which is known as one-time password(OTP). Though this method seems to be much more secure than the one-factor authentication the disadvantage is that the user needs to always possess an extra device during authentication[1]. Moreover, receiving a temporary password through SMS is also a threat these days because the mobile device to which the SMS is being sent can also be vulnerable due to malware installed on mobile devices. [1]</p><p><strong>Another proposed two-factor authentication was to make the user’s mobile device as the second factor of authentication [1]. So rather than entering the temporary password on the system password will be entered on the user’s mobile device. The password will be encrypted before transmission via wi-fi. However, this also has its issues. As discussed earlier the user needs to possess a mobile device at the time of authentication. Secondly, the communication channel to transmit the password from the mobile device should be secured, hence it increases much more work and complexity. Finally, if the mobile device is affected by malware, attackers can get access to the entered plaintext password.</strong></p><p>It can be seen that much researches are being done to improve the reliability of authentication mechanisms. Researchers are working on adding several more factors to this process to make it robust. So another such mechanism is <strong>multi-factor authentication</strong> [1].<strong> One such study proposes a four-factor authentication mechanism.</strong> <strong>Those factors comprises of a long term password, one-time password, cryptographic key and biometric</strong>. In this users have to validate themselves by providing all of them. This scheme is much secure because an adversary needs to exploit all four to get access. But still, this scheme has a burden on the end-users of having an additional mobile device and a smart card.</p><p>Security which is given by knowledge-based authentication and token-based authentication can be violated when the password is compromised from the server or tokens are stolen. Therefore this again opens up the problem of reliability in authentication mechanisms. <strong>To overcome these authentication mechanisms biometrics are being researched and implemented </strong>[5]. The biometrics authentication can be divided into two categories namely unimodal biometrics and multimodal biometrics. Unimodal biometrics rely on single biometric details such as fingerprint, iris pattern. However, this approach is also much compromisable by various spoofing attacks, noisy data[5].</p><p>To provide much better security during authentication multiple (face, fingerprint, finger vein pattern, iris and voice ) biometrics information is used for the login process. This would help solve traditional vulnerabilities and provides a more robust and secure authentication mechanism. A multimodal authentication is considered to be the most efficient out of all authentication mechanisms till the date [5]. Specific attacks like hacking, phishing can also be prevented when multimodal authentication has been implemented for authentication purposes. <strong>Multimodal biometric system permits a greater level of assurance for accurates match in verification by utilizing different forms of biometrics.</strong> Another important use of this is making use of multiple methods of identification, a system can use higher limit recognition settings and system administrator can vary the decision on the level of needed accuracy on those biometrics to tighten security [4]. We can use up to three biometric information for extreme security and lower security can require any two factors. Skin spectroscopy, knuckles texture and nail plates are the emerging trends in biometric security [4]. When compared to other biometrics these can be utilized with less cost and low limitations.</p><h4><strong>Conclusion</strong></h4><p>Authentication is one of many key activities in an online banking process. This is provided by financial institutions with one-factor authentication. This post has given insights into how it can be vulnerable to threats. Even two -factor authentications doesn’t provide the required security</p><p>However, reliability and security in authentication is utmost important for users in online banking since it deals with many customers’ data. The authentication mechanism should be robust and reliable for financial institutions. Above reviewed mechanisms depict the reliability/credibility of each mechanism. Out of all mentioned mechanisms, presently multimodal biometric authentication is the most efficient and secure mechanism for authentication over unimodal biometric systems or traditional systems and it’s also the emerging field in security with new researches.</p><h4><strong>References</strong></h4><p>[1] “Internet Banking Login with Multi-Factor Authentication,” <em>KSII Transactions on Internet and Information Systems</em>, vol. 11, no. 1, 2016.</p><p>[2] S. F. Tan and A. Samsudin, “Enhanced Security of Internet Banking Authentication with EXtended Honey Encryption (XHE) Scheme,” <em>Innovative Computing, Optimization and Its Applications Studies in Computational Intelligence</em>, pp. 201–216, 2017.</p><p>[3] D. Wang and P. Wang, “Two Birds with One Stone: Two-Factor Authentication with Security Beyond Conventional Bound,” in <em>IEEE Transactions on Dependable and Secure Computing</em>, vol. 15, no. 4, pp. 708–722, 2018.</p><p>[4] L. T. Premakumari and A. S. Jothi, “Multimodal Biometric Endorsement for Secure Internet Banking using Skin Spectroscopy, Knuckles Texture and Finger Nail Recognition,” International Research Journal of Engineering and Technology, vol. 3, no. 2, pp. 1086–1090, 2016.</p><p>[5] H. Venugopal and N. Viswanath, “A robust and secure authentication mechanism in online banking,” <em>2016 Online International Conference on Green Engineering and Technologies (IC-GET)</em>, 2016.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a81f4b4127bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Artificial Neural Networks (ANN)]]></title>
            <link>https://medium.com/analytics-vidhya/introduction-to-artificial-neural-networks-ann-5cf3b324204c?source=rss-257b6e74d0e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/5cf3b324204c</guid>
            <category><![CDATA[artificial-neural-network]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[scikit-learn]]></category>
            <dc:creator><![CDATA[Shreeharan Hareendran]]></dc:creator>
            <pubDate>Mon, 11 Nov 2019 12:46:02 GMT</pubDate>
            <atom:updated>2019-11-18T13:46:45.586Z</atom:updated>
            <content:encoded><![CDATA[<h3>Part 1-ANN</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*081i28LKYLCsOAoc.jpeg" /></figure><p>This post is about Artificial Neural Network(ANN) in layman terms to get a high-level overview which is followed by a simple implementation of an end to end pipeline demo which is available in Part 2. We will not be focusing or exploring the mathematics behind the functionality of ANN.</p><h4>What is an Artificial Neural Network?</h4><p>Human brains interpret the real-world context and situations in a way that computers can’t. An artificial Neural Network is a way to simulate the working of the human brain so that the computer will be able to learn like the human brain and make decisions.</p><p>ANN is a machine learning algorithm used for classification, regression and clustering problems. It is the building block of deep neural networks. It’s majorly used to learn complex non-linear hypothesis when the dataset is too large where we will end up with too many features.</p><p>ANN uses different layers of mathematical processing. It has several units organized in several layers. A single unit is called a neuron. The input units in the input layer receives various information from the outside world as inputs. From here the data goes to the hidden unit to transform the data into a form in which output units can use it.</p><p>The below figure has 1 input layer with 4 input units, 2 hidden layers with the first hidden layer having 4 neurons and the second having 3 neurons and finally 1 output layer with 2 output units.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*3kMeBMDtA-ou3uibsDphSg.png" /><figcaption>Figure 1- Representation of a Neural Network</figcaption></figure><p>Initially, a neuron adds the values of every neuron from the previous layer it is connected to. In the below figure the neuron has got 3 inputs. These 3 values will be multiplied by the weights and added together(w1,w2,w3). Weights are the values that determine the strength between two neurons. Those are the values that will be altered in the learning process. Then a bias value will be added with the previous summation. After all these summations the neuron applies an activation function to the value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*gRkoNgQlliU5O6sUFpEuaA.png" /><figcaption>Figure 2-Operations performed in a neuron</figcaption></figure><p>That’s basically what a neuron does. Receives values from connected neurons multiplies it by respective weights, adds them and applies an activation function. Then it sends it to the other neurons. After every neuron from a layer has done it passes to the next layer. Finally, the last value obtained should be able to predict the desired output. At first, the neural network’s predictions will be random. But as each epoch passes and trains the model on that the output should be, the prediction will become closer and closer to the correct value.</p><p>This above working of single-neuron should be carried out throughout the network and is carried out by a process called forward pass/propagation. Using that we start with the activations of input units and then we forward propagate that to the hidden layer and compute the activations of the hidden layer and sort of forward propagate so we that can compute the activations of the output layer.</p><p>Then to determine the optimum weights/parameters a process called backpropagation is done. In that, the weights are optimized so that the neural network can learn how to correctly map random inputs to outputs.</p><p><strong>The below image depicts the end to end pipeline of a machine learning process.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gFYWIpNETvxjYMKBXTh0Qw.jpeg" /></figure><h3>Part 2 -Demo of ANN</h3><h3>Data set</h3><h4>Description</h4><p>The data set was prepared on research of customers of default payments in Taiwan. This data set contains information on default payments, demographic factors, credit data, history of payment, and bill statements of credit card clients in Taiwan from April 2005 to September 2005.</p><p>The data set for the above-mentioned problem was obtained from-<a href="http://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients">data set</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*CYoLQN8x4fMOqR4G_TSM9Q.jpeg" /><figcaption><strong>Characteristics of data set from the source site</strong></figcaption></figure><h4>Features/Attributes</h4><p>This research includes a binary variable default payment (Yes = 1, No = 0), as the response variable.<br>This study from which the dataset was obtained has used the following 23 features as explanatory variables</p><p>Details of features/attributes are as follows,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*zl8_B8J25QLreIgbmgSh1w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*snnwlZlbfE-rOcLIx4viEg.jpeg" /><figcaption><strong>Features and Descriptions</strong></figcaption></figure><h3>Implementation</h3><h4>Import data</h4><p>Initially, the data was imported from an excel file. For this purpose, Pandas library has been used</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RDAHLwzUhkFAZPbsxHaTlg.png" /><figcaption>Importing of Data</figcaption></figure><h4>Count of target labels</h4><p>Next, the count of each target label from the samples were taken.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*wNZLh-JIyw-2pK5iHGasdg.png" /><figcaption>Counting of target labels</figcaption></figure><p>This image shows that the data is imbalanced. There is a 3:1 proportion in the dataset. The data set is biased towards the negative class.</p><h4>Apply random under sampling</h4><p>Since it’s an imbalanced data set. One of the techniques which are normally applied to an imbalanced data set is under sampling. It works by removing samples from the majority</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*19sqMumWT5ZCH0qOnhh1Mg.png" /><figcaption>Random Sampling</figcaption></figure><p>The above image shows the data distribution between both the classes have been equated by under sampling.</p><h4>Split labels and features</h4><p>Next, the dataset should be split into labels and features. Labels are the target class and features are the attributes used to predict them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d-WAc1jwEbUqYS0Jozg5MA.png" /><figcaption>Splitting of Labels and Features</figcaption></figure><h4>Split data set into training set and test set</h4><p>To avoid overfitting, our dataset should be spilt into a training set and a test set. The training data will be used to train our neural network and test data will be used to evaluate the trained model</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*E5gzVDgSVSRSMWp7QtDUwA.png" /><figcaption>Splitting of Training set and Test set</figcaption></figure><p>Have specified the test size as 20% and the remaining 80% for training</p><h4>Apply normalization to features</h4><p>Features should be scaled to a common range before applying a learning algorithm. So that the features can be uniformly evaluated. The values of the used dataset are in different ranges. Feature scaling is done to normalize the training data and test data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FO__AQdHt5iCPzbSYP-9bA.png" /><figcaption>Standard Scalar Normalization</figcaption></figure><h4>Selection of principle components</h4><p>A large no of features in a dataset is one of the factors that affect the performance and the training time of the learning algorithm. To overcome that Principal Component Analysis (PCA) is done to select principal components in training data and test data. PCA is a dimensionality reduction technique to select the best features that are responsible for maximum variance in output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ZQPaCDZ7tXBKLbyyNY9hg.png" /><figcaption>Principle Components</figcaption></figure><p>The above image shows the principal components while maintaining 95% of variance. Out of 24 features only 15 have been selected by PCA</p><h4>Import classifier and train the data set</h4><p>ANN is used to train the training data set. We need to specify the number of layers and neurons in each layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6uFMrLTugvVkvVPaJRqxiw.png" /><figcaption>Usage of ANN Classifier</figcaption></figure><p>Apart from that the activation function, no of epochs, alpha, learning rate can also be defined. If not a default value will be given. After training the test set is used to predict the result.</p><h3>Performance Evaluation</h3><p>The following performance metrics were calculated to depict the performance of the learning algorithm on test data.</p><h4>Classification Report</h4><p>The classification report is used to show a report consisting of several metrics. Following are the metrics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*7hdB6L976KxNPVTwFfGiZw.png" /><figcaption>ANN Classification Report</figcaption></figure><h4>* Precision</h4><p>This gives the score of a class for a negative sample that shouldn’t be labeled as positive.</p><h4>* Recall</h4><p>This gives the score of a class for a sample that is identified correctly by the classifier.</p><h4>* F1-score</h4><p>This gives the accuracy of a class for classifying the samples belong to that class compared to other classes</p><h4>* Support</h4><p>This gives the number of samples of the data set for a class</p><h4>AUC-ROC Curve</h4><p>AUC — ROC Curve is a performance measurement metric. ROC is a probability curve and AUC gives the degree of measure of separability. Higher the AUC, better the model prediction and better the model is separating between the default and non-default case.<br>AUC value of ANN is 77.87%</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*Qmpz3aOz1r37MRU-7Q-8qQ.png" /><figcaption>ANN AUC-ROC Curve</figcaption></figure><h4>Confusion Matrix</h4><p>Confusion matrix is a table to describe the performance of the algorithm on a set of test data for which the actual labels are known. The number of correct and incorrect predictions are summarized</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*jSU3b9FzbWv1JpLuL1btbw.png" /><figcaption>ANN Confusion Matrix</figcaption></figure><h4>Conclusion</h4><p>Now you should have a basic understanding of one of the machine learning algorithms named artificial neural network. Neural networks are important aspects of artificial intelligence and deep learning for solving computer vision-related problems. I am sure you will be hearing and learning much more about this going ahead, but the above article would have given you a head start on ANN.</p><p>Complete implementation of the above application can be viewed at my <a href="https://github.com/Hareendran7/Artifical-Neural-Network---Demo">GitHub repository</a>.</p><p>For further details refer the following,</p><ul><li><a href="https://www.forbes.com/sites/bernardmarr/2018/09/24/what-are-artificial-neural-networks-a-simple-explanation-for-absolutely-anyone/#5a23d6431245">What Are Artificial Neural Networks - A Simple Explanation For Absolutely Anyone</a></li><li><a href="https://scikit-learn.org/">scikit-learn</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5cf3b324204c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/introduction-to-artificial-neural-networks-ann-5cf3b324204c">Introduction to Artificial Neural Networks (ANN)</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OAuth 2.0 Guide for Novices]]></title>
            <link>https://medium.com/@hareendran7/oauth-2-0-guide-for-novices-48023f4f12a3?source=rss-257b6e74d0e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/48023f4f12a3</guid>
            <category><![CDATA[oauth]]></category>
            <category><![CDATA[google-drive]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Shreeharan Hareendran]]></dc:creator>
            <pubDate>Tue, 24 Sep 2019 13:02:12 GMT</pubDate>
            <atom:updated>2019-11-07T11:18:04.184Z</atom:updated>
            <content:encoded><![CDATA[<p>This blog post will take you through the OAuth 2.0 framework in easy to understand terms, approach and a mini-demo application which utilizes it.</p><p>Before diving into OAuth, I wish to clarify a common confusion among people regarding authentication and authorization. I too had this misconception. In simple terms, authentication is making sure and verifying you are the person whom you claim to be and authorization is what you’re allowed to do or share.</p><h3><strong>Introduction to OAuth</strong></h3><p>Let me explain this using a day to day life example,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*iOs9oUODcT2UQ-1IfDgr0w.png" /><figcaption>Fig 1-Source : <a href="https://auth.tickets.lk/?client_id=TicketsLK">https://auth.tickets.lk/?client_id=TicketsLK</a></figcaption></figure><p>You would have most probably visited any online movie ticketing website like the one shown above, and the site asks you to log in before making a reservation or viewing available seats, etc. The login page displays options with most widely used social logins such as Google, Facebook, Twitter without asking you to create a new account or anything. If you would have proceeded to login using your social login credentials, after successfully logging in, your personal information(ex -name, contact details)is shown on the website. So simply behind the scenes from authenticating yourself to retrieving your personal information from your social accounts, all are carried out by the standards defined by OAuth protocol.</p><p><strong>OAuth or Open Authorization is an open standard framework that defines a set of rules that permits third-party applications to access a user’s information without the user sharing his or her credentials with the client website directly. It functions by delegating user authentication to the service (ex- google) which holds the user account and authorizing third-party applications to access the user account for information</strong>.</p><p>OAuth has two versions to date, they are OAuth 1.0, OAuth 2.0.</p><p>Before getting into the technicalities and flow, let’s begin exploring some of the most important terms used which are kind of the building blocks in OAuth 2.0</p><h4><strong>Roles</strong></h4><p>OAuth specifies four roles and details of each are given below,</p><ul><li><strong>Resource Owner</strong></li></ul><p>The person who provides access to his/her information from a particular account. The resource owner is also known as the user.</p><ul><li><strong>Client</strong></li></ul><p>Any third party application which is trying to get the user’s account to access the information. (Can be any application such as mobile app, server-side app, single-page app, desktop app). Also known as the client application.</p><ul><li><strong>Resource Server</strong></li></ul><p>The Server which is accessed to obtain the user’s protected information</p><ul><li><strong>Authorization Server</strong></li></ul><p>The Server which authenticates and verifies the user from entered credentials and provides authorization code and an access token to the client application</p><h4>Grant Types</h4><p>The actual flow of the protocol depends on the grant type. A grant is a way to receive the access token. Below given are the four types of grants,</p><ul><li><strong>Authorization Code</strong></li></ul><p>Mostly used in server-side applications. A user agent (browser) is used by the client for interaction.</p><ul><li><strong>Resource Owner Password Credentials</strong></li></ul><p>The user provides his/her credentials directly to the client. It should be only used if the client is trusted by the user(most commonly used for mobile app of the same web app vendor). Then the client submits the credentials to the service and obtains an access token.</p><ul><li><strong>Implicit</strong></li></ul><p>Used in single-page JavaScript applications. Flow is similar to authorization code. After the user provides the credentials to the service client directly receives an access token without the authorization code.</p><ul><li><strong>Client Credentials</strong></li></ul><p>This is similar to resource owner password credentials. Here the client exchanges client id and secret to receive access token.</p><p>Some more terms,</p><p><strong>Authorization Code</strong></p><p>A code received by the client application to obtain an access token</p><p><strong>Access Token</strong></p><p>Used as a credential to confirm to the resource API server that the bearer is authenticated and authorized.</p><p>That covers the important and basic terminologies to start digging into the end to end pipeline of OAuth, from this point onwards I will be describing the process flow using authorization code grant type and a demo application built using it.</p><h4><strong>Flow of Authorization Code</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z8XP4sPNa3X6QPDX5Zk_4A.png" /><figcaption>Fig 2-Source : <a href="https://medium.com/google-cloud/understanding-oauth2-and-building-a-basic-authorization-server-of-your-own-a-beginners-guide-cf7451a16f66">https://medium.com/google-cloud/understanding-oauth2-and-building-a-basic-authorization-server-of-your-own-a-beginners-guide-cf7451a16f66</a></figcaption></figure><ol><li>Client application opens up a page of authorization server for user in the browser(user agent) to enter credentials</li><li>User enters his/her credentials in the page of the authorization server</li><li>Then the browser sends user credentials to the authorization server for validation via the authorization endpoint available on authorization server</li><li>After successfully authenticating and authorizing the user, the authorization server sends the authorization code to the client application</li><li>Client application obtains the access token for the given authorization code via the token endpoint available on authorization server</li><li>Finally, the client submits the access token to the resource endpoint on the resource server to receive the user’s protected information.</li></ol><p>Next, we’ll see the steer through the necessary steps towards an application registration with Google developer console and the demo of a single page JavaScript web application. In this context JavaScript application is the client, I am the user or resource owner, Google servers are the authorization server and resource server.</p><h3><strong>Step 1 : Register your Application</strong></h3><p>Initially, your application should be registered with the Google Developer portal to obtain the client id and secret.</p><h4>1) Create a project in google developer console</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eZOghCtYjZVpmBH4-S8H7Q.jpeg" /><figcaption>Fig 3</figcaption></figure><h4>2) Enable Google Drive API</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-dJscCUDSwQoWO8bz0q6EQ.jpeg" /><figcaption>Fig 4</figcaption></figure><h4>3) Click on create credentials button</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*XB3dsqYxz4AjJSWI7S6Wjw.jpeg" /><figcaption>Fig 5</figcaption></figure><h4>4) Fill out the form displayed with necessary details</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a4CraGf4vyrBoW9Bz--eAQ.jpeg" /><figcaption>Fig 6</figcaption></figure><h4>5) After submitting the above requested details, client credentials will be generated</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*UAWqI9rOnF2J3r0Vt7vkCw.jpeg" /><figcaption>Fig 7</figcaption></figure><p><strong>Client ID</strong></p><p>This is the ID obtained after registering the client application with a service. This is a piece of public information to verify the application with the server</p><p><strong>Client Secret</strong></p><p>Obtained during the client application registration for verification purposes, but should be kept confidential.</p><p><strong>Redirect URI</strong></p><p>Where the authorization server redirects the browser/user-agent after an authorization code is generated.</p><h3>Step 2 : Built Application Demo</h3><ol><li>This is the initial page from the web application</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WYGu1_zFRYpcQlB979a7KA.jpeg" /><figcaption>Fig 8</figcaption></figure><p>2. When the user clicks on the upload button, the user will be redirected to google consent page for authentication where the user needs to provide his/her credentials</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*u5_nWLtsJ-kEaYFi9kKhgg.jpeg" /><figcaption>Fig 9</figcaption></figure><p>3. Then, user consent is needed to share information with the particular application which is the authorization step</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*LrMrovt0eku3n7fhIff1UQ.jpeg" /><figcaption>Fig 10</figcaption></figure><p>4. After consent, the user will be redirected to the below page of the client application which is specified in the Redirect URI along with the access token. Internally, the application has obtained the token by submitting the authorization code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8iENfWfXV10NiY66aA6smg.jpeg" /><figcaption>Fig 11</figcaption></figure><p>5. Finally, the user needs to select any resource to upload to google drive, in which the obtained token will be submitted to the resource server by the client application in the back end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wvAnzc22Oqz9xw399fAeVA.jpeg" /><figcaption>Fig 12</figcaption></figure><p>Complete implementation of the above application can be viewed at my <a href="https://github.com/Hareendran7/oauth-2.0-app">GitHub repository</a>.</p><h4><strong>Conclusion</strong></h4><p>That brings to the conclusion of OAuth 2.0 guide. By now you should have a basic idea of how it works.</p><p>For further details on OAuth and other grant types refer the following,</p><ul><li><a href="https://tools.ietf.org/html/rfc6749?source=post_page-----d883d6d67fe8----------------------">RFC 6749 - The OAuth 2.0 Authorization Framework</a></li><li><a href="https://medium.com/google-cloud/understanding-oauth2-and-building-a-basic-authorization-server-of-your-own-a-beginners-guide-cf7451a16f66">Understanding OAuth2 and Building a Basic Authorization Server of Your Own: A Beginner’s Guide</a></li><li><a href="https://developers.google.com/identity/protocols/OAuth2?source=post_page-----d883d6d67fe8----------------------">Using OAuth 2.0 to Access Google APIs | Google Identity Platform</a></li></ul><p>Catch you in another post.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48023f4f12a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>