Skip to content

1. Introduction

Section length: 8 lectures

Course overview | Next: 2. Solution Setup →

Summary

This is the introductory section of the course explaining what we will be building.

Key Takeaways

  • We will build a main web project which uses several microservices behind the scenes, which appear as Web APIs.

Lecture Notes

Microservices offer the following:

  • Independently deployable.
  • Independently scalable.
  • Each microservice focuses on an area of functionality so the codebase is focused and smaller (although not necessarily small).
  • If a microservice fails the impact should be smaller (as only that area of functionality should be affected) and the resolution should be easier to trace since the codebase is smaller.
  • Each microservice can be written in a different language or stack.

Generally:

  • Each microservice should have its own database (it should be self contained)
  • Microservices can communicate directly with each other (synchronously), or via messaging such as a service bus connection, etc. for asynchronous work.
  • Docker, etc. can be used with microservices, but this is not required.

Demo - What we will build

We will build the following system:

flowchart LR
    %% Nodes
    MVC["MVC Application"]
    Gateway["Gateway
:7777"] Identity[".NET Identity
:7002"] subgraph Microservices [" "] Product["Product
:7000"] Coupon["Coupon
:7001"] Cart["Shopping Cart
:7003"] Order["Order
:7004"] ServiceBus(("Service
Bus")) Email["Email"] Rewards["Rewards"] end %% Direct/Synchronous Connections (Solid Lines) MVC --- Identity MVC --- Gateway Gateway --- Product Gateway --- Coupon Gateway --- Cart Gateway --- Order Product --- Cart Coupon --- Cart Product --- Coupon %% Event/Asynchronous Connections (Dashed Lines) Identity -.- ServiceBus Cart -.- ServiceBus Order -.- ServiceBus ServiceBus -.- Email ServiceBus -.- Rewards %% Styling to closely match the diagram style MVC fill:#9C157E,stroke:#333,stroke-width:1px,color:#fff style Gateway fill:#2CA02C,stroke:#333,stroke-width:1px,color:#fff style Identity fill:#7F7F7F,stroke:#333,stroke-width:1px,color:#fff style Product fill:#00A4E4,stroke:#333,stroke-width:1px,color:#fff style Coupon fill:#00A4E4,stroke:#333,stroke-width:1px,color:#fff style Cart fill:#00A4E4,stroke:#333,stroke-width:1px,color:#fff style Order fill:#00A4E4,stroke:#333,stroke-width:1px,color:#fff style Email fill:#00A4E4,stroke:#333,stroke-width:1px,color:#fff style Rewards fill:#00A4E4,stroke:#333,stroke-width:1px,color:#fff style ServiceBus fill:#FFD700,stroke:#333,stroke-width:1px,color:#000 style Microservices fill:#E5E5E5,stroke:none

Course overview | Next: 2. Solution Setup →