/smart-coffee-machine

Showcase how we can decouple long-running tasks from HTTP request processing in REST API by introducing a distributed system using Message Queue, Redis, and Worker Services or Hosted Services

Primary LanguageC#MIT LicenseMIT

Smart Coffee Machine System

Showcase how we can decouple long-running tasks from HTTP request processing in REST API by introducing a distributed system using Azure Service Bus as a message broker to asynchronously handle messages, and Worker Services as message consumers, and Redis to track long-running tasks' status.

System Design Diagram

Network Topology using Azure Service Bus

Getting Started

Prerequisites:

  1. Azure Service Bus namespace (please see article below on how to create a namespace and generate a connection string)

Development

  1. Run "dotnet run" in Web API application to run the REST API.
  2. Run "dotnet run --no-build" in Services application to run the consumer instances.

For detailed description on the development journey and how things work, please see resource articles:

Give a Star

⭐ If you enjoy this project, or are using this project to start your exciting new project, or are just forking it to play, please give it a star. Much appreciated! Thanks! ⭐