<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Prakash Pattisapu</title>
    <description>The latest articles on DEV Community by Prakash Pattisapu (@prakash).</description>
    <link>https://dev.to/prakash</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F265831%2F553fda4c-5633-4cca-be39-d0e02faed991.png</url>
      <title>DEV Community: Prakash Pattisapu</title>
      <link>https://dev.to/prakash</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prakash"/>
    <language>en</language>
    <item>
      <title>Docker Containers - Yes, No, Maybe?</title>
      <dc:creator>Prakash Pattisapu</dc:creator>
      <pubDate>Fri, 03 Apr 2020 00:10:20 +0000</pubDate>
      <link>https://dev.to/prakash/docker-containers-yes-no-maybe-4gnb</link>
      <guid>https://dev.to/prakash/docker-containers-yes-no-maybe-4gnb</guid>
      <description>&lt;p&gt;I've been working on a personal mobile project since the past year or so. This requires a highly scalable and real time back-end platform. I spoke to some industry colleagues on the high level architecture before I got started in early 2019 and some said "Containers" and some said "Serverless". Granted, coming from the Windows world, I've not worked with Container technologies before [btw, Windows Server Core 2016 and Nano Server both have excellent Container Support now].&lt;/p&gt;

&lt;p&gt;I've been working on large scale global distributed Micro-Service systems since the past 5 years or so with the all the following benefits on the Service Fabric Platform.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uG7_J1Gh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bslvdouom7mlz0jmirfv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uG7_J1Gh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bslvdouom7mlz0jmirfv.png" alt="Service Fabric Features"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Of course, Service Fabric supports "Containers" too but, I never got around to using them and just used Service Fabric the way it was originally designed for. Orchestrating "Processes" on a massive scale with the goodness of &lt;strong&gt;Reliable Programming Services&lt;/strong&gt; and native support for &lt;strong&gt;Stateful Services&lt;/strong&gt; and end-to-end DevOps using &lt;strong&gt;Azure DevOps Server&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sticking to "Process" orchestration allowed me to architect systems that are much simpler, more cost effective, easily maintainable without sacrificing any benefits of "Containerization" and most importantly gave the best bang for the buck for my employer.&lt;/p&gt;

&lt;p&gt;Containers gives you Process Isolation, Consistent Environment, Run Anywhere. If we apply the same principles to Service Fabric orchestrated environment [Process based], it ticks all the boxes.&lt;/p&gt;

&lt;p&gt;We can rely on O/S provided default process isolation + .Net based App Domains to achieve process isolation. [Granted, .Net core does not have App domains but, I am still ok with O/S provided process isolation]&lt;br&gt;
Service Fabric packages your Code + Config + Data [for Stateful services] and deploys to "n" number of replicas across your cluster.&lt;br&gt;
It runs any where from your laptop to the most massive data centers.&lt;br&gt;
We can impose resource governance limits on each individual process. [ex: 50% of memory and 25% CPU for a specific process, placement constraints limiting certain processes to certain "node types" etc]&lt;br&gt;
"Processes" provide the best activation times and are the leanest compared to VM's and Containers [On both bare metal and VM's]&lt;br&gt;
Saves time and money not having to deal with container technology and Orchestration.&lt;br&gt;
I would say "Containers" makes sense in the following scenarios:&lt;/p&gt;

&lt;p&gt;If you are developing global multi tenant applications where each tenant should be running on a different isolated environment, config, runtime and package dependencies, it makes absolute sense to go for "Containers". [ex: Building your own Cloud like Aws/Azure/GCP]. Update: Server 2019 and Nano Server support Hyper-V containers which work great with "Hostile Multi-Tenant" scenarios.&lt;br&gt;
Lift and Shift: The app currently works, need to make it portable without re-writing it, containers makes sense.&lt;br&gt;
For Enterprise LOB microservice applications, Global Scale Distributed Systems, AI/ML workloads, IoT Edge computing scenarios and Web Hosting, consider a Process Orchestrator like Service Fabric before jumping into Containers.&lt;/p&gt;

&lt;p&gt;Please let me know your thoughts in the "comments" below..&lt;/p&gt;

&lt;p&gt;PS: As expected, I did not go with Containers for my mobile project. That's a topic for another article :)&lt;/p&gt;

</description>
      <category>containers</category>
      <category>servicefabric</category>
      <category>docker</category>
      <category>microservices</category>
    </item>
    <item>
      <title>The case for Azure Service Fabric.</title>
      <dc:creator>Prakash Pattisapu</dc:creator>
      <pubDate>Wed, 11 Dec 2019 03:41:24 +0000</pubDate>
      <link>https://dev.to/prakash/the-case-for-azure-service-fabric-cm9</link>
      <guid>https://dev.to/prakash/the-case-for-azure-service-fabric-cm9</guid>
      <description>&lt;p&gt;The world is currently going towards Containers and everybody's favorite Container Orchestrator is Kubernetes aka K8s.&lt;br&gt;
This article shows that K8's is not the only framework for building Distributed apps, especially on Windows Server and how Service Fabric also has a few advantages over Kubernetes!&lt;/p&gt;

&lt;p&gt;Before we get started, Service Fabric gives all of these benefits out of the box.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0tLdzceT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/6mwso32c2dqhznbg31jo.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0tLdzceT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/6mwso32c2dqhznbg31jo.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Service Fabric can be installed on your laptop to hundreds (and thousands) of machines spanning multiple locations on the planet. The run time and SDK are free and can be enabled via "Azure Development workload" in Visual Studio Installer.&lt;/p&gt;

