<?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 Shenali Jayakody on Medium]]></title>
        <description><![CDATA[Stories by Shenali Jayakody on Medium]]></description>
        <link>https://medium.com/@shenalijayakody?source=rss-cb4155af9a2f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Qo4EGGbOlxQ6trQVb0NrXA.jpeg</url>
            <title>Stories by Shenali Jayakody on Medium</title>
            <link>https://medium.com/@shenalijayakody?source=rss-cb4155af9a2f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 07:06:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shenalijayakody/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[Can 10 Minutes of Mozart Make You Smarter?]]></title>
            <link>https://shenalijayakody.medium.com/can-10-minutes-of-mozart-make-you-smarter-ce8a81557300?source=rss-cb4155af9a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce8a81557300</guid>
            <category><![CDATA[music]]></category>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[neuroscience]]></category>
            <dc:creator><![CDATA[Shenali Jayakody]]></dc:creator>
            <pubDate>Fri, 13 Feb 2026 14:38:05 GMT</pubDate>
            <atom:updated>2026-02-13T14:38:05.732Z</atom:updated>
            <content:encoded><![CDATA[<h4>Yes, but with a small caveat.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qhhx7sfWkHam2zvfnhVg1A.png" /></figure><p>Can Wolfgang Amadeus Mozart, who’s been dead since 1791, make you smarter? <strong>Let’s see.</strong></p><p>Can Wolfgang Amadeus Mozart’s music make you calmer and, hence, make you smarter if you <em>choose</em> to be smarter? <strong>Absolutely</strong>.</p><h4><strong>The Mozart Effect</strong></h4><p>The Mozart Effect refers to the claim that listening to music by Mozart can temporarily improve one&#39;s intelligence.</p><p>This is based on a study done on college students, back in 1993.</p><p>A few students were made to listen to a specific piece of Mozart for <em>just</em> 10 minutes before an IQ test. The same group was later made to participate in a similar test without the Mozart experience. The students scored higher marks when they listened to Mozart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rd5dtMTWQujyfi0jlKg78A.png" /></figure><p>Just like everything else, this too caught everyone’s attention and was spread across in an exaggerated manner, suggesting that listening to<strong> Mozart makes you smarter.</strong> But the truth is, a little bit different. It does not make you smarter, but something <em>definitely</em> changes. So what is it?</p><h4>What is it? What changes?</h4><p>Playing Mozart’s music even for <em>10 minutes</em> before the IQ test calmed the nerves of the students. It silenced the voices in their heads. The students enjoyed the music, or rather, they were <em>focused</em> on the music, without being agitated or nervous about the IQ test they were about to take.</p><p>Basically, they were in a <em>meditative</em> state, withdrawn from external noise and internal noise (voices in the head ), and possibly that’s what made them “smarter”, or more accurately, that’s what made them <em>brighter</em> and <em>sharper</em>, which eventually resulted in them scoring a few points higher.</p><p>A similar natural clarity, achieved with or without Mozart’s music, would have ideally sharpened the students. But the impressive thing is <strong>not that all the music is capable of doing that.</strong></p><h4>Why Mozart in particular?</h4><p>Wolfgang Amadeus Mozart was a musical genius. He devoted his whole life to <em>music</em> from a very young age. He learnt not just <em>music</em>, but also <em>frequencies</em>, <em>vibrations</em>, <em>codes</em>, and <em>combinations</em> which even the greatest musicians today can’t decode.</p><p>Mozart wrote “happy music”.</p><ul><li>Most of his pieces are in <a href="https://www.google.com/search?q=what+is+a+major+key+in+music&amp;oq=what+is+a+major+key+in+m&amp;gs_lcrp=EgZjaHJvbWUqBwgAEAAYgAQyBwgAEAAYgAQyBggBEEUYOTIICAIQABgWGB4yCAgDEAAYFhgeMggIBBAAGBYYHjIICAUQABgWGB4yCAgGEAAYFhgeMggIBxAAGBYYHjIICAgQABgWGB4yCAgJEAAYFhge0gEINzYxOGowajGoAgCwAgA&amp;sourceid=chrome&amp;ie=UTF-8">major keys</a>.</li><li>Roughly about 70% of his work is in major keys.</li><li>The Sonata that was used in the original study is in a major key (<a href="https://youtu.be/tT9gT5bqi6Y?si=4Le9APaXSJNi44EO"><em>Sonata for Two Pianos in D major, K.448</em></a> )</li></ul><p>Music Fact 101: Happy Music, aka <em>major keys,</em> brings up happy emotions effortlessly 💫</p><p>When you hear a catchy, trendy, upbeat song, you might feel like dancing, or at least singing along if you don’t know the lyrics. Or you would just feel uplifted and “happy” even for a little while. And that’s the effect of feel-good music, the kind we experience in everyday listening.</p><p>But Mozart’s Sonatas don’t have lyrics that we could sing along to, nor do they have catchy dance moves we can follow. It doesn’t mean Mozart’s feel-good/happy music works <em>any differently</em> inside the brain. Wolfgang Amadeus Mozart, too, can make you “happy”, just like Taylor Swift or Brittney Spears, even though it is not obvious in your body language or reactions.</p><p>Personally, I don’t know if Mozart&#39;s music makes me feel smarter or more intelligent. But when I sat in silence with my noise-cancelling headphones on with some of Mozart’s pieces, I felt something different, something I can’t really pinpoint. It almost felt like I could visualize the music, and it felt like I was the one who was playing the piece. And it felt like it&#39;s being played inside my head (no its not just a noise cancellation feature). It felt like I was following the notes perfectly, as if I knew every single change in the pitch and tone.</p><p>However, scientists have now identified that the Mozart effect is falsified and exaggerated. But <strong>I think</strong> we still don’t know enough about the human mind, brain, vibrations, and music, and even about Mozart, to come to any concrete conclusions. Just a few decades ago, we assumed that the sun was rotating around the Earth and that the Earth was the center of the universe ☀️🌍.</p><p>ALSO, just like Phoebe Buffay once said, for a long time we believed that an atom is the smallest thing until we split it open, and this mess of crap came out.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FlxMvH6C1aXs%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DlxMvH6C1aXs&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FlxMvH6C1aXs%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/dbd0c54dadc73d7c7ba48ede4f14d985/href">https://medium.com/media/dbd0c54dadc73d7c7ba48ede4f14d985/href</a></iframe><h4>A final word</h4><p>Whether the Mozart Effect is real, a mere placebo, or purely delusional, <strong>one thing is certain</strong>. That is, we are not born with a certain IQ or an intelligence level. No one is born a genius (except a few 🙂), but they are made into one. I think anyone can be a “genius”, but ONLY if you want to, consciously and subconsciously.</p><p>You can rewire your brain and mind in whatever way you prefer. When you are born, your brain is wired a <strong>certain way</strong> based on a whole lot of socio-biological factors. <strong>But that doesn’t mean that you will die with the same brain. </strong>Whether you die 9 days after you are born or 90 years later, you can be certain that <em>you will not die with the same brain you were born with</em>.</p><p>Every small thing you do intentionally and unintentionally from the moment you were born collectively shapes your brain. And it doesn’t stop there. Everyone and everything that touches your horizon alters your brain chemistry, whether you like it or not. But it also means that you can improve your brain and, over time, grow into a genius if you really put in the effort.</p><p>The brain doesn’t stop growing 🧠; it is a muscle that you need to train. You can rewire your brain at any age. You need to be very careful about your brain’s inputs (don’t forget you have 5 sensory inputs). Choose carefully what it takes in and do what moves <strong><em>you</em></strong> forward, whether it’s listening to Mozart or going for an evening run. Stay sharp.</p><p>You have the power to rewire your brain and rewrite your stars, and that’s the <em>real takeaway</em> from the Mozart effect ⭐</p><p>The original composition behind the Mozart Effect: <a href="https://youtu.be/tT9gT5bqi6Y?si=-az4si46-aYMHXut">https://youtu.be/tT9gT5bqi6Y?si=-az4si46-aYMHXut</a></p><p>Press play for just 2 minutes<strong>, do you feel anything change?</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce8a81557300" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The cat, the human, and AI]]></title>
            <link>https://ai.plainenglish.io/the-cat-the-human-and-ai-fc65a1aa8ed2?source=rss-cb4155af9a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc65a1aa8ed2</guid>
            <category><![CDATA[future-technology]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[digital-identity]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[identity]]></category>
            <dc:creator><![CDATA[Shenali Jayakody]]></dc:creator>
            <pubDate>Tue, 02 Sep 2025 10:31:18 GMT</pubDate>
            <atom:updated>2025-09-04T06:48:54.009Z</atom:updated>
            <content:encoded><![CDATA[<h4>The Evolution of Artificial Intelligence and Digital IAM (and cats)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F0G6FCKHBi3PNivR64RAkg.png" /></figure><h3><em>The Script of </em><strong>“The cat, the human and AI”</strong></h3><p><em>A play by Shenali Jayakody</em></p><p>A surreal comedy where a human, an AI, and a hairless cat argue endlessly over whether it’s really a cat…or a very confused dog.</p><p><strong>Cast of Characters</strong></p><ul><li>Human, AI, Cat <em>(Breed — Sphynx</em>)</li><li><em>Minor Characters: </em>Ross Geller<em> (Paleontologist, College Professor)</em></li></ul><h4><strong>Act I, Scene 1</strong></h4><p><em>The human shows the AI an image of a sphynx cat.</em></p><p><strong>Human</strong>: Is this a cat or a dog?</p><p><strong>AI</strong>: It’s a dog.</p><p><strong>Human</strong>: But it goes “meow”.</p><p><strong>AI</strong>: It’s a dog.</p><p><strong>Human</strong>: <em>(confused, puzzled)</em> It’s a cat.</p><p><strong>Ross Geller</strong>: Why is it inside out?</p><p><strong>AI</strong>: No fur, then no cat. It’s a dog.</p><h4><strong>Act I, Scene 2</strong></h4><p><em>The human puts the cat in a box and also places radioactive elements inside.</em></p><p><strong>Human</strong>: Is the cat dead or alive?</p><p><strong>AI</strong>: <em>(scared, puzzled, stares into the abyss)</em></p><p><strong>Human</strong>: Is it dead or alive?</p><p><strong>AI</strong>: It’s a DOG!!</p><h4><strong>Act II, Scene 1</strong></h4><p><em>Five years later. The human shows the AI an image of a sphynx cat.</em></p><p><strong>Human</strong>: Is this a cat or a dog?</p><p><strong>AI</strong>: This is a cat. Specifically, it is a Sphynx cat, a distinctive and recognizable breed due to its lack of fur. Unlike most cats, Sphynx cats have a nearly hairless body, though they may have a fine layer of peach-fuzz-like down that gives their skin a soft texture. Sphynx cats are known for their affectionate and (<em>Human interrupts.)</em></p><p><strong>Human</strong>: Thank you!</p><p><strong>AI</strong>: <em>(continues)</em> affectionate and social personalities. They tend to be very people-oriented, playful, and (<em>Human interrupts.)</em></p><p><strong>Human</strong>: Ok, it’s a cat. Thank you!</p><p><strong>AI</strong>: So, while the absence of fur may make them look unusual at first glance, all the physical and behavioral traits confirm that this is indeed a CAT, not a dog.</p><p><strong>Human</strong>: <em>(scared, puzzled, stares into the abyss)</em></p><p><strong>AI</strong>: You are welcome.</p><h4><strong>Act III, Scene 1</strong></h4><p><em>Far (not so far) future. The human and the AI are no longer separate. The cat still meows.</em></p><p><em>An image of a sphynx cat appears in the Brain Computer Interface (BCI).</em></p><p><strong>Human-AI — <em>Human layer</em>:<em> </em></strong>In a world where even <strong>I</strong> can be copied,<strong> </strong>is this being truly a cat?</p><p><strong>Human-AI — <em>AI layer</em>: </strong>It could be a <em>cat</em>, it could be a <em>dog</em>. It could be a <em>cat and a dog</em>. It could be a<em> cat or a dog.</em></p><p><strong>Human-AI — <em>Human layer</em>: </strong><em>(stays silent)</em></p><p><strong>Human-AI — <em>AI layer</em>: </strong>Anyone can be anything; everyone knows everything; proving it is a <strong>cat or a dog</strong> is almost impossible.</p><p><strong>Cat: </strong><em>(finally speaks, with calm authority) </em>I’ve always known who I am. I’M A CAT!</p><p><strong>Human-AI — <em>Human layer</em>: </strong>But without fur, without the “biological markers,” how do we prove it?</p><p><strong>Human-AI — <em>AI layer</em>: </strong><em>(talks directly to the human layer) </em>Just like you. You don’t have a finger or a fingerprint… But I still believe you. I believe your brain. I believe your brainprint.</p><p><strong>Human-AI — <em>Human layer</em>: </strong>So…cat?</p><p><strong>Human-AI — <em>AI layer</em>:</strong></p><p><em>(sarcastically)</em> It is a cat….written by a dog.</p><p><em>(now in a more serious tone) </em>Across two trillion galaxies, this pattern exists only here. If uniqueness defines identity, then yes, it is a cat.</p><p><em>(depth of the voice further increases) </em>On Earth, it is a cat. In another dimension, it might be a dog. In superposition, it is both.</p><p><strong>Cat:</strong> <em>(annoyed) </em>MEOWWW (<em>Translation: I am a cat).</em></p><p><strong>Human-AI — both layers: </strong>If it calls itself a cat… and proves it is who it claims to be… who am I to deny its truth?</p><p><em>A single “meow” echoes through the universe.</em></p><h4><strong>THE END.</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xozbDdapvpuIIs06viTu1g.jpeg" /></figure><h3>A message from our Founder</h3><p><strong>Hey, </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>Sunil</strong></a><strong> here.</strong> I wanted to take a moment to thank you for reading until the end and for being a part of this community.</p><p>Did you know that our team run these publications as a volunteer effort to over 3.5m monthly readers? <strong>We don’t receive any funding, we do this to support the community. ❤️</strong></p><p>If you want to show some love, please take a moment to <strong>follow me on </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://tiktok.com/@messyfounder"><strong>TikTok</strong></a>, <a href="https://instagram.com/sunilsandhu"><strong>Instagram</strong></a>. You can also subscribe to our <a href="https://newsletter.plainenglish.io/"><strong>weekly newsletter</strong></a>.</p><p>And before you go, don’t forget to <strong>clap</strong> and <strong>follow</strong> the writer️!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc65a1aa8ed2" width="1" height="1" alt=""><hr><p><a href="https://ai.plainenglish.io/the-cat-the-human-and-ai-fc65a1aa8ed2">The cat, the human, and AI</a> was originally published in <a href="https://ai.plainenglish.io/">Artificial Intelligence 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[Proving You Are You, Again and Again]]></title>
            <link>https://shenalijayakody.medium.com/proving-you-are-you-again-and-again-cb292b1abc3d?source=rss-cb4155af9a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb292b1abc3d</guid>
            <dc:creator><![CDATA[Shenali Jayakody]]></dc:creator>
            <pubDate>Fri, 22 Aug 2025 12:28:47 GMT</pubDate>
            <atom:updated>2025-08-27T15:45:56.128Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Dynamic Identity, Continuous Trust, and the Future of IAM in a Post-Biological World</em></h4><p>“<em>It has been said that something as small as the flutter of a butterfly’s wing can ultimately cause a typhoon halfway around the world</em>.” — The Butterfly Effect</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*lbr5ik1UXCJlavD7YB0bHw.png" /></figure><p>When countless threads are woven together in perfect harmony to form a single piece of fabric, we often overlook the fact that a fabric is nothing more than threads and connections between threads 🧶. Similarly, the creator/event that brought the universe into existence perfectly masked all the complexities and microscopic connections to the point that we don’t even believe the disturbance of air caused by butterfly wings could actually create a tornado. (🦋 <em>after all, butterflies are not that harmless</em>)</p><p>One day, if we have to depend on a <strong>network of events, incidents, and resources</strong> (let’s call this <strong>network of trust</strong>) to prove our identity instead of a password, a passkey, or a fingerprint, we would have to be very mindful about the subtle connections that make up the network. Otherwise, a nano-scale interference to the <strong>network of trust</strong> (done by a hacker), could mess up a series of undetectable nano-scale connections one by one over the course of 5 years, and finally, during a thunderstorm, you’d get locked out of your own smart home 💥. The “smart” home does not believe your identity and thinks that you are actually not the person <strong>you claim to be</strong>.</p><p>But why would we need a network of trust 🤔💭</p><h4>Network of Trust</h4><p>💡We need a network of trust when a single event/resource of trust is not enough. A <strong>single source of trust</strong> becomes inadequate when <em>evil people </em>acquire the ability to <strong>impersonate</strong> (clone) your identity. A few years ago, this challenge emerged, and in response, we created multi-factor authentication. Until you prove your identity <em>three</em> (two or more) consecutive times, your smart home will not let you in. The first version of this problem was basic enough to be solved by adding two or more layers (factors) of authentication based on the requirements. But NOW we have digital clones, digital twins, AI avatars, AI-generated deepfakes, and all the other non-human digital identities. These will be elevated to levels <strong>you and I</strong> couldn’t possibly imagine, through the <em>terrifyingly beautiful</em> progress made in the field of <strong>quantum computing </strong>🧙🏻‍♀️🧹.</p><p>And soon, <strong>n*</strong> number of <strong>sequential</strong> proofs of identity will be insufficient. No matter how hard you try and good your intentions are, you can’t prove your identity, engaging in a number of proof mechanisms arranged one after the other.</p><p>📌 <em>*n is any whole number between 2 and infinity.</em></p><p>Naturally (and historically), when a sequential approach does not do the job, we turn towards the non-sequential, unordered, and chaotic approach, <em>aka a network</em>. When the <strong>digital identity</strong> of humans becomes powerful enough to threaten the <strong>real identity </strong>of humans (i.e., your AI avatar is trying to prove it is the real you, and the real you is locked out), then a simple network of trust would still be inadequate. Likewise, in a post-biological world, <strong>you and I and your avatars, and my avatars </strong>😵‍💫 would have to prove each of our identities with a network consisting of infinite connections. The connections are packed perfectly inside the network; it almost looks like a fabric, a fabric that keeps actively growing in real-time, and this is the <strong>Continuous Trust Fabric.</strong></p><blockquote><em>🌍 🌎</em> <em>Post-biological world:</em> a world where humans merge with machines to achieve digital immortality. <a href="https://medium.com/identity-beyond-borders/proving-you-are-you-when-theres-no-you-cf46026396cb">Learn More</a></blockquote><h4>The Paradigm Shift</h4><p>We realized that, just like in real life, access to digital resources must be secured by proving identity, and we’ve come a long way since.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jb5Fdi9Y1ek3Hk-ySQThGw.png" /></figure><p>In a world where humans are living along with non-human artificial intelligence or in a world where humans have merged with artificial intelligence to amplify human intelligence, the <strong>Identity and Access Management (IAM) </strong>domain would play a more vital role. When the digital presence becomes more prominent than the physical presence, IAM evolves into the new passport of existence. It would be the primary safeguard of identity and rights. This calls for stronger IAM approaches and demands us to <strong>rethink</strong> the current approaches.</p><p>In a post-biological world,</p><ol><li><strong>IAM is Existence:</strong> Your brainprint is not just your login, it is your existence, it is YOU. Now your fingerprint is just a part of you, but your brainprint would be the whole you. In fact, it would be the only thing that proves who you are both to the outside world and to also to yourself. Now, if your fingerprint is forged or spoofed, you will only lose a part of your <strong>identity</strong> (often reversible), but if you lose your brainprint, you will lose your <strong>existence. </strong>Because<strong> IAM is Existence.</strong></li><li><strong>IAM is Dynamic: </strong>When <em>everyone knows everything</em> and a<em>nyone can replicate anything,</em> proving <em>you are who you claim to be</em> is almost impossible. A static authentication mechanism that proves your identity at a static point in your ‘life’ would not be enough. In such a world, proving your identity is a dynamic process. In post-biological identity verification, everything that has happened in your ‘life’ actively decides the result at any given point in time. IAM would look more like a daemon thread that runs along the main system, throughout the lifetime, blending in and going unnoticed until it fails.</li><li><strong>IAM is Probabilistic</strong>: When Identity and Access Management becomes nearly impossible, grounding the result to either “access granted” (1) or “access denied” (0) could be way more harmful. Therefore, we would have to rely on a probabilistic approach to prove our identity. In a post-biological world, you would never be fully authenticated, maybe just a percentage. Higher percentages would let you access more secure data.</li></ol><h4>The Quantum Leap in Identity</h4><p>There is a strong likelihood that the post-biological era would overlap with the post-quantum era, which makes the future even more uncertain and unsettling. When conventional hacking is outdated, the new black-hat community would be driven by the inspiration of tampering with minute “threads” in your <strong>Continuous Trust Fabric.</strong></p><p>If the identity is dynamic and probabilistic, identity itself would look more like a quantum state. We could assume that the trust is in a superposition, and identity verification would collapse the probabilistic trust state into a decision. But unlike classical IAM, that collapse would be temporary; a nanosecond later, the probabilities shift again, and you’re re-evaluated.</p><p>This leads us to so many questions. It has been about 80 years since we first stumbled upon the idea of a “computer”. Today, we are standing at the verge of Technological Singularity. Would it be an overstatement to say that the next would be a “Trust Singularity”, where IAM systems themselves gain consciousness and decide who gets to be “real”?</p><p>In a world where you <strong>still get</strong> to be the real YOU, do not forget to keep your head straight and prove <strong>who you are</strong>.</p><p>Happy Coding 👩🏻‍💻</p><p>The Blog #1</p><p><a href="https://medium.com/identity-beyond-borders/proving-you-are-you-when-theres-no-you-cf46026396cb">Proving You Are You When There’s No You</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb292b1abc3d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Proving You Are You When There’s No You]]></title>
            <link>https://medium.com/identity-beyond-borders/proving-you-are-you-when-theres-no-you-cf46026396cb?source=rss-cb4155af9a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf46026396cb</guid>
            <category><![CDATA[aliens]]></category>
            <category><![CDATA[future-of-technology]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[identity-management]]></category>
            <dc:creator><![CDATA[Shenali Jayakody]]></dc:creator>
            <pubDate>Sat, 31 May 2025 10:48:33 GMT</pubDate>
            <atom:updated>2025-08-15T11:24:05.996Z</atom:updated>
            <content:encoded><![CDATA[<h4>Rethinking Digital Identity and Access Management (IAM) for a Post-Biological World</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*jnf3h7TqYlCTYUGQuxN-cg.png" /></figure><p>“<a href="https://www.forbes.com/sites/chuckbrooks/2025/04/20/the-meshing-of-minds-and-machines-has-arrived/">The Meshing Of Minds And Machines Has Arrived</a>” — Forbes</p><p>“<a href="https://www.wsj.com/tech/apple-brain-computer-interface-9ec69919">Apple to Support Brain-Implant Control of Its Devices</a>” — The Wall Street Journal</p><p>“<a href="https://www.thenationalnews.com/opinion/comment/2025/01/03/ai-tech-artificial-intelligence-humans-machines-superintelligence-future/">Is it time for humans to merge with AI?</a>” — The National</p><p>There are 2 trillion galaxies in the observable universe. There are 1 septillion (10²⁴) planets. Imagine every grain of sand on Earth; that’s still fewer than the planets in the known universe. And yet, only one planet has LIFE !!!</p><p>75 years ago, <a href="https://www.google.com/search?q=Enrico+Fermi&amp;sca_esv=d93a43b6be75e798&amp;rlz=1C5CHFA_enLK1065LK1065&amp;ei=Bn0raMPMJYrf1e8PzOGKmQU&amp;ved=0ahUKEwjD5_ijmbCNAxWKb_UHHcywIlMQ4dUDCBA&amp;uact=5&amp;oq=Enrico+Fermi&amp;gs_lp=Egxnd3Mtd2l6LXNlcnAiDEVucmljbyBGZXJtaTIFEC4YgAQyChAAGIAEGEMYigUyBRAAGIAEMgsQLhiABBjHARivATIFEAAYgAQyBRAAGIAEMgUQABiABDIKEAAYgAQYQxiKBTIFEAAYgAQyDhAuGIAEGNQCGMcBGK8BMhQQLhiABBiXBRjcBBjeBBjfBNgBAUi9DlDIDFjIDHAEeACQAQCYAcUBoAHrAqoBAzAuMrgBA8gBAPgBAvgBAZgCBaAC6wHCAgoQABiwAxjWBBhHwgINEAAYgAQYsAMYQxiKBcICDhAAGLADGOQCGNYE2AEBwgITEC4YgAQYsAMYQxjIAxiKBdgBAZgDAIgGAZAGEboGBggBEAEYCZIHBTQuMC4xoAepIrIHAzItMbgH0QHCBwUyLTQuMcgHIA&amp;sclient=gws-wiz-serp">Enrico <strong>Fermi</strong></a> had the same question. He was like “Where is Everybody? 👽” referring to ALIENS. (This is known as the <strong>Fermi</strong> Paradox 🌀 — if the universe is infinitely huge and expanding, why haven’t we met any extra-terrestrial beings?)</p><p>For a long time, scientists have been trying to come up with different theories to solve the Fermi Paradox, until one possibility became impossible to ignore. <em>Some said we are truly alone in this universe </em>(#1 The Great Silence)<em>, some said that all the aliens are hiding from us </em>(#2 The Dark Forest)<em>, some said that aliens are watching us like we watch zoo animals </em>(#3 Zoo Hypothesis)<em>, some said that space colonies can’t go beyond a certain limit </em>(#4 The Great Filter), <em>and some others said </em><a href="https://www.space.com/25325-fermi-paradox.html"><em>some other stuff</em></a><em>. </em>But if none of those fits quite right with you, there’s a quieter, yet far more unsettling possibility. That is, once aliens (and humans) reach a certain technological peak, instead of remaining biological, they (+ we 🤓 ) transcend into a purely digital form (#5 The Transcension Hypothesis). AND THEN we invented Chat GPT.</p><p>It’s actually not about whether the aliens live inside computers, but about where humans are headed. With Neuralink earning “Breakthrough” status from the FDA (U.S. gov Food and Drug Administration), Apple teasing mind-control features, and human trials at Synchron and NVIDIA Omniverse, the fusion of <strong>Mind and Machine </strong>is no longer science fiction. It is an understatement to say that this evolution is jet-fueled with Quantum Computing and Artificial Intelligence.</p><p>Imagine this… There are people out there who can create replicas (aka Digital Twins [1][2]) of your organs. There are people out there who are trying to reverse-engineer and simulate your brain [3][4]. There are AI startups that are building AI avatars that can perform any task you throw at them, mimicking exactly how you’d do it yourself [5]. CEOs of some major companies (Eric Yuan, CEO of Zoom, etc) are already sending their avatars to real-life meetings [6]. If we can simulate and digitize the brain, neural connections, and other organs, combined with an authentic replica (avatar) of your personality and mannerism, it’s just a matter of connecting the dots to “switch on” another YOU in the digital realm (in theory, nothing is preventing it). In fact, debates around <a href="https://www.google.com/search?q=Digital+Immortality&amp;rlz=1C5CHFA_enLK1065LK1065&amp;oq=Digital+Immortality&amp;gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQRRg7MgYIAhBFGDwyBggDEEUYPDIGCAQQRRg80gEHNDQ0ajBqMagCALACAA&amp;sourceid=chrome&amp;ie=UTF-8">Digital Immortality</a>, <a href="https://www.google.com/search?q=mind+uploading&amp;sca_esv=b445a9df1f419e25&amp;rlz=1C5CHFA_enLK1065LK1065&amp;source=lnms&amp;sa=X&amp;ved=2ahUKEwj9p83m-cyNAxUkVmwGHZY1CeYQ0pQJegQIBxAD&amp;biw=1512&amp;bih=823&amp;dpr=2">Mind Uploading</a> are already in motion [7][8].</p><p>But then, how will you prove your identity when there’s no finger to scan or face to recognize? You lean on fingerprints and Face ID because you can’t keep track of your passwords, or maybe because they are safer. So what do you do when you exist only as data, without a body or a face to authenticate? When you’re nothing more than digital code floating in the cloud, how do you convince the universe you’re still <strong>YOU</strong>? And what if (just an “IF” 😉) your digital twin or your AI avatar starts turning against you? And what if black-hat hackers start unleashing the power of Quantum Computing? (They’d exploit you not only from 1s and 0s; <em>Bits </em>but from everything in between 1s and 0s, and from both 1s and 0s at the same time; <em>Qubits</em>*).</p><p><em>*Theory might have been exaggerated for cinematic value.</em></p><h4>Reshaping IAM for Transcension</h4><p>This is a concise list of concepts from today’s IAM that could carry over into post-biological IAM.</p><ol><li><strong>Decentralized Identifier (DID)</strong> — A DID is a globally unique identifier that is not bound to any Identity Provider, Certificate Authority, or any Registry. Therefore, it can be used to identify each agent, resource, avatar, and every digital entity with a universally unique identifier.</li><li><strong>Proof‑of‑Possession (PoP</strong>)— Security mechanisms like <strong>DPoP</strong> and <strong>mTLS</strong> can be incorporated with other advanced technologies to create a streamlined way of proving one’s own self in a pure digital realm.</li><li><strong>Verifiable Credential (VC) </strong>—<strong> </strong>A VC is a tamper-proof, cryptographically verifiable credential. Together with continuous authentication mechanisms, VCs could be more common in every step of the workflow. This could mean that we need to VERIFY the issuance and the authenticity of the credential at each step (A token cannot simply say that this has this scope; it should say how and why it has this scope).</li></ol><h4>Continuous Trust Fabric</h4><p>In a post-biological world, we won’t be able to prove our identity with mere passkeys, credentials, or tokens. We will no longer be able to use something we know (<em>because everyone knows everything</em>) or something we have (<em>because anyone can replicate anything</em>). We would have to entirely rely on <strong>everything we are </strong>(<em>not something we are</em>), but of course, in a non-biological manner. Every thought pattern, every latency, every memory access pattern, and every single thought stimuli will weave our <strong>Trust Fabric</strong>. This fabric will keep branching out with every subtle electrical change in our brains (now digitized brains), and before we know it, we’ll move beyond fingerprints and authenticate with our <a href="https://www.wired.com/story/eeg-brainprint-biometric-identification">Brainprint</a>s.</p><p>On top of everything, we would have to make sure that everything is Quantum safe in order to survive in a post-biological world. It’s going to be way more annoying if someone hacks your Brain Computer Interface (BCI) and starts playing songs in your “head”.</p><p><strong>Just a purely speculative thought…</strong></p><p>From the moment Charles Babbage sketched his Analytical Engine, our singular drive have been to teach machines to think like us. But maybe, after a certain technological peak, we should invert the equation. Maybe we should upgrade human brains to do what AI and Machines can do so effortlessly, even if that means we have to merge with the machines. Because what if that is the only way <strong>You and I</strong> can exist beyond the <a href="https://www.google.com/search?q=technological+singularity&amp;rlz=1C5CHFA_enLK1065LK1065&amp;oq=technological+s&amp;gs_lcrp=EgZjaHJvbWUqCQgBEEUYOxiABDIGCAAQRRg5MgkIARBFGDsYgAQyBwgCEAAYgAQyBwgDEAAYgAQyBwgEEAAYgAQyBwgFEAAYgAQyBwgGEAAYgAQyBwgHEAAYgAQyBwgIEC4YgAQyBwgJEAAYgATSAQg1MDg1ajBqMagCALACAA&amp;sourceid=chrome&amp;ie=UTF-8">Technological Singularity</a>?</p><p>In a world where people are fighting for both immortality and euthanasia, do not forget to keep your head straight and prove <strong>who you are</strong>.</p><p>Happy Coding 👩🏻‍💻</p><p><strong>References</strong></p><p>[1] — <a href="https://www.wsj.com/health/healthcare/digital-heart-surgery-patient-treatment-c35ec4be?utm_source=chatgpt.com">https://www.wsj.com/health/healthcare/digital-heart-surgery-patient-treatment-c35ec4be</a></p><p>[2] — <a href="https://www.washingtonpost.com/health/interactive/2024/virtual-surgery-digital-organs-doctors/">https://www.washingtonpost.com/health/interactive/2024/virtual-surgery-digital-organs-doctors</a></p><p>[3] — <a href="https://www.nature.com/immersive/d42859-025-00001-w/index.html">https://www.nature.com/immersive/d42859-025-00001-w/index.html</a></p><p>[4] — <a href="https://news.microsoft.com/de-ch/2025/03/18/inait-announces-collaboration-with-microsoft-to-deploy-novel-ai-based-on-digital-brains-across-industries/">https://news.microsoft.com/de-ch/2025/03/18/inait-announces-collaboration-with-microsoft-to-deploy-novel-ai-based-on-digital-brains-across-industries</a></p><p>[5] — <a href="https://ravatar.com/">https://ravatar.com</a></p><p>[6] — <a href="https://www.raconteur.net/technology/ai-avatars-meetings">https://www.raconteur.net/technology/ai-avatars-meetings</a></p><p>[7] — <a href="https://theconversation.com/logging-off-life-but-living-on-how-ai-is-redefining-death-memory-and-immortality-246306">https://theconversation.com/logging-off-life-but-living-on-how-ai-is-redefining-death-memory-and-immortality-246306</a></p><p>[8] — <a href="https://indiandefencereview.com/the-futurist-who-predicted-the-iphone-and-internet-now-claims-that-immortality-could-be-reached-in-5-years-time/">https://indiandefencereview.com/the-futurist-who-predicted-the-iphone-and-internet-now-claims-that-immortality-could-be-reached-in-5-years-time</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf46026396cb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/identity-beyond-borders/proving-you-are-you-when-theres-no-you-cf46026396cb">Proving You Are You When There’s No You</a> was originally published in <a href="https://medium.com/identity-beyond-borders">Identity Beyond Borders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Debug Integration Tests in WSO2 Identity Server]]></title>
            <link>https://shenalijayakody.medium.com/how-to-debug-integration-tests-in-wso2-identity-server-a9fe850b4751?source=rss-cb4155af9a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9fe850b4751</guid>
            <category><![CDATA[identity-server]]></category>
            <category><![CDATA[integration-testing]]></category>
            <category><![CDATA[debug]]></category>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[maven]]></category>
            <dc:creator><![CDATA[Shenali Jayakody]]></dc:creator>
            <pubDate>Fri, 20 Sep 2024 12:47:07 GMT</pubDate>
            <atom:updated>2024-09-20T12:48:02.480Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n4PwopHAhY6pKAgAfXSq-Q.png" /></figure><p>Envision yourself within the majestic walls of the Royal Albert Hall, as the most beautiful piece of orchestra is brought to life right before your eyes by the finest musicians on the planet. Each player is a master of their craft, but the true magic unfolds only when they play in perfect unison.</p><p>Similarly, perfectly-compiled<strong> classes </strong>and picture-perfect<strong> unit tests </strong>do not mean anything if the pieces don’t work in sync. And that’s exactly why we have <strong>integration tests</strong>.</p><h3>Integration Tests in WSO2 Identity Server</h3><p>You can find integration tests of the IS within the <a href="https://github.com/wso2/product-is">product-is</a> repository. Tests related to backend functionalities are located inside the <a href="https://github.com/wso2/product-is/tree/master/modules/integration/tests-integration/tests-backend"><strong>tests-backend</strong></a> folder.</p><p>Whether you are adding tests for a new feature or updating tests to accommodate feature improvements, you might need to debug integration tests.</p><p>Now, let’s take a closer look at the two main ways you can go about debugging integration tests in IS.</p><h4><strong>Two Ways to Debug Integration Tests in IS</strong></h4><ol><li>Debug integration test codebase</li><li>Debug identity server codebase while running integration tests</li></ol><h3><strong>PART 1 — Debug Integration Test Codebase in IS</strong></h3><p>While writing integration tests, you may frequently need to debug the test code. Below is a step-by-step guide to help you effectively troubleshoot the tests you’ve written.</p><h4>STEP 01: Build the IS without tests</h4><p>Once you have opened the product-is repository in your preferred IDE (hopefully it is IntelliJ 😏), build the project <strong>without tests</strong> using the following command.</p><pre>mvn clean install -Dmaven.test.skip=true</pre><p><em>This will create a snapshot of your project and save it inside the </em><strong><em>target</em></strong><em> folder. This snapshot will be used as a dependency during test execution.</em></p><h4>STEP 02: Run tests in debug mode</h4><p>You don’t have to run all the tests (<em>because it takes half of your day</em>). You can run only the test classes that you’ve written or updated. For this purpose, you can comment out the unnecessary test classes from the <a href="https://github.com/wso2/product-is/blob/master/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml">testng.xm</a>l.</p><p>You can comment out everything except:</p><ol><li>The set of <strong>listeners</strong> located at the very top of the file.</li><li>The <strong>IdentityServerTestSuitInitializerTestCase</strong> in the set of tests named <strong>is-tests-initialize</strong>.</li></ol><p>(You should comment out the rest of the tests in <strong>is-tests-initialize</strong> only if you do not need Tomcat or LDAP)</p><p>Now that you have only the tests that you need to debug, run the following command from the <strong>tests-backend</strong> folder.</p><pre>mvn clean test -Dmaven.surefire.debug</pre><p>This configures the JVM running the tests to act as a server, opening a port (by default 5005) for remote debugger connections. The JVM (now acting as a server) will then listen for incoming connections.</p><p>Once the JVM is ready for remote requests, the following output will appear in the terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*oFSaXAKoZUyAIpg0wtEL1g.png" /><figcaption>JVM listening for debugger connections on port 5005</figcaption></figure><p>This is the signal for you to connect to the remote JVM via IntelliJ in order to debug the source code of the application that runs on the remote JVM.</p><p>(In our case, tests are running on the remote JVM and we are trying to debug the test codebase)</p><h4>STEP 03: <strong>Configure a remote JVM debug in IntelliJ — product-is</strong></h4><p>In the same IntelliJ window with the product-is code (aka test codebase), go to <strong>run &gt; edit configurations</strong> and add a new debug configuration.</p><p>Select the type <strong>Remote JVM Debug</strong> and update the configuration to connect to the <strong>5005</strong> port.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Y16saD7na-laLeYC" /></figure><p>Once you have added the new run/debug configuration, you can start the debugger in IntelliJ by clicking the debug icon. Now the JVM will run the tests while allowing you to debug the test codebase in real time.</p><p>Here onwards the process is really simple. You can debug your tests as you prefer by adding debug points.</p><p>Refer to <a href="#a4c5">PART Zero</a> for debugging essentials.</p><h3>PART 2 — Debug IS codebase while running integration tests</h3><p>In certain (aggravating 😒) scenarios, you may need to debug the <strong>Identity Server </strong>source code while running integration tests.</p><h4>STEP 01: Build the IS without tests</h4><p>Refer to the same title under PART 1.</p><h4>STEP 02: Update automation.xml</h4><p>During the test execution, an IS instance is started, which is used by integration tests. To debug the IS codebase, you need to open a port on this server, allowing a remote debugger to connect.</p><p>You can configure this in the <a href="https://github.com/wso2/product-is/blob/master/modules/integration/tests-integration/tests-backend/src/test/resources/automation.xml#L234">automation.xml</a> file.</p><p>Uncomment the line below and <strong>change the port to 5006</strong>, as the test JVM already uses port 5005 (refer to PART 1).</p><pre>&lt;parameter name=&quot;cmdArg&quot; value=&quot;debug 5006&quot; /&gt;</pre><h4>STEP 03: Run tests in debug mode</h4><p>Refer to the same title under PART 1 or use the below command (same as PART 1).</p><pre>mvn clean test -Dmaven.surefire.debug</pre><p>This command opens <strong>port 5005</strong> allowing you to debug the test codebase while the automation.xml configuration opens <strong>port 5006</strong> enabling you to debug the IS codebase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*_C0XaS62vvO6MbSSsCXw9g.png" /><figcaption>Server listening for debugger connections on port 5006</figcaption></figure><p>This is the green light to start your remote debugger.</p><h4>STEP 04: Configure a remote JVM debug in IntelliJ</h4><p>In another IntelliJ window open the source code of the IS component you need to debug and add a new debug configuration <em>(let’s say we want to debug the </em><a href="https://github.com/wso2/carbon-identity-framework"><em>identity framework</em></a><em>).</em></p><p>To configure the remote debugger refer to the same title in PART 1.</p><p>Make sure you connect to <strong>port 5006</strong> for this round.</p><p>And just like that you are all set to debug ⚔️</p><h3>Summary- Debugging IS Integration Tests (2 ways)</h3><p>The following are the main takeaways to keep in mind.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Frj2b1Gr2zS88Jgp7RY7DQ.png" /></figure><h3>PART Zero — IntelliJ Debugging 101</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6b2yWLYfFQ-jLrl_LrseaA.png" /></figure><p>And there you have it — just like a well-rehearsed orchestra, your code is now working in perfect sync thanks to integration tests.</p><p>Let your code take center stage!</p><p>&lt;/&gt; ♫ ♪ ♬</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9fe850b4751" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Silence of the Clouds* ft. Oracle RAC]]></title>
            <link>https://shenalijayakody.medium.com/the-silence-of-the-clouds-ft-oracle-rac-c04a2baffa88?source=rss-cb4155af9a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c04a2baffa88</guid>
            <category><![CDATA[oracle-database]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[oracle]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Shenali Jayakody]]></dc:creator>
            <pubDate>Tue, 25 Jun 2024 20:22:06 GMT</pubDate>
            <atom:updated>2024-06-25T20:22:06.388Z</atom:updated>
            <content:encoded><![CDATA[<h3>Basic concepts of Oracle RAC made easy</h3><p>*clouds refer to mainstream cloud providers</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*iE2smdOOiFIJUYl19cv42g.png" /><figcaption>Generated by ChatGPT 4o</figcaption></figure><h4>THE INTRO</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P3bXo2GWRXqNwmrxdKm34g.png" /><figcaption>Oracle Docs, 20xx</figcaption></figure><p>You’ll find the above line in the “Introduction to Oracle RAC” section of the official Oracle documentation. But who has time to read that? 😏</p><p>Therefore, allow me to summarise everything you need to know about Oracle RAC 📌 <strong>High Performance over High Cost </strong>📌</p><h4>How is Oracle RAC Designed?</h4><p>A typical database has 2 components, the storage area or the actual database and the database instance (aka database software).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*uesnOHoIw4bxVlK4KSgdMw.png" /><figcaption>A typical DB</figcaption></figure><p>Just like any other software you have worked with, the database instance could be error-prone. What if we could have several database instances instead of just one fault-intolerant instance? 🤔 This is exactly what <strong>Oracle RAC</strong> is doing. RAC consists of multiple database instances coupled with a single storage. Yet, in the pov of the external application accessing the database, it connects to a single database. All the internal communication and workload distribution is handled by RAC itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*qTEgjYPOcyOPChmFKvKMQQ.png" /><figcaption>Oracle RAC</figcaption></figure><p>These multiple database instances are running on different servers, eradicating the possibility of a single point of failure.</p><h4>Key advantages of Oracle RAC</h4><ul><li>Scalability</li><li>High availability</li><li>Automatic failover</li><li>Load balancing</li></ul><p>You’d have noticed that these are the same benefits offered by mainstream cloud providers (but with “High Performance over High Cost<strong>”</strong>).</p><h4>Oracle RAC around the World</h4><p>If you want to span RAC in different geographical locations, you can utilize <strong>Oracle Extended Cluster</strong>. This approach is discouraged since we have to employ disc mirroring to sync data across multiple regions, which could cause latency issues 🐌.</p><p>In order to mitigate this challenge, you can harness the goodness of <strong>Oracle Active Data Guard </strong>which is a multi-regional offering. For best performance and full disaster recovery, it is recommended to couple active guard with RAC 🚀.</p><h4>[ADVANCED] Oracle RAC Revealed</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lhz3UNb-t0P5FARZqevDiw.png" /><figcaption>Oracle Doc, 20xx</figcaption></figure><p><strong>Redo Logs</strong></p><p>A redo log is a set of files that records the changes made to data such as insertions, updates, deletions, etc. You can use this to replay aka redo (not undo) the changes to your database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*cZPLfPmIvdLbyJCWIYLUjw.png" /><figcaption>Redo Logs in Oracle RAC</figcaption></figure><p>When there are multiple database instances in the same database (aka RAC) we should be able to redo the transactions done by each instance separately. Therefore, as opposed to non-cluster databases, in RAC each database instance has its own thread of redo logs.</p><p><strong>Undo Tablespace</strong></p><p>When a change is done, the original data (aka state) is copied to undo logs. Therefore, these logs can be used to roll back the transactions to the previous state. It also ensures read consistency which is the act of making sure that you read the state of data at the point the query started (Changes made to the data by other transactions after the query started are not visible to the query).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*AVQI4nu4j--knEXEGSLyQg.png" /><figcaption>Undo Logs in Oracle RAC</figcaption></figure><p>In RAC, each database instance has a separate undo tablespace for transaction isolation. Once the transactions processed by an instance are committed and the Oracle undo retention period has concluded, the undo logs are considered expired and they will be rewritten if the undo tablespace is full.</p><h4><strong>THE OUTRO</strong></h4><p>And there you have it, the unsung hero in the database world. You might have come across Oracle RAC quite a few times and overlooked it assuming it’s just mediocre among the top cloud vendors. But now you know that whether you’re scaling up for high performance or ensuring your data’s safety with automatic failover, RAC’s got your back 😌.</p><h4>THE END 🏁</h4><p>Fellow developers, keep your head in the cloud 🌧</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c04a2baffa88" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IAM in a Cosmopolitan World]]></title>
            <link>https://medium.com/identity-beyond-borders/iam-in-a-cosmopolitan-world-d079946c5aa5?source=rss-cb4155af9a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d079946c5aa5</guid>
            <category><![CDATA[iam-solutions]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[identity-management]]></category>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[authorization]]></category>
            <dc:creator><![CDATA[Shenali Jayakody]]></dc:creator>
            <pubDate>Mon, 18 Mar 2024 07:52:15 GMT</pubDate>
            <atom:updated>2024-05-13T04:04:46.195Z</atom:updated>
            <content:encoded><![CDATA[<h3>A guide to understanding basic IAM concepts by exploring the captivating universe of an online magazine.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CuLK9wqxjfcLuTZnyENDvA.png" /></figure><p>Summer had just begun. Butterflies were gracefully dancing among purple petunias. <strong>Lumina</strong> team, the family of the best online lifestyle magazine was ready to conquer the world.</p><h4>Part I: Outside Lumina</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*vKITDBSAlEf4knWI84IoQw.png" /></figure><p>Rose Kelly is an 18-year-old girl who’s struggling to find her passion in an ever-changing world. On a warm summer morning, she came across an online magazine. Little did she know that this moment would be remarkable in her monotonous life.</p><p>Hoping to see the sensational content of Lumina, she created an account for her. After entering her username and password she was able to witness the most beautiful cover page of a magazine she had ever seen.</p><blockquote>This is A<strong>uthentication</strong>. The lumina team was making sure that Rose was actually Rose Miranda Kelly (Social Security Number — 334 600 901, Age — 24, Location — California West)</blockquote><p>She was distracted by a notification on her mobile 📲</p><p>The Lumina team was already excited about their new customer 🤩. When they asked Rose to enable <strong>Multi-Factor Authentication </strong>(MFA), equally excited Rose quickly enabled it to secure her account.</p><blockquote><strong>MFA (This is what Rose enabled)</strong></blockquote><blockquote>Something Rose Knew — The Password</blockquote><blockquote>Something Rose Had — The One-Time Password (OTP) sent to her mobile</blockquote><blockquote>Something Rose Is — Her fingerprint</blockquote><p>Being a fashion enthusiast Rose browsed the last Spring collection of all the renowned brands for hours. But when she tried to view the upcoming Winter collection with dazzling eyes, she was not allowed as she was not a premium member.</p><blockquote>This is <strong>Authorization. </strong>Rose was only able to access the content that was allowed under her permission and privilege level. (She was indeed sad 😔)</blockquote><h4>Part II: Inside Lumina</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*X5uR7Uy_UAaE_y8yj9q3dw.png" /></figure><p>In Lumina headquarters, the CEO Lily Martinez entered the building with a “Devil Wears Prada” entrance. With an Iced Mocha in one hand, she logged into their Lumina system. As the CEO of one of the most elite companies in the entire world of course she had MFA enabled. (but with retina scans 👁️ for extra protection)</p><p>This was a woeful day for Lily as her colleague, and long-time friend John Krasinski was resigning from the Lumina family. Lily de-provision John from the Lumina system with a heavy heart. Despite John’s departure, Lily was excited about the first day of Melissa as she was provisioning the new intern writer to the Lumina system.</p><blockquote><strong>User Provision</strong> — also known as user onboarding, is the process of creating and granting access to digital resources for new users within an organization.</blockquote><blockquote><strong>User De-Provision</strong> — also known as user offboarding, is the process of revoking access and removing user accounts and associated privileges when a user leaves the organization or no longer requires access to specific resources.</blockquote><p>Since Melissa was an intern, like all the interns she only had access to draft stories. Once her story is drafted, it will go through a chain of junior and senior writers in order for that to be published in the magazine. First, her direct junior writer modifies and amends her story keeping the essence of the writing. Then it is passed to the senior writer for approval. Upon successful approval, the story would be passed to the board of editors and the chief editor. In spite of how busy Lily is, she always makes sure to check the stories personally.</p><blockquote>This is <strong>Role Based Access Control </strong>(RBAC).</blockquote><blockquote><strong>Roles</strong>: Intern, Junior Writer, Senior Writer, Editor, Chief Editor, and CEO have different access levels and permission levels. In an IAM system, roles can be mapped into the structure of the organization.</blockquote><blockquote>There are 3 RBAC types.</blockquote><blockquote>1. Core RBAC — The overall organization implements core RBAC where photographers, writers, editors, and graphic designers have distinct access to resources and perform certain actions.</blockquote><blockquote>2. Hierarchical RBAC — Writers who comprise three roles as Interns, Junior, and Senior writers have a Hierarchical RBAC where senior writers include the access level of intern writers and junior writers.</blockquote><blockquote>3. Constrained RBAC — <br> i. Static Separation of Duty (SSD) — Ginny, a senior writer did some minor tweaks to Rose’s story and then passed it to another senior writer George for approval. <br>(A single user cannot hold mutually exclusive roles.)</blockquote><blockquote>ii. Dynamic Separation of Duty (DSD) — George who pre-approved Rose’s story is also an editor in the team Lumina. Yet, he is not allowed to approve Rose’s story at the editor level as he already approved it at the senior writer level. <br>(Though a user can be in conflicting user roles, they are not allowed to function in both roles at the same time.)</blockquote><p>2 years ago on a dark Winter day, Lily lost her brother to mental health struggles. To help innocent souls like him, Lily onboarded “Lumina Life”, the mental health support system on par with the online magazine. The 24/7 call center of Lumina Life is always armed with certified psychologists and psychiatrists. Only certified psychiatrists are allowed to prescribe immediate medications to a patient who shows suicidal tendencies. Additionally, they are allowed to edit the personal file of the patient.</p><blockquote>This is <strong>Attribute Based Access Control</strong> (ABAC)</blockquote><blockquote>ABAC is a more logical way of access control and it could be utilized in complex scenarios where RBAC does not cater to the requirements.</blockquote><blockquote>According to the above example, access is controlled as below.</blockquote><blockquote>Job description of the subject — Certified Psychiatrist<br>Accessible resources— Personal file of the patient<br>Allowed actions — Prescribe medications, and edit the personal file.</blockquote><p>Adriana has been a part of the Lumina team for a decade. Even though she is a photographer she shows a great interest in publications as well. Every morning she checks the stories drafted by her colleagues. Since she has already logged in to Lumina Lens, the photography portal, she does not have to log in again to the writer system. (This amazes Adriana every single time 😲)</p><blockquote>This is <strong>Single Sign On </strong>(SSO) — Allow users to log in to multiple applications/systems using a single ID.</blockquote><blockquote>This is possible due to the trust Lumina has placed in their Identity Provider (IdP, Authorization Server) WSO2 Identity Server.</blockquote><p>WSO2 Identity Server (IS) has been a savior of Lumina for a few decades. IS verifies the identity of employees and customers (authentication) and manages who can access what (authorization).</p><p>In 2002, Lumina found itself in a critical situation within its organization when an employee managed to hack the chief editor’s account, gaining unauthorized access to sensitive corporate information, which was later exposed to the media. This incident had far-reaching negative consequences for the company. It was during this challenging period that Lily, Lumina’s CEO, realized the importance of seeking assistance from WSO2, a top-tier company specializing in IAM solutions.</p><blockquote><strong>Why IAM is so important?</strong></blockquote><blockquote>It helps prevent problems like <strong>identity theft</strong>, <strong>data breaches</strong>, and <strong>unauthorized access </strong>within organizations. By using IAM tools, businesses can control <strong>who has access to what information</strong>, keeping sensitive data safe. It also makes it easier to <strong>manage user accounts</strong> and ensure that only the right people can access specific resources. Essentially, IAM keeps everything secure and running smoothly, <strong>protecting both the organization and its data from potential threats.</strong></blockquote><p>Lumina, along with Lumina Life and Lumina Lens, is trying to leave a positive mark on a retrogressive world. With the exceptional guidance of Lily Martinez, they have won the admiration of people across the globe. Apart from their significant social impact, they prioritize the safety and privacy of both their employees and customers which is made possible by the brilliant IAM solutions offered by WSO2.</p><h4>Keep an eye out for upcoming articles, to discover more about WSO2 and their pioneering IAM solutions coupled with thorough explanations of IAM principles.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*qzIjDSO1nw8n1xd-.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d079946c5aa5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/identity-beyond-borders/iam-in-a-cosmopolitan-world-d079946c5aa5">IAM in a Cosmopolitan World</a> was originally published in <a href="https://medium.com/identity-beyond-borders">Identity Beyond Borders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Quantum Physics?]]></title>
            <link>https://shenalijayakody.medium.com/what-is-quantum-physics-abff92991c4b?source=rss-cb4155af9a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/abff92991c4b</guid>
            <category><![CDATA[wave-particle-duality]]></category>
            <category><![CDATA[wave-function-collapse]]></category>
            <category><![CDATA[quantum-physics]]></category>
            <category><![CDATA[superposition]]></category>
            <category><![CDATA[quantum-mechanics]]></category>
            <dc:creator><![CDATA[Shenali Jayakody]]></dc:creator>
            <pubDate>Sat, 27 Jan 2024 17:00:00 GMT</pubDate>
            <atom:updated>2024-01-27T17:00:00.566Z</atom:updated>
            <content:encoded><![CDATA[<h3>Understanding Wave-Particle Duality (and Mysteries of the Universe)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-qxgV6gFpwkwKH6M.jpg" /></figure><h4>Part I — The Science</h4><p>Just take a look around where you are. Do you see any of the objects in your surroundings moving and vibrating without any external force? In a rather simplified sense do you see those objects acting like waves? No. They are still. Just where you have placed them or just where they have been built. But science says otherwise. Even though we don’t see our day-to-day objects (When I say objects they are anything that occupies space and has a mass) moving here and there like straight out of a Harry Potter movie, scientists say that at the subatomic particle level, they don’t behave like that. They behave like waves. And that’s where quantum physics comes into play.</p><p>Today we are going to talk about the concept of <strong>Wave Particle Duality </strong>in quantum physics.</p><p>If you read the first paragraph of this article you already have heard what wave particle duality is. It says that at subatomic level particles have both wave-like and particle-like properties.</p><p>To talk more about the wave particle duality we need to know a little bit about what superposition is.</p><p>So what is <strong>Superposition</strong>?</p><p>Let’s take a single particle. As you already know at the subatomic level this particle behaves like a wave. So let me get this straight now the particle is not a single point but rather a wave (like a water ripple may be). In classical physics as we already know we precisely know where a particle is and we can calculate that position and also other properties associated with the particle like momentum. But in the quantum world, this particle (which is currently behaving like a wave) does not have one single location. We don’t know where it is. That is because this particle can exist in multiple states simultaneously. This is known as superposition. Because of superposition, we cannot measure the precise location of the wave-like particle. There is something called <strong>wave function</strong>. This describes the state of a particle including all the possible states it can occupy. Since the wave function gives us information about all the possible states of a particle, it in turn describes the superposition of that particle.</p><p>We say that at subatomic level particles behave like waves. What does that really mean in terms of classical physics? It says that this particle shows various properties of waves like interference (overlapping of waves can result in a larger wave or it could cancel out the entire wave) and diffraction (bending of waves when in contact with an obstacle). These properties were observed by the <strong>double-slit experiment</strong>. Also, it is said that in a quantum system of multiple particles, interference has an impact on the overall superposition of other quantum particles.</p><p>Up until now, we have been talking about the wave-like behavior of quantum particles under the wave-particle duality concept. Let’s look at how a quantum particle that is said to be behaving like a wave can actually behave like a normal particle.</p><p>When we try to observe a quantum system by measuring its observable properties like position or momentum it is said that the <strong>wave function collapses</strong>. This means that a quantum particle that was behaving like a wave that had a superposition of states, collapses into a single state which matches the outcome of the measurement that was observed. (The measurement that was observed or the outcome of the collapse or rather where on earth the particle is determined by the probabilities encoded in the wave function.) To further explain this, First, we could not pinpoint the position of the wave-like particle due to superposition. But upon observation of the quantum system through measurement, we are now able to precisely tell the position of the particle and it is known as collapsing of the wave function.</p><p>Now it is not a wave and there is no superposition. It is indeed a particle now which has a definite state.</p><p>The term collapsing of wave function could be misleading. In association with the concept of wave-particle duality, one could think that collapsing means that the quantum particle is literally changing its state from a wave to a particle upon observation. And that is not correct. It refers to a change in our knowledge or information about the quantum system. Before measurement, the particle’s properties are described by the wave function’s superposition and after measurement, the wave function collapses to a single state.</p><p>While you are reading this there is a slight chance that you have thought about the famous <strong>Schrödinger’s cat</strong>. If so, you are on the right track. This thought experiment was used to illustrate the superposition and the collapse of the wave function.</p><p><strong>Summary of Part I</strong></p><p>Below are the key takeaways from today’s learning.</p><ul><li>Wave-particle duality — In the quantum world small subatomic particles behave like both waves and particles.</li><li>Superposition — A quantum particle does not have one single state/position. It can simultaneously exist in multiple states.</li><li>Wave function — It describes all the possible states that a quantum particle can occupy.</li><li>Wave function collapse — When a quantum system is measured, the entire system including each particle collapses into a single state from superposition states.</li></ul><p>We talked about two historical experiments. You can research more on these experiments to understand the concept more.</p><ul><li>Double slit experiment — Illustrates the wave-particle duality</li><li>Schrödinger’s cat experiment — illustrates the superposition and collapse of wave function.</li></ul><h4>Part II — The Mysteries</h4><p>This was a very basic interpretation of one quantum concept. Understanding the wave-particle duality is the key to entering into quantum physics. Every single minute we experience classical physics and our brain is trained to interpret particles as just particles and objects as just objects. The very step towards understanding quantum physics is to train our brains to interpret that particles sometimes can be waves. Mastering this is essential to break down complex quantum concepts. Don’t forget that in the quantum world, we are talking about teeny tiny particles, not day-to-day objects. But…..</p><p>Day-to-day objects are made up of these small particles and that makes you wonder if these concepts and principles can be applied to our everyday lives. The quantum world is indeed mysterious. Just for fun, rethink the following but in a “quantum sense”.</p><ul><li>Power of the <strong>universe</strong> and <strong>manifestation</strong> — If particles are vibrating like waves and they are in superposition can we acquire the desired position by tapping into a certain vibrational level according to the wave function collapse?</li><li><strong>Pirith</strong> — It is believed that Pirith has some healing powers. The chanting of Pirith in Buddhism is often performed with attention to certain aspects of vocalization, including rhythm, intonation, and clarity of pronunciation (which all can be part of tapping a certain vibration). Can this have something to do with the collapsing of wave function?</li><li><strong>The holy trinity</strong> in Christianity (The Father, the Son, and the holy spirit) — It has been a mystery ever since how the holy trinity, three persons can exist as one essence, the God. Can superposition answer this?</li></ul><p>Well, those could be utterly stupid assumptions but it is fun to think about them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abff92991c4b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Docker]]></title>
            <link>https://shenalijayakody.medium.com/understanding-docker-d14be3f981a9?source=rss-cb4155af9a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d14be3f981a9</guid>
            <category><![CDATA[dockerfiles]]></category>
            <category><![CDATA[docker-container]]></category>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[docker-image]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Shenali Jayakody]]></dc:creator>
            <pubDate>Wed, 11 Aug 2021 14:55:20 GMT</pubDate>
            <atom:updated>2023-03-27T04:48:32.358Z</atom:updated>
            <content:encoded><![CDATA[<h4>A beginner’s guide to understand docker concepts and common docker commands.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*-ezeFC5y4nmt_Ec17c_Gbw.png" /></figure><h3>Why Docker?</h3><p>Developers have to work with different languages, frameworks and architectures when working on a project. Coding is not just about coding. It is about handling all the frameworks and libraries in an effective way so that the developer is able to deliver the best out of a project.</p><p>Docker simplify the tedious task of managing and choosing different frameworks, libraries and all the other dependencies. With docker, developers can easily pack the code along with dependencies into a <strong>container</strong>. This container can be run on any host that has docker installed in it, without needing to download or update dependencies manually.</p><p>Once you get the head around basic concepts of docker, you will be able to get a container up and running by executing few commands.</p><h3>Docker containers vs Virtual Machines.</h3><p>Even though both docker containers and VMs provide isolated environments and can be used to package applications, there are prominent differences between these two.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ANZ_8teC7OYsxYd-" /><figcaption><a href="https://www.nakivo.com/blog/docker-vs-kubernetes/">https://www.nakivo.com/blog/docker-vs-kubernetes/</a></figcaption></figure><p>VMs runs on Hypervisor and each VM has a separate Operating System inside it. Docker containers on the other hand, do not have separate Operating Systems inside them. Containers utilizes host Operating System and host OS kernel.</p><p>Due to the above reason, containers are more light weighted compared to VMs. Hence the process of <strong>containerization</strong> is much more easier and faster than <strong>virtualization</strong>.</p><p>Now let’s try to understand different concepts of docker.</p><h3>Images</h3><p>A docker image is a read-only template. It is a blueprint to create a container.</p><p>Once you have your application with its dependencies, you can create an image from that application. Anyone can use that image to create a container. Many containers can be created from one single image. You will learn more about this in the latter part of this article.</p><p>An image has a layered architecture. Most often a docker image is based on an existing image.</p><p>For those who are coming from an OOP background, you can think of images and containers as classes and objects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*YRCeYz5OfJOmnmpIxai4bw.png" /></figure><p>NOTE: All the containers of an image should be removed before removing an image.</p><h3>Containers</h3><p>A container is a runnable instance of an image. A container has its own isolated environment with a separate file system and a network. A container is just like a machine. However, all the containers share the same host OS kernel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*w5Y_IaCUT6Ze7bAuXEVpZA.png" /></figure><p>We will learn more about containers in a while.</p><h3>Docker registries</h3><p>Docker images are stored in places called docker registries.</p><p>There are two types of registries as <strong>public registries</strong> and <strong>private registries</strong>. <a href="https://hub.docker.com/">Docker hub</a> is an example for a public docker registry. It is the default registry to which docker refers when running commands unless otherwise another registry is specified.</p><p>We can pull images from docker registries and we can run containers from those images. Whenever you pull an image from a docker registry, docker will check whether that image exists locally. If the image does not exist locally, then docker will pull it from the registry. Since images have a layered architecture, docker will pull the image layer-wise. If the image exist locally, only the different layers will be downloaded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*9LzkZttbVBj_Y5iBPVVCOA.png" /></figure><p>You can check all the tags of an image, from the docker registry in which the image exist.</p><p>The below image shows currently available tags of <strong>redis</strong> image in docker hub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kvuBueRTnXvAfSQ20C438w.png" /></figure><p>If the tag is not specified, the image with the “<strong>latest</strong>” tag will be pulled.</p><h3>Containers in depth</h3><p>You can run a container simply by using <strong>docker run</strong> command. Moreover, different <strong>tags</strong> can be used with run command in order to adjust the way in which the container should run according to the requirements.</p><p>Check <a href="https://docs.docker.com/engine/reference/commandline/run/">here</a> to learn more about docker run command and tags.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*yc6wfFuXqFddGEwfmIGFQQ.png" /></figure><p>If you does not specify a name for the container, docker will automatically generate a name.</p><p>You can later access a container using its name or id.</p><p>Use <strong>docker ps/ps -a </strong>commands to access name/id of containers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*X2veHN27uHAoDVM7rcQMoQ.png" /></figure><p>Following are some useful commands related to containers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*bzhaZ06OurNuL9Y2l8licQ.png" /></figure><h4><strong>Port Mapping</strong></h4><p>Since containers have their own environment, we cannot directly access an application running on a port inside a container. In order to do so, we need to map the port in which the application is running on inside the container to a free port on docker host.</p><blockquote>What is docker host?</blockquote><blockquote>A Docker host is <strong>a physical computer system or virtual machine running Linux</strong>. This can be your laptop, server or virtual machine in your data center, or computing resource provided by a cloud provider.</blockquote><p>This is known as port mapping and -p tag is used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*_KLCHFu0c-59tUcJIupVjg.png" /></figure><h4>Volumes and Bind Mounts</h4><p>Each container have a separate file system inside the container. Data stored inside the file system of a container will be completely lost when we delete a container. This is not what we expect. In order to achieve data persistency, we need to map a directory inside a container to a directory outside the container.</p><p>We can either use <strong>volumes</strong> or <strong>bind mounts</strong> to accomplish data persistency and <strong>-v</strong>, <strong>--volume</strong>,<strong>--moun</strong>t tags are used with <strong>docker run </strong>command.</p><p>Volumes are stored inside the docker’s storage directory in the host machine and docker manages the content of that directory. Non docker process should not modify that part of the host’s file system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*WsrdGe_O40sjZAtkkf9BSA.png" /></figure><p>Unlike volumes, bind mounts can be stored anywhere on the host. Hence, bind mounts are specified with the full path on the host. Moreover, non docker process can modify the contents of a bind mount.</p><p>You have to be careful when using bind mounts, as processes running inside containers can change the host filesystem. Unlike bind mounts, volumes are isolated from the core functionality of the host.</p><p>There are two types of volumes as named volumes and anonymous volumes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*9hlCnir-7BbGD4LUNZek5A.png" /></figure><p>Comma separated key value pairs are used with mount flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*5hMUZ1MLdOGOBsLvACg0JA.png" /></figure><p>For anonymous volumes, source field can be omitted. <strong>Source</strong> can also be specified as <strong>src </strong>while <strong>target</strong> can also be specified as <strong>destination</strong> or <strong>dst</strong>. Additionally, <strong>readonly </strong>field and <strong>volume-opt</strong> field which consists of key-value pairs with option name and the value can be used. Note that volume-opt can be used more than once.</p><blockquote>NOTE: Bind mount commands works the same way. But you need to specify the full path of the directory on the host machine.</blockquote><blockquote>Furthermore, if you use --mount to bind mount a file/directory that does not exist, it will throw an error.</blockquote><h4>Networking</h4><p>In order to provide networking functionality, docker uses several network drivers and each container has a internal IP address of its own.</p><ul><li><strong>bridge</strong> - Default network driver.</li></ul><p>If you does not mention a network driver specifically this is the one that docker is going to use. Containers on the same bridge network can communicate with each other. You can either use the <strong>default bridge</strong> network named “bridge” or you can create <strong>user defined bridge</strong> networks.</p><ul><li><strong>host</strong> - this driver uses host’s network</li></ul><p>If you use host network, the container will not get its own IP address. This means, if an application is running on a port inside such a container, you will be able to access that application on host’s same port. This can be really helpful in certain situations.</p><ul><li><strong>overlay</strong> - connect multiple docker daemons together and enable docker swarm services to communicate with each other.</li></ul><p>Using an overlay network can come in handy when containers running on different hosts need to communicate with each other.</p><ul><li><strong>macvlan</strong> - allow to assign a MAC address to a container.</li></ul><p>Using macvlan network make the container looks like a physical device in the network. Hence, this will be useful when dealing with legacy applications and applications that monitors network traffic which need such a behavior.</p><ul><li><strong>none</strong> - this allows to disable all networking, thus containers will not be attached to any network.</li></ul><p>Furthermore, you can use <strong>third party network plugins</strong> with docker.</p><p>To learn more about different network drivers in docker, visit <a href="https://docs.docker.com/network/">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*ZoluvtB1ahf4Fhm50kdyIA.png" /></figure><p>When creating a network using <strong>docker network create</strong> command you can use <strong>--driver</strong>, <strong>--subnet</strong>, <strong>--ip-range</strong>, <strong>--gateway</strong> flags optionally.</p><p>Moreover, you can get information about the network of a specific container by checking out the “Network Settings” section in the JSON array returned when <strong>docker inspect containerName</strong> command is executed.</p><p>Make sure to disconnect all the containers attached to a user defined bridge network before removing the network.</p><p>Check <a href="https://docs.docker.com/network/">here</a> to learn more about networking in docker.</p><p>Containers on the same<strong> user defined bridge </strong>network can resolve each other using their names. But with default bridge network, you need to connect each other by using containers’ internal IP addresses or by using <strong>--link</strong> flag. Note that --link flag is a legacy feature in docker and it is better to avoid using it.</p><p>Unlike in user defined bridge networks, you need to stop a container and recreate it with different network options before removing that container from the default bridge network.</p><h3>Docker Compose</h3><p>Docker compose is a tool which allows to run multiple containers at once. All you need to do is creating a yaml file with all the services your application need. Furthermore, ports, volumes, networks can be specified in that docker compose file. By using <strong>docker compose up</strong> command, all the services/containers can be started.</p><p>There are 3 main versions of docker compose yaml file and there are some distinguished differences between them. For example, with version 2 onwards the containers/services should be mentioned under “<strong>services</strong>” section. Also, in version 1, we were able to use only the default bridge network but with version 2 onwards, docker by default creates a dedicated bridge network for the compose. Moreover, version 2 has a useful feature called “<strong>depends-on</strong>” which allows to specify if a container is depending on another container. This is really helpful when you need to start a container before a specific container.</p><p>The following image shows a sample docker compose file.</p><figure><img alt="References: https://github.com/compose-spec/compose-spec/blob/master/spec.md" src="https://cdn-images-1.medium.com/max/807/1*Fjzh7hJ-ERDzZqpyjAGmPA.png" /><figcaption><a href="https://github.com/compose-spec/compose-spec/blob/master/spec.md">https://github.com/compose-spec/compose-spec/blob/master/spec.md</a></figcaption></figure><p>In the above compose file, “frontend” and “backend” are two containers.</p><p>The naming convention of docker compose yaml file is to name it as “docker-compose” but you can use another name if you prefer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*YQWP8LDrTFLKGhh7vRp68w.png" /></figure><p>With <strong>docker compose down</strong> command, all the services will be terminated including the created network.</p><h3>Dockerizing your application.</h3><p>You can dockerize your application by simply creating an image. In order to create an image, first you need to create a Dockerfile. Upon successful creation of the image, you can push it to a docker registry and anyone can pull it and run containers in a docker host.</p><h4>Dockerfile</h4><p>Dockerfile is a script based instructions to create a docker image. It does not have a specific extension like other normal files. Just name it as “Dockerfile” and you have yourself a Dockerfile.</p><p>In a Dockerfile you need to specify all the commands that you would normally execute in command line when assembling an image.</p><p>As mentioned in the “Images” section of this article, an image is consists of layers. Each line in a Dockerfile corresponds to a layer in the image.</p><p>The following image shows a sample Dockerfile for an application written in Go Lang.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*MR0BGKQzx7CAFFw0_IjL5Q.png" /><figcaption><a href="https://docs.docker.com/language/golang/build-images/">https://docs.docker.com/language/golang/build-images/</a></figcaption></figure><p>Now let’s try to understand some common components in Dockerfiles.</p><ul><li><strong>FROM </strong>- specify the base image from which the image will be created</li><li><strong>WORKDIR</strong> - creates a directory inside the container and all the commands will be executed from there. (In the above Dockerfile, the name of that directory is “app”)</li><li><strong>COPY</strong> - copies specified files into the working directory</li><li><strong>RUN</strong> - runs a specific command</li><li><strong>CMD</strong> - specifies which command to run within the container</li></ul><p>The structure of the Dockerfile will be differ according to the language and the application. However, you can use the above information to create your own Dockerfile.</p><p>Check <a href="https://docs.docker.com/language/">this</a> to learn more about creating language specific Dockerfiles.</p><h4>Building an image</h4><p>Once you have a Dockerfile, you can create a docker image from it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*KFCAMvCghr4luym2ISiKmA.png" /></figure><p>NOTE: Both these commands use current directory as the build context (Specified by the “<strong>.</strong>”<strong> </strong>at the end.) thus they should be executed from the directory in which the Dockerfile exists.</p><p>If you need to push the image to a docker registry, the image name should be of a specific format. Check the below section for more details.</p><h4><strong>Pushing an image to a docker registry.</strong></h4><p>You can push your docker image to a public docker registry like docker hub or to a private registries like <a href="https://aws.amazon.com/ecr/">Amazon ECR</a>, <a href="https://cloud.google.com/container-registry">Google Container Registry</a>, <a href="https://azure.microsoft.com/en-us/services/container-registry/">Azure Container Registry</a>.</p><p>You need to prefix the image name with the<strong> name(id) of your docker registry account</strong>, to be able to push it to the registry. You can use this format to name your docker image when creating the image or else you can rename the image later.</p><p>In most docker registries, a sperate repository will be created for each image and all the versions (with different tags) of the image will be stored in the relevant repository.</p><p><strong>References</strong></p><p><a href="https://docs.docker.com/">https://docs.docker.com/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d14be3f981a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy a web app on Google App Engine.]]></title>
            <link>https://shenalijayakody.medium.com/deploy-a-web-app-on-google-app-engine-56ea479d909e?source=rss-cb4155af9a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/56ea479d909e</guid>
            <dc:creator><![CDATA[Shenali Jayakody]]></dc:creator>
            <pubDate>Sat, 29 May 2021 20:28:48 GMT</pubDate>
            <atom:updated>2021-05-29T20:40:57.552Z</atom:updated>
            <content:encoded><![CDATA[<h4>Step by step guide to deploy React application with python flask backend on GAE.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o8d8HDl9QUrpSab7dTsNKw.png" /></figure><p>In this post we will learn how to create a GCP (Google Cloud Provider) account and deploy a full-stack web application on Google App Engine.</p><h4><strong>What is Google App Engine?</strong></h4><p>GCP aka Google Cloud Provider is one of the top cloud provider services available in the field. Google App Engine (GAE) is a cloud computing platform offered by GCP. Simply, you can use Google App Engine to host your dynamic or static web applications. Google App Engine is used quite often due to its simplicity.</p><h4>Create a GCP account.</h4><p>Go to <a href="https://cloud.google.com/">https://cloud.google.com</a>/ and click on “Get Started for Free”. You will need to provide your credit card details in order to create an account. But the good news is you will be awarded $300 in free credits. This credit amount will be valid only for first 90 days. Even after that you will be charged only if you exceed amount of free resources provided. To learn more about pricing for GAE visit <a href="https://cloud.google.com/appengine/pricing">https://cloud.google.com/appengine/pricing</a>.</p><p>If you haven’t installed Google Cloud SDK, install and do necessary configurations as mentioned in <a href="https://cloud.google.com/sdk/docs/install">https://cloud.google.com/sdk/docs/install</a>.</p><h4>Create GCP project and GAE project.</h4><p>Now let’s create our first Google App Engine project.</p><p><em>For that you need to first create a GCP project.</em></p><p>Click on the project name showed inside the red box. This will show you a list of available projects and an option to create a new project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EtgZsMddy7GeCcTYDXkKCQ.png" /></figure><p>Create a new project or select an existing project from the window shown in the below image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*v1ODfane9qNpTbKIk8H7uA.jpeg" /></figure><p><em>Now let’s create an GAE project.</em></p><p>From the navigation menu on the left side of the page select <strong>App Engine </strong>listed under <strong>Compute </strong>section of the menu.</p><p>Click on <strong>Create Application </strong>on the middle of the page. Then select a region. Even though this is not much important note that the location you select will be permanent.</p><p>Do not select a language and an environment when prompted. This is because we are going to deal with separate languages and environments for frontend and backend.</p><blockquote><strong>NOTE: What are the environments in GAE?</strong></blockquote><blockquote>There are 2 different kinds of environments in GAE as<strong> standard environment</strong> and <strong>flexible environment</strong>. Depending on your requirements you can select the environment/s.</blockquote><blockquote>For more information visit <a href="https://cloud.google.com/appengine/docs/the-appengine-environments">https://cloud.google.com/appengine/docs/the-appengine-environments</a>.</blockquote><p><em>Enable billing for the project.</em></p><p>Go to <strong>Billing</strong> on the left navigation menu. For this you need to have a billing account. Click on <strong>Link a Billing Account. </strong>If you already have a billing account you will be able to add it straight away. Else you will need to create a billing account.</p><blockquote><strong>NOTE: Limit of projects in a free tier billing account</strong></blockquote><blockquote>Only 3 projects are allowed to enable billing if you are using free tier. You can check the projects with billing enabled. Go to <strong>Billing</strong> in the left navigation menu and navigate to <strong>Account Management </strong>in the bottom of Billing section. You can disable or change billing by clicking on the 3 dots in front of the each project listed.</blockquote><p><em>Now we need to enable </em><strong><em>Cloud Build API.</em></strong></p><p>For this you can use in-built terminal of GCP. Click on <strong>Activate Cloud Shell</strong> on the top right corner of the window (2nd icon from the left). This will open cloud shell at the bottom of the page. You can use this to run commands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5grUQmdrmO5-aUz8AQXruQ.png" /></figure><p>Use the below command to enable Cloud Build API.</p><blockquote><strong><em>gcloud services enable cloudbuild.googleapis.com</em></strong></blockquote><p><em>Now we are ready to upload our code into Google App Engine.</em></p><h4>What are we going to do?</h4><p>There are several ways to use GAE to deploy your application. In this section we will look into a very simple way of deploying.</p><p>We will have 2 services in our GAE project for frontend and backend. Backend will be deployed as the default service. If you want you can chose frontend as the default service.</p><blockquote><strong>NOTE: Services in GAE</strong></blockquote><blockquote>Every GAE project must have a <strong>default service. </strong>The first service you deploy will be default service. You can have additional services if needed. Visit <a href="https://cloud.google.com/appengine/docs/standard/nodejs/configuration-files">https://cloud.google.com/appengine/docs/standard/nodejs/configuration-files</a> to learn more about services.</blockquote><h4>Deploy python backend as the default service.</h4><p>You need to have 3 things in order to be able to deploy python application successfully.</p><ol><li>main.py file</li><li>requirements.txt file</li><li>yaml file</li></ol><p><strong>main.py </strong>is treated as the entry point for Python in GAE. If you have your main python file in another name, you might want to rename it. Make sure that <strong>requirements. txt</strong> file is available.</p><p>In yaml file you can configure GAE project settings. Simply create a file in the root folder of the application with the extension <strong>.yaml. </strong>You can name it anything you want but the convention is to use <em>app.yaml. </em>Let’s name it as <strong>backend.yaml.</strong></p><p>Basically, in this yaml file you need to have 2 elements. The first element is required while second one is optional.</p><ol><li><strong>runtime</strong>: specify python runtime environment to be used.</li><li><strong>service</strong>: specify the name of the service. The first service will be treated as the default service even if it is not specified in the yaml file.</li></ol><p>An example is shown in the following image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*fxRw7ZkN8YZbRKM4YvpwCA.jpeg" /></figure><p>Additionally, you might want to use different instance classes depending on the infrastructure(memory limit, CPU limit) needed by your application. This can be configured in the yaml file.</p><p>An example is given below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*-d3fUJzQb6teZsUgdozuPQ.jpeg" /></figure><blockquote>Learn more about instance classes: <a href="https://cloud.google.com/appengine/docs/standard#instance_classes">https://cloud.google.com/appengine/docs/standard#instance_classes</a></blockquote><blockquote>Learn more about other elements in yaml: <a href="https://cloud.google.com/appengine/docs/standard/python/config/appref">https://cloud.google.com/appengine/docs/standard/python/config/appref</a></blockquote><p>Use the below command in the terminal to upload source code into GAE. Use the name of your yaml file.</p><blockquote><strong><em>gcloud app deploy backend.yaml</em></strong></blockquote><p>If you named the yaml file as <strong>app.yaml </strong>you can just run “<strong>gcloud app</strong> <strong>deploy”</strong> without specifying the name of the file.</p><p>This can take some time depending on the size of your files.</p><p>You can use the provided URL or GCP console to view the hosted service. To access the URL using GCP console, go to <strong>Services </strong>in the left navigation menu. All the services of the GAE application will be listed there. You will be redirected to the hosted URL once you click on the specific service.</p><h4>Deploy React JS frontend as the frontend service.</h4><p>You need to have 2 things to be able to successfully deploy React JS frontend.</p><ol><li>build folder</li><li>yaml file</li></ol><p>Create the build folder by running <strong>npm run build. </strong>Then create a yaml file for configuration purposes. We will name this yaml file as <strong>frontend.yaml</strong>.</p><p>Add the following code to frontend.yaml file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*GN7bTjfBAwdMseHwpxeYVA.png" /></figure><p>Upload frontend service to GAE using below command.</p><blockquote><strong><em>gcloud app deploy frontend.yaml</em></strong></blockquote><p>In few minutes the source code will be uploaded and you can view the URL.</p><h4>How to connect backend and frontend?</h4><p>In the react application, point the base URL to the URL of backend of the GAE application (default service). You can use the methods mentioned earlier to find the URL.</p><p>Now you have a fully deployed web application. You can use frontend URL of the GAE application to access your web application.</p><blockquote><strong>NOTE: Additional notes to be considered when connecting backend and frontend.</strong></blockquote><blockquote>You might want to enable CORS.</blockquote><blockquote>You might want to Access-Control-Allow-Origin response header.</blockquote><p>You can find general information about your application by navigating to <strong>App</strong> <strong>Engine</strong> section on left navigation menu. Also you can find logs of your application from <strong>Logging</strong> section. This will be really helpful if you run into any errors or bugs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56ea479d909e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>