getting started with microservices

16
#DNNConnect2016 Getting Started with Microservices Development David Rodriguez DNN Corp @davidjrh Cesar Abreu Intelequia @cesabreu

Upload: david-j-rodriguez-hernandez

Post on 15-Apr-2017

182 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Getting started with Microservices

#DNNConnect2016

Getting Started with Microservices Development

David RodriguezDNN Corp@davidjrh

Cesar AbreuIntelequia@cesabreu

Page 2: Getting started with Microservices

#DNNConnect2016

Please support our valuable sponsors

Page 3: Getting started with Microservices

#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

Page 4: Getting started with Microservices

#DNNConnect2016

DEMOA TodoList microservice running on DNN Platform and…

Page 5: Getting started with Microservices

#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

Page 6: Getting started with Microservices

#DNNConnect2016

Microservices vs. Monolithic

Source: https://msdn.microsoft.com/en-us/magazine/mt595752.aspx

Page 7: Getting started with Microservices

#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.

Page 8: Getting started with Microservices

#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

Page 9: Getting started with Microservices

#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?

Page 10: Getting started with Microservices

#DNNConnect2016

A DNN .NET developer approach to Microservices

Page 11: Getting started with Microservices

#DNNConnect2016

DEMOA DNN .NET developer approach to Microservices

Page 12: Getting started with Microservices

#DNNConnect2016

Page 13: Getting started with Microservices

#DNNConnect2016

DEMOContinuous integration and delivery with VSTS

Page 14: Getting started with Microservices

#DNNConnect2016

DEMOService Fabric

Page 15: Getting started with Microservices

#DNNConnect2016

Questions?

Please remember to evaluate the session online

Thank you

Page 16: Getting started with Microservices

#DNNConnect2016

Getting Started with Microservices Development

David RodriguezDNN Corp@davidjrh

Cesar AbreuIntelequia@cesabreu