&lt;h1&gt;
  
  
  Steps
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Enable "Azure Development workload" via the Visual Studio installer&lt;/li&gt;
&lt;li&gt;Install Service SDK from &lt;a href="https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started"&gt;https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;If you need to deploy containers, you need to install Docker.&lt;/li&gt;
&lt;li&gt;Open Visual Studio, create your first service fabric application&lt;/li&gt;
&lt;li&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tGzUFMOU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xeva8f5ecm6zsbjlk68y.PNG" alt="Alt Text"&gt;&lt;/li&gt;
&lt;li&gt;Choose the "Project Type" you want to start with. You can have a "Stateful Service", "Stateless Service", "Actor Service", ASP.Net Core [Both Stateful and Stateless] &amp;amp; Container Hosted Project.&lt;/li&gt;
&lt;li&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3AlmXNYI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/qwe79xqssdxhpqz1sl2z.PNG" alt="Alt Text"&gt;&lt;/li&gt;
&lt;li&gt;After choosing your first project type, enter your " project name" and click "Next". Below you can see that I've created a "Stateful" service called "ProductService"&lt;/li&gt;
&lt;li&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TsI11amP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/0go601io3r5e95ht6viq.PNG" alt="Alt Text"&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Post Installation of SDK
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;After the SDK is installed, you will see a service fabric icon in the system tray.&lt;/li&gt;
&lt;li&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--or85Uc44--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/as4fcdt4x07apyav7pgn.PNG" alt="Alt Text"&gt;&lt;/li&gt;
&lt;li&gt;You have the option of creating a "5 node" or "1 node" local cluster. "1 Node" is better for faster deployments. "5 node" more closely mimics a production cluster.

&lt;ul&gt;
&lt;li&gt;You can manage the local service fabric dev cluster using the local service fabric explorer. [default URL: &lt;a href="http://localhost:19080/"&gt;http://localhost:19080/&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--x1AnMU2Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/agk8gr7cx0r6wrmdm1mm.PNG" alt="Alt Text"&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Anatomy of a Service Fabric Application
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Our Service Fabric Application name is "Dev_To_SF".&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The project "Dev_To_SF.csproj" is the Service Project "glue" project that holds references to &lt;em&gt;all&lt;/em&gt; other fabric projects. The job of dev_To_SF.csproj is to...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Define the "ApplicationManifest.xml", "AplicationParameters" and "PublishProfiles" file. ApplicationManifest file lists the service types, partition types [for stateful services], Package Reference names, Package Version Numbers and Default App parameters&lt;/li&gt;
&lt;li&gt;"ApplicationParameters" folder houses the "params" that are to be passed when the Application is being constructed in Service Fabric. [You may have different set of params based on Dev/UAT/Prod environments]&lt;/li&gt;
&lt;li&gt;Publish Profiles folder defines the profile to be used when deploying to a particular envt.&lt;/li&gt;
&lt;li&gt;The scripts folder contains a Powershell script that is invoked when deploying from Visual Studio. For localhost deployments this is fine. For CI/CD, you would want to use Azure DevOps Server/Jenkins etc as your build tool for automated deployments.&lt;/li&gt;
&lt;li&gt;The "Default Services" section in ApplicationManifest defines what services to be installed by default in your cluster. If you want fine grained control, you can omit this section and deploy your app using Powershell commands. This approach gives you total flexibility on what "services types" to create under your application.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Anatomy of a Microservice inside a Service Fabric Application
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;"Product Service" is a Stateful service. The entry point for this service is inside "Program.cs" in ProductService. This entry point resembles a console application because it is! It uses service fabric specific API's to to register "ProductService" with the fabric runtime. &lt;/li&gt;
&lt;li&gt;Each service also has a "ServiceManifest" file that describes http/tcp end points names, service versions etc and Settings file that defines any service specific params.&lt;/li&gt;
&lt;li&gt;The stateful Product service class inherits "StatefulService" class. This gives us accesss to the "StateManager" instance which is responsible for propagating the app state to the "Primary" and "Secondary" replicas.&lt;/li&gt;
&lt;li&gt;The internal" StateManager" gives access to a "Key-Value" store which models a regular .Net Dictionary but which is different and built for the cloud. &lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Coming Next..
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;In the next article, we will look @ deployment to local cluster, Stateful Services and a little bit more on Reliable Dictionaries.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I mentioned in the beginning of the article that Service Fabric has some advantages over Kubernetes.. here they are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Service Fabric orchestrates both Processes and Containers. Kubernetes is strictly a "Container" Orchestrator. The barrier to entry into Service Fabric is lower. Process Orchestration has the fastest activation times.&lt;/li&gt;
&lt;li&gt;Service Fabric provides a reliable services programming model on top of the core "Orchestrator". This programming is what gives us reliable services, actor model, queues etc.&lt;/li&gt;
&lt;li&gt;Equal support to windows and linux containers. Kubernetes services are linux first. If your primary deployment target is windows server, you will be slightly behind in terms of features.&lt;/li&gt;
&lt;li&gt;Learning curve: There are many tools and add-ons available in the kubernetes world. On the service fabric side, The default installer will give all you need to develop your first micro service app and deploy it. I believe developing and deploying to service fabric cluster is easier compared to Kubernetes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Side Note: We got a 50% performance boost moving our windows service workload to a 10 node service fabric cluster on similar hardware! [On-Premises]  &lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
