Building a Microservices solution using Docker,

Slides:



Advertisements
Similar presentations
Jan Peterson Microsoft Dynamics CRM Mobility Update - Productivity on the Go PRD24 1.
Advertisements

Pierre Sleep tight knowing you’re prepared for outages Protect your environment with Azure ARC32 4.
Cory Banks Beyond Deployment How IT Can Inspire, Motivate, and Drive Sustainable Adoption PRD32 5.
Jordan Knight Developing for the Microsoft Band MOB342.
Jessica Payne Microsoft Global Incident Response and Recovery
Luke Notley Migrating from AWS to Azure Seamlessly CLD32 1.
Andrew Hennessy Automating Server Application migrations to the Cloud – Goodbye Server INF21 3.
Kevin Francis Developing on Windows Devices ARC33 2.
Chris Hewitt Adding magic to your business with Perceptual Intelligence ARC323 B.
Matt McSpirit Software-defined Networking in Windows Server 2016 INF32 4.
Vakhtang Assatrian Asia Communications TSP Lead, Microsoft Architecture options for implementing Skype for Business PRD32 7.
Kevin Francis Azure Media Services Architecture Deep Dive CLD31 2.
Creating highly available and resilient Microservices on Microsoft Azure Service Fabric
Alessandro Cardoso, Microsoft MVP Creating your own “Private Cloud” with Windows 10 Hyper- V WIN443.
Michael Porfirio and Chris Gondek Beyond Backup The Next Generation Commvault Data Platform DAT22 5.
Jeff Alexander & Andrew McMurray Runtime Provisioning in Windows 10 WIN327.
Chris Hewitt, Wild Mouse Male, Age 42, Happy ARC31 2.
Michael Niehaus Using the Windows Store for Business: New Capabilities for Managing Apps in the Enterprise WIN335.
Mahesh Krishnan Architecting highly resilient applications on Azure ARC42 7.
Jessica Payne Microsoft Global Incident Response and Recovery
Dr Greg Low Working with SQL Server Spatial Data DAT33 3.
Mike James Building a cross-platform pedometer app with Xamarin & Azure MOB334.
Lars Klint Adaptive UX - A Single UI for Everything MOB234.
James Bannan Freddy vs JSON: Azure Resource Manager CLD44 3.
Warwick Rudd – Henry Rooney – How Available is SQL Server 2016? DAT33 6.
Pat Fetty – Principal PM Manager Securing your mobile assets with Microsoft Intune WIN33 1.
Mick Badran Using Microsoft Service Fabric to build your next Solution with zero downtime – Lvl 300 CLD32 5.
Nick Application Development for the Universal Windows Platform MOB225.
Matt McSpirit Understanding the Azure Stack INF33 2.
Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227.
Orin Thomas 30 Bad Habits of Server Administrators INF32 3.
Fai Lai Global IoT Tech Specialist, C+E Specialist Sales Seamless communication between devices and Azure IoT Hub via Azure IoT Protocol Gateway MOB31.
Orin EDP, EFS, BitLocker, RMS, DAC, and IPsec: Protect your files at rest and in transit. WIN341 A.
Basil Apostolou & Craig Pringle The why and how of hybrid cloud CLD22 3.
Ryan Newington From Fortran to FIM: Dragging your identity management system out of the dark ages WIN332 B.
Kevin Francis Big Building Blocks – a tour of Dynamics ARC323 A.
Joe Clancy Deployment Lifecycles and New Policy Features with the Azure Resource Manager ARC22 1.
Dr Greg Low Azure Datacamp Power Hour CLD21 3.
Marc Soester Project Visualization, Resource Management and Collaboration using Office 365 Project Online PRD32 6.
James Bannan The Cloud That Chuck Norris Built: Resilient Architecture in Azure ARC44 3.
Rick Claus Architect like a PRO for Performance and Availability of your Microsoft Azure VMs ARC43 6.
Jake Ginnivan Git for TFS Version Control developers DEV32 4.
Jhong Catane Exchange Hybrid Deployment PRD34 2.
A deep dive into Azure AD B2C
3 Ways to Integrate Business Systems to Partners
Serverless in Office 365 Build services with Azure Functions
Making of the Ignite Bot
Conversation As a Platform - Part 1
Building Business Application with Office 365 and Other Line Business Systems
Microsoft Ignite /19/2018 2:35 AM
Need for Speed: Why Applications With No Database and No Services are Fast ARC334 Nick Randolph – Built to Roam.
Building a Continuous Delivery Pipeline for ASP.NET Core Apps
Jenkins and Azure OPEN322 Michael Friedrich.
Darren Neimke and Jonathan Ruckert
Build vNext in VSO and TFS 2015
What’s new in Visual Studio in 2015?
Microsoft Ignite /19/ :53 AM Applying DevOps principals in applications integrated with Office 365 Evergreen Ben Parker ARC231B © 2015 Microsoft.
Rob Farley, LobsterPot Solutions
Application Insights:
Modern cloud PaaS for mobile apps, web sites, API's and business logic apps
Bare Metal Development for the Universal Windows Platform
The Power of a Great API Damian Brady
Deep Dive into Azure API Apps and Logic Apps
Jonathan Ruckert & Darren Neimke
UI test automation of MVC apps with Microsoft Edge WebDriver
Chris Henley & Ben DiQual
Empower your users with Azure Active Directory Premium
Securing ASP.NET in an Azure Environment
Presentation transcript:

