microservice.net by sergey seletsky

28
Microservice.NE T .NET Community Sergey Seletsky Software Architect

Upload: sergey-seletsky

Post on 08-Jan-2017

535 views

Category:

Software


1 download

TRANSCRIPT

Microservice.NET

.NET Community

Sergey SeletskySoftware Architect

Agenda• What is Microservice?• Benefits• Challenges• Software Architecture• Azure Service Fabric• Real case• Conclusions

What is Microservice?

What we do?

How it looks like inside?

What is Microservice?

Isn’t this just another service-oriented architecture (SOA) or domain-driven design (DDD) approach?You can think of microservices as “SOA done right,” with principles and patterns like autonomous services, Bounded-Context pattern and event-driven all having their roots in SOA and DDD.

Evolution from Monolithic to Microservice

Desktop

Client

Server

Browser

Web Server

Db Server

Any Device

microservices

API Proxy

Microservices are…

Autonomous Isolated Elastic Resilient

Responsive Automated Programmable

Message Oriented

Intelligent Configurable Discoverable Domain driven

Benefits of a Microservices Approach

Evolutionary Owned Small Safe

Versioned Replaceable

Scale Governanc

e

Deployment

Governance

ReuseSpeed of

Development

Resilient Open

Challenges with a Microservices Approach

Evolutionary Discoverability Testing Domain

Modeling

Versioning must be

SupportedPlatform Matters

Automation is not an Option

Communication is Key

Domain Modeling – Existing System• Find the capability within the system - Where

does the language change?Bounded Context• How fast or slow areas of the system change can

identify a seamRate of Change• Service boundaries defined by how the org is

structuredTeam Structure

• Whatever hurts most is a good candidatePain

• Partition by existing couplingNamespace Modeling

Domain Modeling – Green Field• Leverage User Journey to find the

capabilitiesUser Stories

• One service at a timeEvolutionary

• High CohesionSingle Responsibility

• Minimize dependenciesLoose Coupling

Microservice

Microservice Logical Architecture• Any client Experienc

e• SDK for accessing serviceSDK• Communication protocol such

as REST/HTTPProtocol

• On the wire data modelsModels

• Business Rules/LogicService

• Data AccessDAC

• Model persistent store Store

• Continuous DeliveryAutomation

Protocol

Protocol

DAC

Store

Any Client

Models

Service

SDK

Auto

mat

ion

The Server-Side Discovery Pattern

The Server-Side Discovery Pattern

P2P Discovery pattern

ServiceType A

UDP/REST Client

Service Type B

UDP/REST Endpoint

Service Type B

UDP/REST Endpoint

Service Type C

UDP/REST Endpoint

Service Type C

UDP/REST Endpoint

Service Type D

UDP/REST Endpoint

Service Type D

UDP/REST Endpoint

Data Sovereignty Comparison

Azure Service Fabric

Services Density Comparison

Create a stateless service

Create a stateless service

The Service Fabric Explorer

Real case

Microservice

WCF + Protocol buffers + UDP Discovery

WebAPI REST

OrmLite / File System

Any Client

Domain Models

Service

.NET SDK / Java SDK / C++ SDK

TFS

Cont

inuo

us D

eliv

ery

• CI on TFS• Unit tests• Integration tests• Build *.msi• Deployment on remote VM• Regression tests

• Deployment as Windows Services• DB per service• P2P network

• Delivery by System Center• Just updating services by SCOM

THE MAGIC

var service = netsvc.Discovery<ISomeMicroService>();var result = service.ToDoSomthing(someData);

Reading

Domain Driven DesignEric Evans

Continuous DeliveryJez HumbleDavid Farley

Lean EnterpriseJez HumbleJoanne MoleskyBarry O’Reilly

Building MicroservicesSam Newman

USA HQToll Free: 866-687-3588 Tel: +1-512-516-8880

Ukraine HQTel: +380-32-240-9090

Bulgaria Tel: +359-2-902-3760

GermanyTel: +49-69-2602-5857

NetherlandsTel: +31-20-262-33-23

PolandTel: +48-71-382-2800

UKTel: +44-207-544-8414

[email protected]

WEBSITE:www.softserveinc.com

Questions?

USA HQToll Free: 866-687-3588 Tel: +1-512-516-8880

Ukraine HQTel: +380-32-240-9090

Bulgaria Tel: +359-2-902-3760

GermanyTel: +49-69-2602-5857

NetherlandsTel: +31-20-262-33-23

PolandTel: +48-71-382-2800

UKTel: +44-207-544-8414

[email protected]

WEBSITE:www.softserveinc.com

THANK YOU!