Getting Started With Building Microservices

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Building Microservices

GETTING STARTED WITH BUILDING MICROSERVICES

Mark Heath
CLOUD ARCHITECT

@mark_heath www.markheath.net
Microservices on Pluralsight
This course is part of the microservices learning path
on Pluralsight

https://app.pluralsight.com/library/courses/microservices-fundamentals

Building Communicating Securing and


Architecting
between delivering
microservices microservices microservices microservices
In This Course

Domain Logic Testing Authorization


How to structure the Types of tests Inter-service
code? Combined strategy communication
Data mapping Security
Microservices give us flexibility and
Overview freedom
Value of standardization
eShopOnContainers sample application
- Architectural overview
- How to run it locally with Docker
What Are Microservices?

autonomous,
independently
deployable services…

They are small enough to be


rewritten if necessary

…collaborate to They own their own data


form an application
Other microservices can only access
that data through the public API

Avoid breaking changes to the API


Microservices Give You Options
Programming Language Database

In this course: C# Relational (e.g. SQL Server)

Java, Node.js, Python, Go, etc. Document (e.g. Mongo)

In-memory (e.g. Redis)

Communication Style Hosting Platform


HTTP-based web API Docker and Kubernetes
Messaging via an event bus Serverless Functions-as-a-Service
RESTful APIs, gRPC Directly on Virtual Machines
Flexibility and Freedom

Choose the best tool for the job


Adopt new technologies
Avoid getting stuck on legacy frameworks
Benefits of Standardization

Developer Consistent approach to


productivity deployment and monitoring

Logging Health checks

Configuration Authentication
Microservices give you freedom to choose the best
tool for the job

Microservice applications benefit from


standardization to boost developer productivity

Introducing our demo application:


eShopOnContainers
https://github.com/dotnet-architecture/eShopOnContainers
E-commerce Non-trivial Actively Maintained

Containerized Cross-platform Great documentation


eShopOnContainers Tech Stack

ASP.NET
C#
Core

Microservices principles can be applied in any programming language


eShopOnContainers Architecture
Development Environment Setup
Install Docker Desktop (Windows or Mac)
1 https://www.docker.com/products/docker-desktop

Clone eShopOnContainers source code


2
git clone https://github.com/dotnet-architecture/eShopOnContainers.git

Increase Docker Desktop available memory to 4GB (in Advanced Settings)


3

Configure Windows firewall rules (using supplied PowerShell script)


4
.\cli-windows\add-firewall-rules-for-sts-auth-thru-docker.ps1
Demo
Running eShopOnContainers locally
- docker-compose up
- docker-compose.yml
Microservices give us freedom to choose
the best tools for the job
Summary Standardization can simplify
development, deployment and
monitoring
eShopOnContainers sample application
- ASP.NET Core and C#
- Standardized logging and health
checks
- Different technologies (e.g. databases)
Up next…

Implementing domain logic

You might also like