Microservices with .NET Core

Slides:



Advertisements
Similar presentations
Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.
Advertisements

Attie Naude 14 May 2013 Windows Azure Mobile Services.
A Java Architecture for the Internet of Things Noel Poore, Architect Pete St. Pierre, Product Manager Java Platform Group, Internet of Things September.
GRDevDay March 21, 2015 Cloud-based Identity for Applications.
1 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 2: REST Details and Patterns Some.
Design Patterns Cloud Sharath Feb
The best of WF 4.0 and AppFabric Damir Dobric MVP-Connected System Developer Microsoft Connected System Division Advisor Visual Studio Inner Circle member.
Improve the Performance, Scalability, and Reliability of Applications in the Cloud with jetNEXUS Load Balancer for Microsoft Azure MICROSOFT AZURE ISV.
Cloud Design Patterns Sharath Sahadevan,
Take an Analytics-Driven Approach to Container Performance Marc Chéné, Principal Product Manager Den Gladkikh (aka outcoldman), Principal Dev Engineer.
WhenNow on Microsoft Azure Offers a Simple Way to Create Events in a Low-Cost Ticketing Platform with No Transaction Fees for Customers MICROSOFT AZURE.
The Derivitec Risk Portal Provides Powerful, Cost-Effective Risk Management Solutions, Powered by Azure, that Deploy in Minutes MICROSOFT AZURE ISV PROFILE:
Configuration & Registry Microservice Deep Dive
Build and Learn ASP.NET Workshop.
Export Services Deep Dive
Univa Grid Engine Makes Work Management Automatic and Efficient, Accelerates Deployment of Cloud Services with Power of Microsoft Azure MICROSOFT AZURE.
Building production ready APIs with ASP.NET Core 2.0
DocFusion 365 Intelligent Template Designer and Document Generation Engine on Azure Enables Your Team to Increase Productivity MICROSOFT AZURE APP BUILDER.
OpenLegacy Training Day Four Introduction to Microservices
Containers: The new network endpoint
About Bill Bill Baer (ˈbɛər)
Cherwell Service Management is an IT Service Management Solution that Makes it Easier for Users to Capitalize on Power of Microsoft Azure MICROSOFT AZURE.
Cloud Native: Rapid Application Development
Upgrading from Full Trust Code to Add-in Model and SharePoint Framework Paolo Pialorsi Senior Consultant - PiaSys.com Track: DEV | Level:
Hosted on Azure, LoginRadius’ Customer Identity
Introduction to Microservices Prepared for
SmartHOTEL Solutions Powered by Microsoft Azure Provide Hoteliers with Comprehensive, One-Stop Automated Management of All Booking Channels MICROSOFT AZURE.
New Mexico State University
Exploring Azure Event Grid
Take Control of Insurance Product Management: Build, Test, and Launch Any Product Globally 10x Faster, 10x More Cheaply with INSTANDA on Azure Partner.
Ashish Pandit IT Architect, Middleware & Integration Services
Kubernetes Container Orchestration
Serverless CQRS in Azure!
End-to-End REST Service Testing Automation
Built on the Powerful Microsoft Azure Platform, Bookitbee Allows Organizers to Sell Tickets and Manage Attendees Online for Any Size Event MICROSOFT AZURE.
Practical Choreography with Spring Cloud
Moving Cloud Services to Service Fabric
Ben Burbridge, Rebecca Jones, Hilary Newman Product Development
Modernize Your Existing Applications with Microservices
Transforming SharePoint Farm Solutions to the Add-in Model
Designed for Big Data Visual Analytics, Zoomdata Allows Business Users to Quickly Connect, Stream, and Visualize Data in the Microsoft Azure Platform MICROSOFT.
Securing Cloud-Native Applications Jason Schmitt CEO
WEB API.
Interlake Hybrid Cloud Management Suite
Logsign All-In-One Security Information and Event Management (SIEM) Solution Built on Azure Improves Security & Business Continuity MICROSOFT AZURE APP.
Microsoft Connect /17/ :34 AM
DeFacto Planning on the Powerful Microsoft Azure Platform Puts the Power of Intelligent and Timely Planning at Any Business Manager’s Fingertips Partner.
Meeting Rooms Management Empowers Organizations and Their Employees to Become Mobile, and to Save Meeting Space and Time MICROSOFT AZURE APP BUILDER PROFILE:
Connecting, Managing, Observing, and Securing Services
Developing for the cloud with Visual Studio
Keep Your Digital Media Assets Safe and Save Time by Choosing ImageVault to be Your Digital Asset Management Solution, Hosted in Microsoft Azure Partner.
autodiscoverable microservices with vertx3
Site scripts and Site Design
Serverless Architecture in the Cloud
Last.Backend is a Continuous Delivery Platform for Developers and Dev Teams, Allowing Them to Manage and Deploy Applications Easier and Faster MICROSOFT.
TechEd /22/2019 9:22 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
CQRS & Event Sourcing Distributed Architecture Patterns
Building production-ready APIs with ASP.NET Core 2.2
5 Azure Services Every .NET Developer Needs to Know
OpenStack Summit Berlin – November 14, 2018
TN19-TCI: Integration and API management using TIBCO Cloud™ Integration
REST Easy - Instant APIs for Your Database
Johan Lindberg, inRiver
Microservices – What Exactly Am I Securing Again?
The Future is Now with ASP.NET Core 3.0
Containers on Azure Peter Lasne Sr. Software Development Engineer
Talking Between Services with gRPC
9/16/2019 6:55 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
.NET Core and Kubernetes
Presentation transcript:

