Upload
alex-thissen
View
48
Download
0
Embed Size (px)
Citation preview
#TECHDAYSNLG106-107
Exploring micro-services in a Microsoft landscapeAlex Thissen Cloud architectXpirit
© 2016 Microsoft Corporation. All rights reserved.
AgendaIntroduction to micro-servicesDeveloping microservices in .NET
Frameworks and patternsHosting in Microsoft AzureSummarizing your options
Questions and AnswersDiscussion
Introduction to micro-services
Valued business drivers
Better• Resilient• Technology
choice
Cheaper• Test effort• Cost of
maintaining
Faster• Change• Deployment• Execution
From monolith to pebblesCommon architectures or deployments
Autonomous small systems
Benefits
Hetero-geneous
technology landscape
Resilience against failure
Selective scaling
Deployment of smaller pieces with lower risk
Alignment with
organization
Composability
Replaceability
• Organized by logical cohesion• Teams own layers spanning domains• Unified technology choice
From horizontal to verticalChange your approach to vertical partitions
• Modeled after organization’s domains • Owned by team• Top to bottom• Isolated from each other as much as
possible
User Interface Integration
Simplified microservices landscape
Partition 1
Service 3
Partition 2
Service 1
Service 2
UI
Autonomous business capabilities
Tighter coupling with appropriate
patterns for resiliency
Loose coupling by asynchronous event driven messaging
Following traditional SOA
tenets
Freedom of technology choice
High cohesion within partition
Asynchronous handling and calling
UI can be standalone or part of
microservice
Separate hosts for each partition and
service
Not all services are (public) web
services
Obtain simplicity by adding complexity
From vision to implementationImplementing microservices in Microsoft .NET
Microservices landscape
Partition 1
Service 3
Partition 2
Service 1
Service 2
User Interface IntegrationUI
Developing micro-servicesUsing Microsoft platform and technologies
Familiar tools and frameworks
ASP.NET MVC and Web APIWindows Communication Foundation
Service 1
.NET Technology Stack
Host
Mac OSXLinux
Self Hosted
“Helios”IIS
IIS Native Module
IIS Native Module
CLR Core CLR Mono CLR
.NET FX 4.6.2
ASP.NET Core 1.0
Windows
CoreFX
ASP.NET 4.6
ASP.NET MVC Core 1.0ASP.NET MVC 5
Intra-partition direct communication
Patterns you will need:1. Circuit breakerService 1
Service 2
2. Retry
• Standard RPC call to other service via client• Asynchronous outbound call
Inter-partition communication
Events basedPersistent and durable
Service 1 Service 2
Queues Storage Schedulers Hubs Databases
Ideally platform agnostic medium from client and service regardless of platform or framework
Balancing control and amount of work
ASP.NETWeb Services
Service Fabric Application
Function Apps
More control, more work Less control, more productivity
Microservices in productionHosting Microservices in Microsoft Azure
Hosting your services
Host
MicroServic
e
MicroServic
eMicroServic
e
MicroServic
e
Host
MicroServic
eHost
MicroServic
e
Host
MicroServic
eHost
MicroServic
e
High density hosting
One service per host
Host
Application container
MicroServic
e
MicroServic
e
Hosting in application container
Where to host your micro-service?
Host OS
Virtual machines
PaaS
Container runtimes
Containers with Docker and .NET
From single machine to clusterHosting multiple services on many machines requires more
Lifecycle management• Availability guarantees• Fault tolerance• Rolling upgrades
Health monitoring• Portal• Event monitoring• Performance analysis
Resource governance• Combine single machines to
cluster• High density• Placement constraintsApplication management• Packaging and deployment• Granular versioning
Microsoft Azure PlatformFor all your needs in Microservices
Azure technology for Microservices
Azure Container ServiceAzure Service Fabric
Azure App ServicesService
Microsoft Azure Service FabricA platform for reliable, hyper-scale microservices
Azure
WindowsServer Linux
Hosted Clouds
WindowsServer Linux
Service Fabric
Private Clouds
WindowsServer Linux
High Availability
Hyper-Scale
Hybrid OperationsHigh Density
Rolling Upgrades Stateful
services
Low Latency Fast startup & shutdown
Container Orchestration & lifecycle management Replication &
FailoverSimple
programming models
Load balancing
Self-healingData Partitioning
Automated Rollback
Health Monitoring
Placement Constraints
Microservices
Service Fabric for developersChacteristics• Stateful and stateless
services and actors• Reliable collections for
replicated state• Services built in full .NET
or .NET Core Framework• Host guest executables• Run anywhere including
local
Azure Container ServiceContainer hosting solution for production workloads
Run images in a container cluster
Characteristics• Combines open
source tooling and frameworks
• Requires a Linux distribution compatible service implementation
Typical ACS architecture/infrastructure (DC/OS)
Facilitating inter-partition communication
Leverage PaaS services from Azure
Service 1 Service 2
Queues Storage Schedulers Hubs Databases
Ideally platform agnosticCross-platform SDK available
Azure Function AppWrite C#/JavaScript function in cloudBuilt on Azure WebJobs SDK
Hosted in Azure Web App
Similar to Amazon LambdaKudu SCM portalTriggers
time, HTTP, EventHubIntegrate input and output
Summary by comparisonAzure Offering Developme
nt Framework
Hosting Deployment Portal (Azure Portal)
Provisioning/Maintaining
Container Service
.NET Core 1.0
Any cloudOn-premises
Docker images
ZookeeperChronosMarathon
IaaS+
Service Fabric .NET 4.5+.NET Core 1.0
Any cloudOn-premises
SF application package
Fabric Portal PaaS
Web/API App .NET 4.5+.NET Core 1.0
Azure Azure Stack
MSDeploy App Insights PaaS
Function App C# Azure Source control
Kudu PaaS
WrapupMicro-services are:A new architecture style for (web-)services with familiar elementsProvide business value at price of complexityBuilt with .NET Platform using tools and technologies you knowSeveral options in Azure to host micro-services applicationsTaking away some of the complexity
http://www.xpirit.com
Leading IT specialists in Microsoft Application Lifecycle Management,
Cloud, Enterprise Mobility & Security style
Traditional CRUD: • Mismatch between read and write representations• Contention of database
Solution: Segregate operations for reading and writing
Command and Query Responsibility Segregation
CRUD approach:• Updates directly against
datastore• No recorded history
Solution: Handle operations on data by events which are recorded in append-only database
Event sourcing