Giter Site home page Giter Site logo

mauroservienti / welcome-to-the-state-machine-demos Goto Github PK

View Code? Open in Web Editor NEW
26.0 3.0 3.0 835 KB

Demos and sample for my "Welcome to the (state) machine" talk

Home Page: https://milestone.topics.it/talks/welcome-to-the-state-machine.html

License: MIT License

C# 88.34% HTML 10.44% CSS 1.21% JavaScript 0.01%
demos samples talks sagas nservicebus messaging soa hacktoberfest

welcome-to-the-state-machine-demos's Introduction

Welcome to the (state) machine - Demos

A tickets booking system - based on SOA principles.

This demo aims to demonstrate how to use sagas to overcome the architectural limitations of Process Managers in distributed systems. This is the support demo of my Welcome to the (state) machine talk.

The demo assumes some knowledge of what service boundaries are and what the role of ViewModel Composition is in SOA based systems. I recommend watching the following 2 talks to find out more about figuring out service boundaries, and how to deal with UI/ViewModel aspects in a microservices/SOA system without reintroducing coupling by doing request/response between the services.

An exhaustive dissertation about ViewModel Composition is available on my blog in the ViewModel Composition series.

Requirements

The following requirements must be met in order to successfully run the demos:

How to configure Visual Studio Code to run the demos

  • Clone the repository
    • On Windows make sure to clone on short path, e.g. c:\dev, to avoid any "path too long" error
  • Open one of the demos folder in Visual Studio Code
  • Make sure Docker is running
    • If you're using Docker for Windows with Hyper-V make sure that the cloned folder, or a parent folder, is mapped in Docker
  • 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 Dev containers 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:

  • One or more container instances:
    • One RabbitMQ instance with management plugin support
    • One .NET enabled container where the repository source code will be mapped
    • A few PostgreSQL instances
  • Configure the VS Code remote instance with:
    • The C# extension (ms-dotnettools.csharp)
    • The PostgreSQL Explorer extension (ckolkman.vscode-postgres)

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.

Containers connection information

The default RabbitMQ credentials are:

  • Username: guest
  • Password: guest

The deafult PostgreSQL credentials are:

  • User: db_user
  • Password: P@ssw0rd

How to run the demos

To execute the demo open the root folder in VS Code, press F1 and search for Reopen in container. Wait for the Dev Container to complete the setup process.

Once the demo content has been reopened in the dev container:

  1. Press F1, search for Run task, and execute the desired task to build the solution or to build the solution and deploy the required data
  2. Go to the Run and Debug VS Code section to select the desired compund to execute.

Disclaimer

This demo is built using NServiceBus Sagas, I work for Particular Software, the makers of NServiceBus.

welcome-to-the-state-machine-demos's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar github-actions[bot] avatar mauroservienti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

welcome-to-the-state-machine-demos's Issues

Question about the saga?

Hello Mauro, could you clarify me your vision of saga ? Do I understand correctly that saga has no single spot of orchestration and it is adistributed process between services. In other words, can it be called choreography ?
And as far as I understood that you do not admit orchestration-based saga, right ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.