Building a Microservices solution using Docker, Building a Microservices solution using Docker, .NET and Windows Server 2016 Richard Banks ARC334

Overview Architecture Implementation Deployment

Caveats As an industry we’re still learning and maturing. Most Microservice implementations aren’t pure… and that’s OK. Docker on Windows is still a work in progress.

The Microservices Pitch

SHINY! SHINY! SHINY! SHINY! SHINY! Shiny! Shiny! Shiny! Netflix!! Shiny! Shiny! Shiny! Shiny! Shiny! Shiny! Shiny!

OK. More seriously… More flexibility/scalability than with monolithic apps Small services are easier to understand Independently deployable components

A few more reasons? Sure! A failure in one component doesn’t wipe out the whole system. More readily and easily evolvable Tech stack flexibility A potential path for legacy system rebuilds/rewrites

The Reality

WTF! OMG! Gah! <update resume /> Wasn’t this meant to be easy?! I can’t tell how this fits together anymore! It’s more brittle now than it ever was! Performance is terrible!!

Why? Complexity of Distributed Systems Tendency to build a distributed “big ball of mud” How do we debug across multiple components? Eventual Consistency needs a paradigm shift

Other things to deal with Is your database server a single point of failure/perf bottleneck? Do we need to do 2 phase commits across services? What is the current “version” of the system? How do we do authentication and authorisation?

Architecture

Design Patterns & Components CQRS – [C]ommand [Q]uery [R]esponsibility [S]eparation Event Sourcing – Persist events, not state. Message Bus – Reliable, loosely coupled comms. using pub/sub Optimistic Concurrency – No locking anywhere

Design Patterns & Components Domain Driven Design – Align microservice to Domain Context NoSQL – Persistent cache for read models/queries API Gateway – encapsulate access to services, optimised for UI Versioning – APIs and Databases

Overall Approach UI Request (HTTP) API Gateway Domain MicroService(s) Commands & Queries API Gateway Commands Queries Domain MicroService(s) Read Model MicroService(s) Precomputed Results Event Sourcing Domain Events EventStore RabbitMQ Redis

Event Store Repository Request (HTTP) Domain Micro Service Web API Controller Command Command Handler Aggregate Command(s) Save New Events Event Store Repository Event Handler(s) Event(s) Event(s) Event Store Message Bus (publish)

Query Micro Service Query (HTTP) Web API Controller Read Model Persistence (aka View Store) Query Query Handler Split here when scaling beyond a single instance Updates Event Handler(s) Event(s) Message Bus (subscribe)

Specific software/libraries RabbitMQ + EasyNetQ EventStore Redis + StackExchange.Redis ASP .NET Web API

Implementation

The Micro-café Inspired by “Starbucks does not use two phase commit” http://www.enterpriseintegrationpatterns.com/docs/IEEE_Software_Design_2PC.pdf

What are the domain contexts?

Demo

Deployment & Docker

Docker Terminology Image – a read only template for a container. Not runnable. Container – a runnable instance of an image. Registry – a collection of Docker images

Learn to think in “containers” How do you currently update a web site? Containers are immutable infrastructure. You don’t upgrade container apps. You replace them.

But what about persistence? Option 1 – Use a clustered/HA database server. Option 2 – Use a distributed DB supporting live upgrade (Redis) Option 3 – Cloud database (e.g. SQLAzure, DocumentDB) Option 4 – Docker volumes** (persistent container storage) ** Volumes not yet available in Windows Containers

Demo Running EventStore in Docker

The Dev/Test/Prod Cycle No source code promotion. No binary promotion either. It’s all about image approval for each environment. You’ll probably want an image repository of your own.

Windows Server Containers 4/27/2017 11:14 AM Windows Server Containers Creation, deployment, and management Developers update, iterate, and deploy updated containers 2 3 Operations collaborates with developers to provide app metrics and insights Developers build and test apps in containers, using development environment i.e. Visual Studio Operations automates deployment and monitors deployed apps from central repository 1 2 Containers pushed to central repository © 2013 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.

Deployment concerns Docker Compose – sets of images/containers Docker Swarm – cluster multiple docker hosts Apache Mesos – docker host mega-clusters

Q&A Richard Banks - @rbanks54

Complete your session evaluation on My Ignite for your chance to win one of many daily prizes.

Continue your Ignite learning path Microsoft Ignite 2015 4/27/2017 11:14 AM Continue your Ignite learning path Visit Microsoft Virtual Academy for free online training visit https://www.microsoftvirtualacademy.com Visit Channel 9 to access a wide range of Microsoft training and event recordings https://channel9.msdn.com/ Head to the TechNet Eval Centre to download trials of the latest Microsoft products http://Microsoft.com/en-us/evalcenter/ © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.