Microservice.NET
.NET Community
Sergey Seletsky
Software 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
Governance
Deployment
Governance
Reuse
Speed of
Development
Resilient Open
Challenges with a Microservices Approach
Evolutionary Discoverability Testing
Domain
Modeling
Versioning
must be
Supported
Platform
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 clientExperience
• SDK for accessing serviceSDK
• Communication protocol such as
REST/HTTPProtocol
• On the wire data modelsModels
• Business Rules/LogicService
• Data AccessDAC
• Model persistent storeStore
• Continuous DeliveryAutomation
Protocol
Protocol
DAC
Store
Any Client
Models
Service
SDK
Automation
The Server-Side Discovery Pattern
The Server-Side Discovery Pattern
P2P Discovery pattern
Service
Type 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
TFSContinuousDelivery
• 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 Design
Eric Evans
Continuous Delivery
Jez Humble
David Farley
Lean Enterprise
Jez Humble
Joanne Molesky
Barry O’Reilly
Building Microservices
Sam Newman
USA HQ
Toll Free: 866-687-3588
Tel: +1-512-516-8880
Ukraine HQ
Tel: +380-32-240-9090
Bulgaria
Tel: +359-2-902-3760
Germany
Tel: +49-69-2602-5857
Netherlands
Tel: +31-20-262-33-23
Poland
Tel: +48-71-382-2800
UK
Tel: +44-207-544-8414
EMAIL
info@softserveinc.com
WEBSITE:
www.softserveinc.com
Questions?
USA HQ
Toll Free: 866-687-3588
Tel: +1-512-516-8880
Ukraine HQ
Tel: +380-32-240-9090
Bulgaria
Tel: +359-2-902-3760
Germany
Tel: +49-69-2602-5857
Netherlands
Tel: +31-20-262-33-23
Poland
Tel: +48-71-382-2800
UK
Tel: +44-207-544-8414
EMAIL
info@softserveinc.com
WEBSITE:
www.softserveinc.com
THANK YOU!

Microservice.net by sergey seletsky

  • 1.
  • 2.
    Agenda • What isMicroservice? • Benefits • Challenges • Software Architecture • Azure Service Fabric • Real case • Conclusions
  • 3.
  • 4.
  • 5.
    How it lookslike inside?
  • 6.
    What is Microservice? Isn’tthis 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.
  • 7.
    Evolution from Monolithicto Microservice Desktop Client Server Browser Web Server Db Server Any Device microservices API Proxy
  • 8.
    Microservices are… Autonomous IsolatedElastic Resilient Responsive Automated Programmable Message Oriented Intelligent Configurable Discoverable Domain driven
  • 9.
    Benefits of aMicroservices Approach Evolutionary Owned Small Safe Versioned Replaceable Scale Governance Deployment Governance Reuse Speed of Development Resilient Open
  • 10.
    Challenges with aMicroservices Approach Evolutionary Discoverability Testing Domain Modeling Versioning must be Supported Platform Matters Automation is not an Option Communication is Key
  • 11.
    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
  • 12.
    Domain Modeling –Green Field • Leverage User Journey to find the capabilitiesUser Stories • One service at a timeEvolutionary • High CohesionSingle Responsibility • Minimize dependenciesLoose Coupling
  • 13.
    Microservice Microservice Logical Architecture •Any clientExperience • SDK for accessing serviceSDK • Communication protocol such as REST/HTTPProtocol • On the wire data modelsModels • Business Rules/LogicService • Data AccessDAC • Model persistent storeStore • Continuous DeliveryAutomation Protocol Protocol DAC Store Any Client Models Service SDK Automation
  • 14.
  • 15.
  • 16.
    P2P Discovery pattern Service TypeA 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
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
    Real case Microservice WCF +Protocol buffers + UDP Discovery WebAPI REST OrmLite / File System Any Client Domain Models Service .NET SDK / Java SDK / C++ SDK TFSContinuousDelivery • 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);
  • 26.
    Reading Domain Driven Design EricEvans Continuous Delivery Jez Humble David Farley Lean Enterprise Jez Humble Joanne Molesky Barry O’Reilly Building Microservices Sam Newman
  • 27.
    USA HQ Toll Free:866-687-3588 Tel: +1-512-516-8880 Ukraine HQ Tel: +380-32-240-9090 Bulgaria Tel: +359-2-902-3760 Germany Tel: +49-69-2602-5857 Netherlands Tel: +31-20-262-33-23 Poland Tel: +48-71-382-2800 UK Tel: +44-207-544-8414 EMAIL info@softserveinc.com WEBSITE: www.softserveinc.com Questions?
  • 28.
    USA HQ Toll Free:866-687-3588 Tel: +1-512-516-8880 Ukraine HQ Tel: +380-32-240-9090 Bulgaria Tel: +359-2-902-3760 Germany Tel: +49-69-2602-5857 Netherlands Tel: +31-20-262-33-23 Poland Tel: +48-71-382-2800 UK Tel: +44-207-544-8414 EMAIL info@softserveinc.com WEBSITE: www.softserveinc.com THANK YOU!

Editor's Notes

  • #26 Service Fabric is a universal deployment environment; you’re able to deploy any executable based on any language (Microsoft .NET Framework, Node.js, Java, C++) or even database runtimes like MongoDB.