getting started with microservices
TRANSCRIPT
#DNNConnect2016
Getting Started with Microservices Development
David RodriguezDNN Corp@davidjrh
Cesar AbreuIntelequia@cesabreu
#DNNConnect2016
Please support our valuable sponsors
#DNNConnect2016
On this session
• Principles and best practices for building Microservices• A developer approach for building and consuming MS from DNN• Continuous integration and delivery
#DNNConnect2016
DEMOA TodoList microservice running on DNN Platform and…
#DNNConnect2016
What is a Microservice?
• Is (logic + state) that is independently versioned, deployed, and scaled• Has a unique name that can be resolved
• e.g. fabric:/myapplication/myservice
• Interacts with other microservices over well defined interfaces and protocols like REST• Remains always logically consistent in the presence of failures• Hosted inside a “container” (code + config)• Can be written in any language and framework
• node.js, Java VMs, any EXE, .NET
• Developed by a small engineering team
#DNNConnect2016
Microservices vs. Monolithic
Source: https://msdn.microsoft.com/en-us/magazine/mt595752.aspx
#DNNConnect2016
Type of microservices
• Stateless microservice• Has either no state or it can be
retrieved from an external store • There can be N instances• e.g. web frontends, protocol
gateways, Azure Cloud Services etc.
• Stateful microservice• Maintain hard, authoritative
state• N consistent copies achieved
through replication and local persistence• e.g. database, documents,
workflow, user profile, shopping cart etc.
#DNNConnect2016
Building Features as a Service – Key principles
• Domain Driven Design: focus on the feature (the domain).
• Each microservice is relatively small, easier for a developer to understand
• Faster IDE, enhancing productivity• Faster deployments• High rate of change, low cost of change
• Hide implementation details• Decentralization: scaling by feature, not by the
whole• Failure isolation: more resistant than a monolithic
structure• Continuous Delivery through DevOps Culture
#DNNConnect2016
Best Practices for Designing Microservices
• Create a Separate Data Store for Each Microservice• Keep Code at a Similar Level of Maturity• Do a Separate Build for Each Microservice• Deploy in Containers (or container like)• Treat Servers as Stateless, avoid individual
servers dependencies
• Think for Big but also for business continuity:• How the data will be backed up or restored?• How the data will be partitioned by tenant?
#DNNConnect2016
A DNN .NET developer approach to Microservices
#DNNConnect2016
DEMOA DNN .NET developer approach to Microservices
#DNNConnect2016
#DNNConnect2016
DEMOContinuous integration and delivery with VSTS
#DNNConnect2016
DEMOService Fabric
#DNNConnect2016
Questions?
Please remember to evaluate the session online
Thank you
#DNNConnect2016
Getting Started with Microservices Development
David RodriguezDNN Corp@davidjrh
Cesar AbreuIntelequia@cesabreu