microservice.net by sergey seletsky
TRANSCRIPT
Agenda• What is Microservice?• Benefits• Challenges• Software Architecture• Azure Service Fabric• Real case• Conclusions
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
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
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
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
WEBSITE:www.softserveinc.com
THANK YOU!