BRK1036 Building applications with Microsoft Azure Service Fabric on Windows and Linux Subramanian Ramaswamy (Mani) Sean McKenna (@seanmckmsft)
Service Fabric sessions at Ignite 2016 Date/Time Location Design modern microservice applications on Microsoft Azure Service Fabric Thursday @ 2:15pm A302 Explore microservices solutions and Microsoft Azure Service Fabric Time travel required Watch on-demand Manage Microsoft Azure Service Fabric applications on the public and private cloud Friday @ 9am
Agenda Microservices 101 Service Fabric intro for developers Build 2015 9/10/2018 2:44 PM Agenda Microservices 101 Service Fabric intro for developers Building Service Fabric apps for Windows Building Service Fabric apps for Linux © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Microservices 101 Microsoft Ignite 2016 9/10/2018 2:44 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
The trouble with monoliths…
The trouble with monoliths… Tightly coupled components All components updated together Not agile, time to market suffers
The trouble with monoliths… Tightly coupled components All components updated together Not agile, time to market suffers
The trouble with monoliths… Tightly coupled components All components updated together Not agile, time to market suffers Scale by cloning entire apps All components scaled similarly expensive
The trouble with monoliths… Tightly coupled components All components updated together Not agile, time to market suffers Scale by cloning entire apps All components scaled similarly expensive
Microservices… Do one thing well Manage independent code and state Build 2015 9/10/2018 2:44 PM Microservices… Do one thing well Manage independent code and state Are generally developed by a small cross-functional team Are built with task-appropriate languages/frameworks © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Microservices… Are loosely coupled Do one thing well Build 2015 9/10/2018 2:44 PM Microservices… Do one thing well Manage independent code and state Are generally developed by a small cross-functional team Are built with task-appropriate languages/frameworks Are loosely coupled Communicate over well-defined interfaces/protocols Have unique names (URI) that can be resolved Are independently updated Are independently scaled © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Monolithic application Microservices application 9/10/2018 2:44 PM Monolithic application Microservices application App 1 App 1 App 2 Scales by deploying each service independently Scales by cloning the app on multiple machines © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Monolithic application Microservices application Microsoft Ignite 2016 9/10/2018 2:44 PM Monolithic application Microservices application Graph of interconnected services State typically scoped to the service Variety of technologies used State: Single monolithic database Tiers of specific technologies stateless services stateless services with separate stores stateful services stateless presentation services © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Goodness… Increase agility through componentization 9/10/2018 2:44 PM Goodness… Increase agility through componentization Simplify upgrades through independent versioning Maximize productivity through heterogenous technologies Improve hardware utilization through granular resource balancing Limit the impact of failures through isolation © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
However, devs now need to code for… Service discovery State management Service lifecycle management Health reporting Resource usage reporting
However, devs now need to code for… Service discovery State management Service lifecycle management Health reporting Resource usage reporting Wouldn’t it be nice to have a microservices platform that takes care of all this?
9/10/2018 Microsoft Azure Service Fabric A platform for reliable, hyperscale, microservice-based applications Microservices Service Fabric High Availability Hyper-Scale Hybrid Operations High Density Rolling Upgrades Stateful services Low Latency Fast startup & shutdown Container Orchestration & lifecycle management Replication & Failover Simple programming models Resource balancing Self-healing Data Partitioning Automated Rollback Health Monitoring Placement Constraints Private cloud Azure Other clouds © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Service Fabric intro for developers Microsoft Ignite 2016 9/10/2018 2:44 PM Service Fabric intro for developers © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Service Fabric Cluster Build 2015 9/10/2018 2:44 PM Node FD0/UD0 FD0/UD1 FD2/UD3 FD1/UD6 FD1/UD5 FD2/UD4 Service Fabric Cluster Machines stitched together Scales to 1000+ machines Laid out to limit impact of individual hardware failures Provides abstracted management endpoint © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Service type Composed of code/config/data packages Code packages define an entry point (dll or exe) Config packages define service specific config information Data packages define static resources (eg. images) Packages can be independently versioned <ServiceManifest Name="QueueService" Version="1.0"> <ServiceTypes> <StatefulServiceType ServiceTypeName="QueueServiceType" HasPersistedState="true" /> </ServiceTypes> <CodePackage Name="Code" Version="1.0"> <EntryPoint> <ExeHost> <Program>ServiceHost.exe</Program> </ExeHost> </EntryPoint> </CodePackage> <ConfigPackage Name="Config" Version="1.0" /> <DataPackage Name="Data" Version="1.0" /> </ServiceManifest> Service Type 1 Code Config Data
Application type Declarative template for creating an application Based on a set of service types Used for packaging, deployment, and versioning Application Type A Service Type 1 Service Type 2 Service Type 3 Code Config Data Code Config Data Code Config Data
Categories of services Build 2015 9/10/2018 2:44 PM Categories of services Guest executables and guest containers Deploy and manage arbitrary services written in any framework Stateless Services State persisted to external storage, such as Azure DBs Existing web (ASP.NET) and worker role applications Stateful Services Reliability of state through replication and local persistence Lowers latency Reduces complexity in traditional three tier architectures © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Service Fabric frameworks Build 2015 9/10/2018 2:44 PM Service Fabric frameworks Reliable Services Reliable Actors Simple API for service lifecycle events Pluggable communication model Familiar data structures for reliably storing state: dictionary and queue Independent unit of state and compute (large number in parallel) Prescriptive communication model based on async messaging Automatic state management and turn based concurrency For more details, please see: Design modern microservice applications on Microsoft Azure Service Fabric Jeffrey Richter and Vaclav Turecek Thursday @ 2:15pm A302 © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Demo: Building Service Fabric apps for Windows with Visual Studio Microsoft Ignite 2016 9/10/2018 2:44 PM Demo: Building Service Fabric apps for Windows with Visual Studio © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Service Fabric on Linux Microsoft Ignite 2016 9/10/2018 2:44 PM Service Fabric on Linux © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Service Fabric on Linux: Principles Don’t change what’s unnecessary Runtime behavior & concepts remain the same, same portal experience, SFX Change what’s necessary Provide a dev experience tuned for Linux Azure CLI, Eclipse, Yeoman, Jenkins, apt-get install, LTTng for tracing… One-box on Mac and on Linux Java, C# integrated as first class languages Support orchestrating containers
Demo: Building Service Fabric apps for Linux Microsoft Ignite 2016 9/10/2018 2:44 PM Demo: Building Service Fabric apps for Linux © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Build 2015 9/10/2018 2:44 PM Recap The microservices pattern offers agility, flexibility, and efficient use of resources Service Fabric makes it is easy to develop microservice-based apps Target Windows or Linux, your developer experience is natural Linux and Java/.NET Core APIs and are now available in preview © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
People are asking about… Build 2015 9/10/2018 2:44 PM People are asking about… Java and .NET Core APIs on Windows Windows containers Windows Server Nano Splitting services across VS solutions and repos Programming model support for other languages Cloud Services migration Other Linux distros © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Resources Learn from samples and complete solutions Download the Service Fabric SDK & build applications http://aka.ms/servicefabricsdk Learn from samples and complete solutions http://aka.ms/servicefabricsamples Learn from the tutorials and videos http://aka.ms/servicefabricdocs http://aka.ms/servicefabriccourse Deploy samples out for free on Azure http://aka.ms/tryservicefabric Create Production Cluster http://aka.ms/sfportal
Service Fabric sessions at Ignite 2016 Date/Time Location Design modern microservice applications on Microsoft Azure Service Fabric Thursday @ 2:15pm A302 Explore microservices solutions and Microsoft Azure Service Fabric Time travel required Watch on-demand Manage Microsoft Azure Service Fabric applications on the public and private cloud Friday @ 9am
Thank you! Subramanian Ramaswamy Sean McKenna (@seanmckmsft)
Free IT Pro resources To advance your career in cloud technology Microsoft Ignite 2016 9/10/2018 2:44 PM Free IT Pro resources To advance your career in cloud technology Plan your career path Microsoft IT Pro Career Center www.microsoft.com/itprocareercenter Cloud role mapping Expert advice on skills needed Self-paced curriculum by cloud role $300 Azure credits and extended trials Pluralsight 3 month subscription (10 courses) Phone support incident Weekly short videos and insights from Microsoft’s leaders and engineers Connect with community of peers and Microsoft experts Get started with Azure Microsoft IT Pro Cloud Essentials www.microsoft.com/itprocloudessentials Demos and how-to videos Microsoft Mechanics www.microsoft.com/mechanics Connect with peers and experts Microsoft Tech Community https://techcommunity.microsoft.com © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Free IT Pro resources To advance your career in cloud technology Microsoft Ignite 2016 9/10/2018 2:44 PM Free IT Pro resources To advance your career in cloud technology Plan your career path IT Pro Career Center http://www.microsoft.com/itprocareercenter Get started with Azure IT Pro Cloud Essentials https://www.microsoft.com/itprocloudessentials Demos and how-to videos Microsoft Mechanics https://www.microsoft.com/mechanics Connect with peers and experts Ask questions, get answers, exchange ideas https://techcommunity.microsoft.com Azure Solutions Get started with Azure Solutions today http://azure.com/solutions Azure monthly webinar series Join live or watch on-demand http://aka.ms/AzureMonthlyWebinar © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Please evaluate this session 9/10/2018 2:44 PM Please evaluate this session Your feedback is important to us! From your PC or Tablet visit MyIgnite at http://myignite.microsoft.com From your phone download and use the Ignite Mobile App by scanning the QR code above or visiting https://aka.ms/ignite.mobileapp © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.