Below video is from 2018, so almost 3 years old now, but somehow I only found it now. It’s a handy overview into microservices, has a few gotchas such as avoiding internal communication when fulfilling client requests, to reduce latency, as well as async workflows like adding items to cart. Check it out - if you are starting your journey into microservices with .NET, it’s well worth 30min of your time.
As pointed in the video, Microsoft maintains a microservice architecture showcase project on GitHub. It’s not production ready, but shows various ways you can put things together. It has a mobile app, an Angular front end, as well as a traditional MVC app. An API gateway serves as a reverse proxy for client requests, which helps private/public interface isolation and improves security. You can run it locally and deploy to Azure and AWS clouds using your own credentials.
As promised on their GitHub page, this solution provides a true F5 experience, which includes getting all the images and building/running containers from them, using docker compose. First startup might take a few minutes, and then it’s 35-40 seconds for subsequent debugging sessions. I opened a ticket on GitHub to see if second startup can be made faster. After all it’s only 10K LOC.
To debug the solution and open the home page, press F5. Then, if you see this during startup, it’s normal.
It means not all services are yet up and running, just press F5 after a few seconds and it will eventually load:
It’s nice that Visual Studio provides some tools for debugging containers, might save you some time by not switching mental context to/from the command line. I didn’t know they had this window. And you can even check the container’s file system, which typically takes a few steps in the prompt.
Here is how it looks from Docker Desktop. It’s nicely grouped so you can remove it all after you are done.
To speed up the initial startup of Visual Studio, you might want to keep containers running after project is closed. Here is how/where to set this option in VS. It’s mentioned in the FAQ, but I decided to include it here also, partly because this VS screen has changed since it was documented there.