This demo shows how .NET Core can be used to build cloud-native applications than run as microservices, or on serverles platforms, and that support a wide variety of communication patterns including SignalR for real-time communication and gRPC.
The solution consists of these projects, each of which serve an individual purpose.
Project | Purpose |
---|---|
DurableLoans.DomainModel | A series of classes representing the ontology of the overall application. |
DurableLoans.ExchangeRateService | gRPC service that provides currency exchange rate conversion. |
DurableLoans.LoanOffice.Inbox | REST API that receives requests from the Durable Function. The API sends the incoming loan applications into an Azure Storage Queue. |
DurableLoans.LoanOffice.InboxProcessor | Worker Service that wathces the inbox queue. When loan applications are dropped onto the queue by the inbox REST API, this project picks them up and saves them to Cosmos, in the Inbox container where they await human review. |
DurableLoans.LoanOffice.ToBeApproved | Back-end service containing a gRPC endpoint that streams loans out to a client used by the loan officer to provide final approval of loan applications. |
DurableLoans.LoanProcess | The Azure Function that serves as the back-end for the system. |
DurableLoans.Web | The front-end web app. |
Customers submit loan applications via the front-end web app, which can run either as a microservices in Azure Kubernetes Service or in App Service. The loan application is sent to an Azure Durable Function, which orchestrates the steps in the pre-approval stage. Once the loan is pre-approved it is sent to a REST API microservice running in Azure Kubernetes Service. The message is queued onto an Azure Storage Queue, which is processed continuously by a .NET Core Worker service running either in Azure Container Instances or Azure Kubernetes Service. The Worker stores the loan application to an Azure Cosmos DB database, where it is held until the loan can be manually approved or declined.
- Configure the
DurableLoans.LoanProcess
project with the correct Azure SignalR Service and Azure Storage connection strings. func start
theDurableProcess.LoanProcess
.dotnet run
theDurableLoans.ExchangeRateService
project.dotnet run
theDurableLoans.LoanOffice.Inbox
project.dotnet run
theDurableLoans.LoanOffice.InboxProcessor
project.dotnet run
theDurableLoans.LoanOffice.ToBeApproved
project.dotnet run
theDurableLoans.Web
project.
There is also a WPF app that demonstrates how to access the API from a desktop/WPF app.
You won't need all of the items on the list, aside from those in Absolutely Required category. Beyond that, it will depend on your development approach which tools you'll enjoy the most. The idea is, most of the services have clients, and the more you need to do with each service, the more you'll benefit from having their tools.
- .NET Core 3.0 SDK
- Azure CLI
- Node.js - Node is required by the Functions tools.
- Azure Functions Tools - For the most part you can get what you need for this by running
npm install -g azure-functions-core-tools@preview
. - Visual Studio 2019
- Visual Studio Code
- Docker - Make sure you enable Kubernetes once you've installed Docker, as shown in the following screen shot.
These aren't required, but they will make life easier, especially if Visual Studio Code is your primary development environment.