giulianolatini / distributed-systems-101

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Distributed Systems 101

Requirements

If your GitHub account is enabled to use Codespaces you can open this repository directly in Codespaces. Otherwise the following requirements must be met in order to successfully run the demos:

How to configure Visual Studio Code to run the demos

The following steps are required if you're not using Codespaces

  • Clone the repository
    • On Windows make sure to clone on short path, e.g. c:\dev, to avoid any "path too long" error
  • Open the root folder of the repository in Visual Studio Code
  • Open the Visual Studio Code command palette (F1 on all supported operating systems, for more information on VS Code keyboard shortcuts refer to this page)
  • Type Reopen in Container, the command palette supports auto-completion, the command should be available by typing reop

Wait for Visual Studio Code Remote container extension to:

  • download the required container images
  • configure the docker environment
  • configure the remote Visual Studio Code instance with the required extensions

Note: no changes will be made to your Visual Studio Code installation, all changes will be applied to the VS Code instance running in the remote container

The repository devcontainer configuration will:

  • Create three container instances:
    • One RabbitMQ instance with management plugin support
    • One .NET 5 enabled container where the repository source code will be available
    • Two PostgreSQL instances (Used starting Volume 1/Lesson 4)
  • Configure the VS Code remote instance with:
    • The C# extension (ms-dotnettools.csharp)
    • Bash as the default terminal

Once configuration is completed VS Code will show a new Ports tab, in the bottom-docked terminal area. The Ports tab will list all the ports exposed by the remote containers.

Verify that setup completed successfully

Locate Visual Studio Code Ports tab. The tab by default shows four columns, Port, Local Address, Running Process, and Origin.

  • Locate the row, in the Port column, containing the value 15672 (the RabbitMQ management port).
  • Hover the located row with the mouse and click on the Open in Browser icon in the Local Address column.
  • A new browser tab is opened and the RabbitMQ management page is displayed.

The default RabbitMQ credentials are:

  • Username: guest
  • Password: guest

Volume 1 - Messaging principles

Volume 1 is composed by 4 lessons focused on messaging and their nuances.

Lesson 1 - Request/Response

Lesson 1 is focused on basic messaging concepts, and why we need messaging in complex business software solutions. Samples are meant to demonstrate request/response patterns using C# and RabbitMQ. Lesson 1 is composed by the following samples:

  1. Send a message
  2. Request/Response
  3. Request/multi-Response

Lesson 2 - Publish/Subscribe

Lesson 2 builds on top of lesson 1, evolving the messaging concepts into publish/subscribe using events broadcasting. Samples are meant to demonstrate publish/subscribe patterns using C# and RabbitMQ. Lesson 2 is composed by the following samples:

  1. Publish/Subscribe
  2. Publish/multi-Subscribe

Lesson 3 - Architectural concepts: commands and events

Lesson 3 evolves lesson 2 by introducing architectural concepts like Commands and Events. It also introduces recoverability concepts. Samples are built using C#, NServiceBus, PostgreSQL, and RabbitMQ. Lesson 3 is composed by the following samples:

  1. Commands and Pub/Sub using NServiceBus
  2. Recoverability

Lesson 4 - Introduction to sagas

Lesson 4 introduces choreography and long running business transactions concepts through the saga pattern. Samples are built using C#, NServiceBus, PostgreSQL, and RabbitMQ. Lesson 4 is composed by the following samples:

  1. Basic saga
  2. Delayed deliveries and timeouts

About

License:MIT License


Languages

Language:C# 96.3%Language:Shell 2.1%Language:Dockerfile 1.5%Language:Batchfile 0.1%