I am
looking for some expert and right advice to begin work on a POC to make a decision on Microservices with DotNet Core development to deployment.
POC concept: Customer will choose some products, make order, apply discount, then payment. Customer can see his past orders.
I am looking for a help to give a start in local machine no cloud involvement. I have some queries before begin and seeking some expert advice on it:
Q1: Which is a right way to create services in dotnet core?
+ Do I need to create different solution (.sln) in dotnet core for each microservices "Product", "Order", "Discount", "Payment" i.e total 4 solution?
+ Or a single solution with 4 different API project will work?
Q2: Microservice communication: I'll create a async communication using RabbitMQ,
+ Do I need to create a separate class lib project /solution and then need to containerized it and deploy on docker?
Q3: Docker Deployment
+ Do I need to wrap all 4 microservices (each different .sln) in a single container?
or separate 4 containers and then deploy?
Q4: Will the containers communicate each other or microservices to follow async communication.
Q5: Is it possible to do Docker-Swarm Orchestration local machine.
My understanding and concepts:
+ microservices means each module or independent service running as a SRP.
+ microservice contains its own code, database and lib and act as SRP.
UI is interacting with each service, (we can implement API Gateway further based on our need)
+ microservices can communicate each other in async approach using any AMQP protocol based technique such as RabbitMQ, Kafka, Azure Service Bus
+ this AMQP based approach is treated as Event sourcing
+ for synchronous communication we can still use the sync pattern like REST, GraphQL, gRPC
Development tools:
Visual Studio 2019
DotNET Core
RabbitMQ for async communication, REST API for sync communication
Docker Desktop (I am running windows container in my case)
xUnit for testing
API management for services (Ocelot)
Buzz word Orchestration:
When more than 2 services are running (in my POC case) we need to manage them, so we shall move to big buzz word
Docker Swarm (will follow in my case)
K8
Service Fabric
What I have tried:
I have already gone through a lot of articles on internet and videos for microservice arch. and development with dotnet core. Everywhere most of the time the tutorial or guidance take it to cloud.