<?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 Sarindu Udagepala on Medium]]></title>
        <description><![CDATA[Stories by Sarindu Udagepala on Medium]]></description>
        <link>https://medium.com/@sarinduudagepala?source=rss-a0d7e3447ee------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*2BuAcwRoQwnZmdvp5Y7BeA.jpeg</url>
            <title>Stories by Sarindu Udagepala on Medium</title>
            <link>https://medium.com/@sarinduudagepala?source=rss-a0d7e3447ee------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 16:04:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sarinduudagepala/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[Angular: End to End Testing With Protractor]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/swlh/angular-end-to-end-testing-with-protractor-55897de591be?source=rss-a0d7e3447ee------2"><img src="https://cdn-images-1.medium.com/max/1350/1*gycPX4JQSOwK-zzLLzQbgA.jpeg" width="1350"></a></p><p class="medium-feed-snippet">Testing an Angular Application&#x2019;s Workflow From Beginning to End</p><p class="medium-feed-link"><a href="https://medium.com/swlh/angular-end-to-end-testing-with-protractor-55897de591be?source=rss-a0d7e3447ee------2">Continue reading on The Startup »</a></p></div>]]></description>
            <link>https://medium.com/swlh/angular-end-to-end-testing-with-protractor-55897de591be?source=rss-a0d7e3447ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/55897de591be</guid>
            <category><![CDATA[e2e-testing]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[protractor]]></category>
            <dc:creator><![CDATA[Sarindu Udagepala]]></dc:creator>
            <pubDate>Sat, 06 Jun 2020 14:39:45 GMT</pubDate>
            <atom:updated>2020-06-06T22:40:48.465Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Spring Cloud: Zuul API Gateway]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://levelup.gitconnected.com/spring-cloud-zuul-api-gateway-dffa5933d570?source=rss-a0d7e3447ee------2"><img src="https://cdn-images-1.medium.com/max/2600/1*k9F7tcE3FdqaHvEFKyfc1w.jpeg" width="2880"></a></p><p class="medium-feed-snippet">Front Door to Microservices Ecosystem</p><p class="medium-feed-link"><a href="https://levelup.gitconnected.com/spring-cloud-zuul-api-gateway-dffa5933d570?source=rss-a0d7e3447ee------2">Continue reading on Level Up Coding »</a></p></div>]]></description>
            <link>https://levelup.gitconnected.com/spring-cloud-zuul-api-gateway-dffa5933d570?source=rss-a0d7e3447ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/dffa5933d570</guid>
            <category><![CDATA[proxy]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[zuul]]></category>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Sarindu Udagepala]]></dc:creator>
            <pubDate>Fri, 08 May 2020 09:56:28 GMT</pubDate>
            <atom:updated>2020-05-08T12:57:44.131Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Angular: State Management with Akita]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/swlh/angular-state-management-with-akita-b4c5439c1ab5?source=rss-a0d7e3447ee------2"><img src="https://cdn-images-1.medium.com/max/960/1*C3aznPxrQywClya3RTWKSg.png" width="960"></a></p><p class="medium-feed-snippet">Understand the Fundamentals of Akita and Build a CRUD Application</p><p class="medium-feed-link"><a href="https://medium.com/swlh/angular-state-management-with-akita-b4c5439c1ab5?source=rss-a0d7e3447ee------2">Continue reading on The Startup »</a></p></div>]]></description>
            <link>https://medium.com/swlh/angular-state-management-with-akita-b4c5439c1ab5?source=rss-a0d7e3447ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4c5439c1ab5</guid>
            <category><![CDATA[akita]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Sarindu Udagepala]]></dc:creator>
            <pubDate>Fri, 01 May 2020 15:58:25 GMT</pubDate>
            <atom:updated>2020-05-02T11:37:17.397Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Angular: A Detailed Introduction State Management With NGXS]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/better-programming/angular-state-management-with-ngxs-8b17719def29?source=rss-a0d7e3447ee------2"><img src="https://cdn-images-1.medium.com/max/896/1*eXtorLrcgvH99ZwcldxFhQ.png" width="896"></a></p><p class="medium-feed-snippet">Understand the fundamentals of NGXS and build a sample CRUD application</p><p class="medium-feed-link"><a href="https://medium.com/better-programming/angular-state-management-with-ngxs-8b17719def29?source=rss-a0d7e3447ee------2">Continue reading on Better Programming »</a></p></div>]]></description>
            <link>https://medium.com/better-programming/angular-state-management-with-ngxs-8b17719def29?source=rss-a0d7e3447ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b17719def29</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[angularjs]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Sarindu Udagepala]]></dc:creator>
            <pubDate>Sun, 26 Apr 2020 16:48:06 GMT</pubDate>
            <atom:updated>2020-04-28T12:32:33.023Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Get Started with Docker]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@sarinduudagepala/get-started-with-docker-f20380bcb40b?source=rss-a0d7e3447ee------2"><img src="https://cdn-images-1.medium.com/max/1920/1*uvBIO_Od_wv8_xURTddCDg.jpeg" width="1920"></a></p><p class="medium-feed-snippet">You want to dive into the world of containers? This piece is for you!</p><p class="medium-feed-link"><a href="https://medium.com/@sarinduudagepala/get-started-with-docker-f20380bcb40b?source=rss-a0d7e3447ee------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@sarinduudagepala/get-started-with-docker-f20380bcb40b?source=rss-a0d7e3447ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/f20380bcb40b</guid>
            <category><![CDATA[docker-image]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Sarindu Udagepala]]></dc:creator>
            <pubDate>Sat, 18 Apr 2020 11:07:55 GMT</pubDate>
            <atom:updated>2020-04-18T20:59:14.368Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Spring Cloud: High Availability for Eureka]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/swlh/spring-cloud-high-availability-for-eureka-b5b7abcefb32?source=rss-a0d7e3447ee------2"><img src="https://cdn-images-1.medium.com/max/700/1*3tLjWTt34EMoc8JXgrVgWw.jpeg" width="700"></a></p><p class="medium-feed-snippet">Setup a Resilient Eureka Server Cluster</p><p class="medium-feed-link"><a href="https://medium.com/swlh/spring-cloud-high-availability-for-eureka-b5b7abcefb32?source=rss-a0d7e3447ee------2">Continue reading on The Startup »</a></p></div>]]></description>
            <link>https://medium.com/swlh/spring-cloud-high-availability-for-eureka-b5b7abcefb32?source=rss-a0d7e3447ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5b7abcefb32</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[spring-cloud]]></category>
            <category><![CDATA[eureka]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Sarindu Udagepala]]></dc:creator>
            <pubDate>Mon, 17 Feb 2020 16:52:45 GMT</pubDate>
            <atom:updated>2020-02-18T06:25:13.479Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Spring Cloud: Service Discovery With Eureka]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/swlh/spring-cloud-service-discovery-with-eureka-16f32068e5c7?source=rss-a0d7e3447ee------2"><img src="https://cdn-images-1.medium.com/max/720/1*ezncYlzmcrtMxL1a6UTavA.jpeg" width="720"></a></p><p class="medium-feed-snippet">Learn the fundamentals of Service Discovery and Spring Cloud Eureka with code examples.</p><p class="medium-feed-link"><a href="https://medium.com/swlh/spring-cloud-service-discovery-with-eureka-16f32068e5c7?source=rss-a0d7e3447ee------2">Continue reading on The Startup »</a></p></div>]]></description>
            <link>https://medium.com/swlh/spring-cloud-service-discovery-with-eureka-16f32068e5c7?source=rss-a0d7e3447ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/16f32068e5c7</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[spring-cloud]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[Sarindu Udagepala]]></dc:creator>
            <pubDate>Sun, 09 Feb 2020 15:14:44 GMT</pubDate>
            <atom:updated>2020-02-10T08:36:25.526Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Angular: Build a CRUD Application With NgRx]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/better-programming/angular-building-a-crud-application-with-ngrx-40e5f1c0b50c?source=rss-a0d7e3447ee------2"><img src="https://cdn-images-1.medium.com/max/850/1*So2U6wNF0unSYpr0dNuzTg.png" width="850"></a></p><p class="medium-feed-snippet">Build a simple course management system in Angular</p><p class="medium-feed-link"><a href="https://medium.com/better-programming/angular-building-a-crud-application-with-ngrx-40e5f1c0b50c?source=rss-a0d7e3447ee------2">Continue reading on Better Programming »</a></p></div>]]></description>
            <link>https://medium.com/better-programming/angular-building-a-crud-application-with-ngrx-40e5f1c0b50c?source=rss-a0d7e3447ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/40e5f1c0b50c</guid>
            <category><![CDATA[ngrx]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Sarindu Udagepala]]></dc:creator>
            <pubDate>Tue, 21 Jan 2020 11:43:27 GMT</pubDate>
            <atom:updated>2020-01-22T01:20:17.500Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Angular: Get Started With NgRx]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/better-programming/angular-getting-started-with-ngrx-75b9139c23eb?source=rss-a0d7e3447ee------2"><img src="https://cdn-images-1.medium.com/max/808/1*Te6AUmIkPJQUnZ03GYvN3A.png" width="808"></a></p><p class="medium-feed-snippet">The fundamentals of NgRx, with code examples</p><p class="medium-feed-link"><a href="https://medium.com/better-programming/angular-getting-started-with-ngrx-75b9139c23eb?source=rss-a0d7e3447ee------2">Continue reading on Better Programming »</a></p></div>]]></description>
            <link>https://medium.com/better-programming/angular-getting-started-with-ngrx-75b9139c23eb?source=rss-a0d7e3447ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/75b9139c23eb</guid>
            <category><![CDATA[rxjs]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Sarindu Udagepala]]></dc:creator>
            <pubDate>Tue, 07 Jan 2020 17:19:15 GMT</pubDate>
            <atom:updated>2020-01-10T21:21:06.782Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Integrating Netflix Karyon Applications with Eureka]]></title>
            <link>https://medium.com/@sarinduudagepala/integrating-netflix-karyon-applications-with-eureka-adcf7520bc56?source=rss-a0d7e3447ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/adcf7520bc56</guid>
            <category><![CDATA[netflixoss]]></category>
            <category><![CDATA[service-discovery]]></category>
            <category><![CDATA[eureka]]></category>
            <category><![CDATA[karyon]]></category>
            <dc:creator><![CDATA[Sarindu Udagepala]]></dc:creator>
            <pubDate>Mon, 12 Aug 2019 13:39:15 GMT</pubDate>
            <atom:updated>2019-08-12T13:39:15.127Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*jbqxN_3Xs1n75BEnxLP_Zg.jpeg" /></figure><p><strong>Introduction</strong></p><p>The purpose of this article is to give you an idea about how Netflix Eureka works. The key thing to note is that I will be using the original <a href="https://github.com/Netflix/eureka">Netflix Eureka</a> implementation instead of Spring Cloud Eureka. Below mentioned items will be covered in this write up.</p><ul><li>Introduction to Netflix Eureka</li><li>Setting up Eureka Server</li><li>Building a Karyon application that acts as a Eureka client.</li></ul><p><strong>Service Discovery at a Glance.</strong></p><p>Imagine a scenario in which one REST service (Service A) is trying to invoke another REST service (Service B). In order to make a request, Service A needs to know the network location (IP address and port) of Service B. In a conventional SOA (Service Oriented Architecture) ecosystem, services’ network locations would hardly change, as they are deployed in on-premise data centers. Consequently, you can afford to maintain the network locations of services in configuration files, which will be updated occasionally. For example, Service A can maintain the IP address and port of Service B in a configuration file and use those values when making a request.</p><p>However, this approach is nearly impossible in a cloud based microservice application, as service instances have dynamically assigned network locations. In addition, due to its basic features such as auto scaling, servers just come and go in cloud. Each time a service is started in a new instance, its network location changes. This raises the need to have a more sophisticated mechanism for one service to discover the network location of another service at a certain point in time. The concept of service discovery was introduced as a result. Some of the very popular service discovery tools presently available are Consul, Apache Zookeeper and Netflix Eureka.</p><p><strong>What is Eureka?</strong></p><p>Eureka is a REST based service which is primarily used for acquiring information about services that you would want to communicate with. This REST service is also known as <strong>Eureka Server</strong>. The Services that register in Eureka Server to obtain information about each other are called <strong>Eureka Clients</strong>. Following diagram illustrates how Eureka clients and server fit in together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*75aBVjVGAckPRgt3-ySdgA.png" /></figure><p>As the above diagram indicates, Service A and Service B are registered in Eureka server. If any of the these two services want communicate with the other service, it can obtain the target IP address and the port via the Eureka server.</p><p><strong>Eureka Client Server Communication</strong></p><p>By default, Eureka clients use Jersey and Jackson along with JSON payload to communicate with Eureka Server .There are four major types of communication between the Eureka server and clients. They are as follows.</p><ul><li>Register: Eureka client registers the information about the running instance to the Eureka server.</li><li>Renew: Eureka client needs to renew the lease by sending heartbeats every 30 seconds. The renewal informs the Eureka server that the instance is still alive.<br><strong>Special Note: </strong>Eureka server doesn’t poll service instances (client) to find out their availability. Instead, clients send a heartbeat to Eureka server to inform their availability.</li><li>Fetch Registry: Eureka clients fetches the registry information from the server and caches it locally. After that, the clients use that information to find other services.</li><li>Cancel: Eureka client sends a cancel request to Eureka server on shutdown. This removes the instance from the server’s instance registry thereby effectively taking the instance out of traffic.</li></ul><p><strong>Building Eureka Server and Deploying in Tomcat</strong></p><p><strong>Step 1</strong>: Get Eureka source code from Github.</p><pre>git clone https://github.com/Netflix/eureka.git</pre><p><strong>Step 2</strong>: Build the Eureka Server by executing the following Gradle command in the directory where you pulled your sources.</p><pre>./gradlew clean build</pre><p><strong>Step 3</strong>: You can find the Eureka Server WAR file at below location.</p><pre>&lt;EUREKA_SOURCE_HOME&gt;/eureka-server/build/libs/eureka-server-XXX.war</pre><p><strong>Step 4</strong>: Rename this WAR file as “eureka.war”.</p><p><strong>Step 5</strong>: Copy this WAR file to the Tomcat “webapps” directory and start Tomcat.</p><p><strong>Step 6</strong>: Assuming that you haven’t changed the Tomcat default port, access the Eureka Server UI with below URL.</p><pre>http://localhost:8080/eureka</pre><p>Eureka UI will be loaded as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KkLNqrcDVtK7cX1FUB9aLA.png" /></figure><p><strong>How to Make a Karyon Application a Eureka Client</strong></p><p>I will be using Gradle as the build tool and Eclipse as the IDE to implement the Eureka client.</p><ol><li>To begin with, create a Gradle project in Eclipse with below folder structure.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/296/1*bLL6nPzFVSYaY7ipAfWnJQ.png" /></figure><p>2. Modify the “build.gradle” file with below content.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cc57aaaef912697058cf51f777e42f11/href">https://medium.com/media/cc57aaaef912697058cf51f777e42f11/href</a></iframe><p><strong>Special Note: </strong>Eureka dependency is included in the dependency list to add the Eureka support.</p><p>3. Create a new class with name “BootstrapInjectionModule” inside the “com.pingpong.module” package and add the below content.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ccb2a7dd46788b782fa0ae4f18fad07f/href">https://medium.com/media/ccb2a7dd46788b782fa0ae4f18fad07f/href</a></iframe><p><strong>Special Note: </strong>Key thing to note is that, “ KaryonEurekaModule.class” has been added to the modules list. Inclusion of this module will cause Karyon to create all the required dependencies to make this application an Eureka client.</p><p>4. Create a new resource class with name “PingPongResource” inside “com.pingpong.resource” package and add the below content.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/209fffa55112e1d410558d1a27c3e0c0/href">https://medium.com/media/209fffa55112e1d410558d1a27c3e0c0/href</a></iframe><p>5. Create a properties file with name “pingpong-service.properties” inside “src/main/resources” folder and add the below content.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/adab93bd949b4ef238c46174d2b0e3fe/href">https://medium.com/media/adab93bd949b4ef238c46174d2b0e3fe/href</a></iframe><p>6. Create a properties file with name “eureka-client.properties” inside “src/main/resources” folder and add the below content.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8a7d634aeead984143377f9ca28e257d/href">https://medium.com/media/8a7d634aeead984143377f9ca28e257d/href</a></iframe><p><strong>Special Notes: </strong>Following two properties are the most important ones that you have to take note. Rest of the properties are related to the AWS deployment of Eureka.</p><ul><li>eureka.name: Service will be registered in Eureka Server with this name.</li><li>eureka.serviceUrl.default: Eureka Server location will be indicated by this property.</li></ul><p>7. Running the application: Before running the application, make sure that you have started the Eureka server (If not, please follow the steps given under “<strong>Building Eureka Server and Deploying in Tomcat</strong>” to start Eureka server). Application can be run by executing the below Gradle command in command line.</p><pre>gradle runSamplePingPongApplication</pre><p>8. Testing Eureka registration:</p><p>Access the below URL from the browser, and you should be able to see “ping-pong” service registered in Eureka.</p><pre>http://localhost:8080/eureka</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vkfe7T2ujA53me1GPE0haA.png" /></figure><p>That’s it! As the above picture indicates, “PINGPONG-SERVICE” is listed under the registered applications in Eureka.</p><p>9. Testing the application:<strong> </strong>Our prime focus of this whole exercise was to build a Eureka client. However, we built a REST service along the process. If you are interested, you can test this service by sending a GET request to below endpoint.</p><pre><a href="http://localhost:8888/ping">http://localhost:8888/ping</a></pre><p>Expected Response:</p><pre>{<br> “Response”: “Pong”<br>}</pre><p><strong>Conclusion</strong></p><p>Right, we are almost at the end of this article. I hope you got an idea about how Netflix Eureka works and the importance of it. You can find the complete source code of this application <a href="https://github.com/sarindufit/karyon-eureka-integration">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=adcf7520bc56" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>