Microservices with .NET Core Kevin Hoffman Lead Engineer, Capital One @KevinHoffman autodidaddict

About Me

Agenda What is a microservice? Distributed Transactions Complex Data Flow Modeling w/Microservices 100% Fully Buzzword Compliant Demo Not a “hello world” sample Lessons Learned So Far Q&A I won’t be talking about why we should be building microservices because at this point most of us have already figured out how we might be able to benefit from microservices

Is this a Microservice? This is a protocol handler … a facade. This is not your service. [Route("api/[controller]")] public class ValuesController : Controller { // GET api/values [HttpGet] public IEnumerable<string> Get() { return new string[] { "value1", "value2" }; } // PUT, POST, DELETE, etc ... }

Some microservices are RESTful … Not all RESTful services are micro

The Microservices Onion Storage Metrics / Monitoring Protocol Discovery Elastic Scaling Service Tracing 0 Downtime Deploy Security Logging Networking

What is a Microservice A microservice is a discrete unit of functionality that adheres to the Single Responsibility Principle, asks nothing* of its host, and can be deployed without impacting other services in the ecosystem. You are here

But...I must worry about the onion...right? Discovery - Steeltoe + Eureka Logging and Monitoring Splunk, Sumologic, Grafana, App dynamics, Prometheus, Dynatrace, ad nauseum Security - OAuth, OIDC (DIY middleware, third party middleware, Azure) Protocol - HTTP, JSON, gRPC Configuration - Spring Config Server (via Steeltoe), etcd 0 Downtime Deploy - Kubernetes, Cloud Foundry, GKE, etc Containerize your app Tracing - Steeltoe + Zipkin Storage - Cloud platform, S3, etc Elastic Scaling - Kubernetes, Cloud Foundry, GKE, etc Messaging - Rabbit, SQS, Azure, Kafka, PubNub, ... Point: there are well established libraries for most of these third party products.

Embrace the onion… love the onion... Focus on your service, trust the onion layers Let the experts do what they do best Use professional-grade wheels, don’t re-invent your own Unless your core business makes money from the sale of wheels Cloud platforms are plentiful, available, and mature. Rely on them wherever you can If your service is buggy or broken, none of these onion layers can save you. Mention dropbox implementing their own backing store here as an example of when you should roll your own versus re-using what’s out there

Too much worrying about outer layers is a smell

Sidecar… onions … Side-onions! You are here

Classic Distributed Transaction Create Order App Request Reduce Inventory Update Ledger

Distributed Failure via Microservices Inventory Service Gateway/Agg Service Request Product Service Ledger Service

Immutable Events and Shared-Nothing Activity Modeling Orders Inventory Ledger Order Accepted Inv Reserved Order Accepted Inv Reserved Order Canceled Inv Released Inv Shipped Order Canceled Inv Released Inv Shipped What does the world look like if we can model our business without even the concept of a transaction? Life Beyond Distributed Transactions - http://queue.acm.org/detail.cfm?id=3025012, Pat Helland

Facts vs State FACT STATE Order Created @ 2:12PM by “bob” Inventory Reserved SKU 12345 Order 12 Canceled @ 9:21PM by “bob” Inventory Released SKU 12345 STATE Order { ID = 12, Status = Open, … } Item 12345 { WarehouseQty = 99 } Item 12345 { WarehouseQty = 98 } Order { ID = 12, Status = Canceled, … } Eventual Consistency

Being right 5 seconds from now is always better than being wrong right now.

Partial Foods - Sample Application Transactions modeled as immutable activities State exposed as eventually consistent, materialized views Designed for Scale, Throughput, Durability, Reliability More than just “Hello World” Online Store Sells groceries Orders fulfilled asynchronously Inventory releases and holds Order creation and cancellation Durable message broker

“Partial Foods” - Microservices Architecture API Service Order Command REST/JSON Order Mgmt Ledger Inventory

Sample App Demo & Code Walkthrough gRPC Services ASP.NET REST/JSON Service Pub/Sub Messaging Kafka Entity Framework Core 2.0 Postgres Eventual Consistency & Materialized Views Modeling Activities instead of Distributed Transactions Embrace Shared-Nothing Partial Foods Sample App Demo & Code Walkthrough Buzzword compliance!

Recap / Lessons Learned Not all microservices are RESTful JSON services Show gRPC some love Modeling entities and immutable, distributed activities can be a simple solution to a complex problem Event Sourcing and CQRS are for more than just Netflix Get it working first, materialize your views second. .NET Core 2.0 is excellent, and ready for production. 2.0 tooling is superb, 1.x … not so much Containerize your workloads Build cloud-first or cloud native Kubernetes, Cloud Foundry, AWS, Azure, Google Cloud, etc. 12/15 factors Microservices are an architectural pattern, NOT a framework/library Disappointed that Partial Foods doesn’t have a proper logo

Q&A Twitter @KevinHoffman Book signing Tuesday @ 10:15AM Partial Foods Code http://github.com/microservices-aspnetcore/partialfoods Requires Postgres, Zookeeper & Kafka, .NET Core 2.0 Resources grpc.io https://kafka.apache.org/quickstart